Skip to content

Commit

Permalink
[2375] Hide facet group if it contains no results
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed May 17, 2012
1 parent e8945df commit 126964e
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions ckan/templates/snippets/facet_list.html
Expand Up @@ -23,16 +23,18 @@
how a facet-item's count is displayed.
-->
<section class="module" xmlns:py="http://genshi.edgewall.org/" py:with="items=h.unselected_facet_items(name, 10)">
<h2 class="heading">${h.facet_title(title)} <a href="${c.remove_field(name)}" class="action">Clear All</a></h2>
<nav>
<ul class="unstyled nav nav-simple">
<py:for each="item in items">
${h.snippet('snippets/facet_item.html', name=name, item=item)}
</py:for>
</ul>
</nav>
<p class="footer" py:if="items">
<a href="#" class="read-more">Show All ${h.facet_title(title)}</a>
</p>
</section>
<py:with vars="items=h.unselected_facet_items(name, 10)" xmlns:py="http://genshi.edgewall.org/">
<section class="module" py:if="len(items)">
<h2 class="heading">${h.facet_title(title)} <a href="${c.remove_field(name)}" class="action">Clear All</a></h2>
<nav>
<ul class="unstyled nav nav-simple">
<py:for each="item in items">
${h.snippet('snippets/facet_item.html', name=name, item=item)}
</py:for>
</ul>
</nav>
<p class="footer" py:if="items">
<a href="#" class="read-more">Show All ${h.facet_title(title)}</a>
</p>
</section>
</py:with>

0 comments on commit 126964e

Please sign in to comment.