Skip to content

Commit

Permalink
[2375] Tidy up the facet_list.html template
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jun 25, 2012
1 parent a6df8df commit a76dbe0
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions ckan/templates/snippets/facet_list.html
Expand Up @@ -30,21 +30,14 @@ <h2 class="module-heading"><i class="icon-medium icon-filter"></i> {{ h.get_face
<nav>
<ul class="unstyled nav nav-simple nav-facet">
{% for item in items %}
{% if item.active %}
<li class="nav-item active">
<a href="{{ h.remove_url_param(name, item.name) }}">
{% with href = h.remove_url_param(name, item.name) if item.active else h.add_url_param(new_params={name: item.name}) %}
<li class="nav-item{% if item.active %} active{% endif %}">
<a href="{{ href }}">
{{ label_function(item) if label_function else h.truncate(item.display_name, 22) }}
{{ count_label(item['count']) if count_label else ('(%d)' % item['count']) }}
</a>
</li>
{% else %}
<li class="nav-item">
<a href="{{ h.add_url_param(new_params={name: item.name}) }}">
{{ label_function(item) if label_function else h.truncate(item.display_name, 22) }}
{{ count_label(item['count']) if count_label else ('(%d)' % item['count']) }}
</a>
</li>
{% endif %}
{% endwith %}
{% endfor %}
</ul>
</nav>
Expand Down

0 comments on commit a76dbe0

Please sign in to comment.