diff options
-rw-r--r-- | askbot/skins/default/templates/macros.html | 15 | ||||
-rw-r--r-- | askbot/skins/default/templates/tags.html | 1 | ||||
-rw-r--r-- | askbot/skins/default/templates/user_profile/user_stats.html | 1 |
3 files changed, 13 insertions, 4 deletions
diff --git a/askbot/skins/default/templates/macros.html b/askbot/skins/default/templates/macros.html index 831c148f..08893ad0 100644 --- a/askbot/skins/default/templates/macros.html +++ b/askbot/skins/default/templates/macros.html @@ -200,7 +200,8 @@ poor design of the data or methods on data objects #} search_state = None, css_class = None, tag_css_class = None, - tag_html_tag = 'li' + tag_html_tag = 'li', + truncate_long_tags = False ) -%} <ul {% if id %}id="{{ id }}"{% endif %} @@ -214,7 +215,8 @@ poor design of the data or methods on data objects #} deletable = deletable, is_link = make_links, search_state = search_state, - html_tag = tag_html_tag + html_tag = tag_html_tag, + truncate_long_tag = False )}} {% endfor %} {% endif %} @@ -248,7 +250,8 @@ poor design of the data or methods on data objects #} css_class = None, search_state = None, html_tag = 'div', - extra_content = '' + extra_content = '', + truncate_long_tag = False ) -%} {% if not search_state %} {# get empty SearchState() if there's none; CAUTION: for some reason this doesn't work inside `spaceless` tag below! #} @@ -264,7 +267,11 @@ poor design of the data or methods on data objects #} {% endif %} rel="tag" data-tag-name="{{ tag|replace('*', '✽')|escape }}" - >{{ tag|replace('*', '✽')|truncate(20,True)}}</{% if not is_link or tag[-1] == '*' %}span{% else %}a{% endif %}> + >{% if truncate_long_tag -%} + {{ tag|replace('*', '✽')|truncate(17, True) }} + {%- else -%} + {{ tag|replace('*', '✽') }} + {%- endif %}</{% if not is_link or tag[-1] == '*' %}span{% else %}a{% endif %}> {% if deletable %} <div class="delete-icon" {% if delete_link_title %} diff --git a/askbot/skins/default/templates/tags.html b/askbot/skins/default/templates/tags.html index 6b89bdba..007388af 100644 --- a/askbot/skins/default/templates/tags.html +++ b/askbot/skins/default/templates/tags.html @@ -40,6 +40,7 @@ {{ macros.tag_widget( tag = tag.name, html_tag = 'div', + truncate_long_tag = True, extra_content = '<span class="tag-number">× ' ~ tag.used_count|intcomma ~ '</span>' ) diff --git a/askbot/skins/default/templates/user_profile/user_stats.html b/askbot/skins/default/templates/user_profile/user_stats.html index 43b7f4fa..85d70009 100644 --- a/askbot/skins/default/templates/user_profile/user_stats.html +++ b/askbot/skins/default/templates/user_profile/user_stats.html @@ -92,6 +92,7 @@ tag.name, html_tag = 'div', search_state = search_state, + truncate_long_tag = True, extra_content = '<span class="tag-number">× ' ~ tag.user_tag_usage_count|intcomma ~ |