Skip to content

Commit

Permalink
[#817] Adds untruncated tooltip to facet lists
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartin committed Apr 24, 2013
1 parent 8d51a5a commit 6131ec7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ckan/templates/snippets/facet_list.html
Expand Up @@ -57,11 +57,12 @@ <h2 class="module-heading">
<ul class="{{ nav_class or 'unstyled nav nav-simple nav-facet' }}">
{% for item in items %}
{% set href = h.remove_url_param(name, item.name, extras=extras, alternative_url=alternative_url) if item.active else h.add_url_param(new_params={name: item.name}, extras=extras, alternative_url=alternative_url) %}
{% set label = label_function(item) if label_function else h.truncate(item.display_name, 22) %}
{% set label = label_function(item) if label_function else item.display_name %}
{% set label_truncated = h.truncate(label, 22) if not label_function else label %}
{% set count = count_label(item['count']) if count_label else ('(%d)' % item['count']) %}
<li class="{{ nav_item_class or 'nav-item' }}{% if item.active %} active{% endif %}">
<a href="{{ href }}">
<span>{{ label }} {{ count }}</span>
<a href="{{ href }}" title="{{ label }}">
<span>{{ label_truncated }} {{ count }}</span>
</a>
</li>
{% endfor %}
Expand Down

0 comments on commit 6131ec7

Please sign in to comment.