Skip to content

Commit

Permalink
Merge branch 'feature-2223-bootstrap' of github.com:okfn/ckan into fe…
Browse files Browse the repository at this point in the history
…ature-2223-bootstrap
  • Loading branch information
kindly committed Mar 23, 2012
2 parents e28afd5 + e7fc0ba commit d3857e0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ckan/templates/facets.html
Expand Up @@ -20,16 +20,16 @@ <h2>${title(code)}</h2>
</div>
</py:def>

<!-- Creates a possibly empty list of <li> elements containing links to further search results
<py:def function="facet_list_items(code, limit=5, label=lambda n: n, if_empty=None)">
<!-- Creates a possibly empty list of <li> elements containing links to further search results
This is different from the above function 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.
This is different from the above function 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.
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)">
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
-->
<li py:if="if_empty and len(h.facet_items(c, code, limit=limit)) == 0">${if_empty}</li>
<li py:for="name, count in h.facet_items(c, code, limit=limit)"
py:if="not (code, name) in c.fields">
Expand Down

0 comments on commit d3857e0

Please sign in to comment.