Skip to content

Commit

Permalink
[#2313] Removed deprecated facet_list_items function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Murray committed Jul 7, 2012
1 parent 04a9fd7 commit 2ec103a
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions ckan/templates/facets.html
Expand Up @@ -75,40 +75,6 @@ <h2>${h.facet_title(title)}</h2>
</li>
</py:def>

<!--!
DEPRECATED. Provided only for backward compatibility with existing plugins.
Use `facet_li` instead.
Construct a possibly empty list of <li> elements containing links to further
search results
This is different from `facet_sidebar` and `facet_div` (above) in that it
requires the caller to wrap up the resulting <li> elements in whatever dom
element they need. But it *does* allow for filters to displayed in a
hierarchy.
label
Renders the human-readable label for each facet value.
If defined, this should be a callable that accepts a facet_item's name as a
string.
if_empty
If if_empty is not None and there are no facets to filter on, then a single
<li> element is generated, with the text specified by if_empty
-->
<py:def function="facet_list_items(code, limit=5, label=lambda n: n, if_empty=None)">

<?python
import logging
logging.getLogger('ckan.templates.facets').warning("Deprecated function:ckan/templates/facets.html:facet_list_items()")
?>
<li py:if="if_empty and not h.unselected_facet_items(code, limit)">${if_empty}</li>
<li py:for="facet_item in h.unselected_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>

<py:def function="field_list()">
<div class="filter-list" py:if="c.fields">
<div class="filter-entry" py:for="(field, value) in c.fields">
Expand Down

0 comments on commit 2ec103a

Please sign in to comment.