[ckan-changes] [okfn/ckan] 449c92: facet_div() Genshi function no longer needs to fil...

GitHub noreply at github.com
Wed Apr 18 13:05:46 UTC 2012


  Branch: refs/heads/feature-1821-multilingual-extension
  Home:   https://github.com/okfn/ckan
  Commit: 449c9250bd8fce5554ce48ded4cf46f1f80dde59
      https://github.com/okfn/ckan/commit/449c9250bd8fce5554ce48ded4cf46f1f80dde59
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-04-18 (Wed, 18 Apr 2012)

  Changed paths:
    M ckan/templates/facets.html

  Log Message:
  -----------
  facet_div() Genshi function no longer needs to filter out selected facets

It now uses the new_facet_items() helper function to do this for it.


diff --git a/ckan/templates/facets.html b/ckan/templates/facets.html
index 05c19b5..71883b1 100644
--- a/ckan/templates/facets.html
+++ b/ckan/templates/facets.html
@@ -34,8 +34,7 @@
     <div py:if="if_empty is not None or h.new_facet_items(name, limit)" class="facet-box">
         <h2>${h.facet_title(title)}</h2>
         <ul class="facet-options">
-            <li py:for="facet_item in h.new_facet_items(name, limit)"
-                py:if="not (name, facet_item.name) in c.fields">
+            <li py:for="facet_item in h.new_facet_items(name, limit)">
                 <a href="${c.drill_down_url(**{name: facet_item.name})}">
                     ${label_function(facet_item)}
                 </a>


================================================================
  Commit: a0c78b41365ee8805bc8d32b8893fa3d8eb83b2d
      https://github.com/okfn/ckan/commit/a0c78b41365ee8805bc8d32b8893fa3d8eb83b2d
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-04-18 (Wed, 18 Apr 2012)

  Changed paths:
    M ckan/templates/facets.html

  Log Message:
  -----------
  facet_list_items() Genshi function no longer needs to filter out selected facets

It now uses the new_facet_items() helper function to do this for it.


diff --git a/ckan/templates/facets.html b/ckan/templates/facets.html
index 71883b1..5e20b95 100644
--- a/ckan/templates/facets.html
+++ b/ckan/templates/facets.html
@@ -121,8 +121,7 @@
 <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>


================================================================
Compare: https://github.com/okfn/ckan/compare/35388f8...a0c78b4


More information about the ckan-changes mailing list