Skip to content

Commit

Permalink
Update facet_list.html
Browse files Browse the repository at this point in the history
Remove brackets and add some `span`s to the `facet_list` items, to offer more styling options.

Note: The `hidden` and `badge` classes are not necessary to achieve the above, but are in keeping with the use of Bootstrap styling throughout CKAN.
  • Loading branch information
smth committed Feb 12, 2018
1 parent 89d52c1 commit 823f6d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ckan/templates/snippets/facet_list.html
Expand Up @@ -64,10 +64,12 @@ <h2 class="module-heading">
{% 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 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']) %}
{% 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 }}" title="{{ label if label != label_truncated else '' }}">
<span>{{ label_truncated }} {{ count }}</span>
<span class="item-label">{{ label_truncated }}</span>
<span class="hidden separator"> - </span>
<span class="item-count badge">{{ count }}</span>
</a>
</li>
{% endfor %}
Expand Down

0 comments on commit 823f6d5

Please sign in to comment.