Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix title definition so that translations are possible from variables #7

Closed
wants to merge 12 commits into from

Conversation

lnagel
Copy link

@lnagel lnagel commented Mar 24, 2015

No description provided.

tonisvain and others added 11 commits November 17, 2015 11:41
’sortable_formattable’ tag takes extra image url and format string.
the image will show when the node is active and will flip the image as
direction is changed.

format string may have variables like css_class, url, title and dir_img
when node is active, the dir_img will be a simple <img> tag with
image_url as the src and will have class names: ‘sort-img’ and
‘sort-asc-img’ or ‘sort-desc’ depending on the sorting direction

example:

{% sortable_formattable sortable_field translated_title '<th
class="{css_class}"><a href="{url}" title="{title}">{title}</a><span
class="pull-right">{dir_img}</span></th>' ‘/source/images/image.jpg’ %}

or add them as variables:

{% trans “Field name” as trans_field_name %}
{% static 'images/image.jpg' as image_url %}
{% with '<th class="{css_class}"><a href="{url}"
title="{title}">{title}</a><span
class="pull-right">{dir_img}</span></th>' as format_string %}
    {% sortable_formattable sortable_field trans_field_name
format_string image_url %}
{% endwith %}
@lnagel lnagel closed this Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants