Skip to content

Commit

Permalink
facet_list_items() Genshi function no longer needs to filter out sele…
Browse files Browse the repository at this point in the history
…cted facets

It now uses the new_facet_items() helper function to do this for it.
  • Loading branch information
Sean Hammond committed Apr 18, 2012
1 parent 449c925 commit a0c78b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ckan/templates/facets.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ <h2>${title(code)}</h2>
<py:def function="facet_list_items(code, limit=5, label=lambda n: n, if_empty=None)">

<li py:if="if_empty and not h.new_facet_items(code, limit)">${if_empty}</li>
<li py:for="facet_item in h.new_facet_items(code, limit)"
py:if="not (code, facet_item.name) in c.fields">
<li py:for="facet_item in h.new_facet_items(code, limit)">
<a href="${c.drill_down_url(**{code: facet_item.name})}">${label(facet_item.name)}</a> (facet_item['count'])
</li>
</py:def>
Expand Down

0 comments on commit a0c78b4

Please sign in to comment.