]> git.parisson.com Git - telemeta.git/commitdiff
search: add sound filter checkbox (closes #91)
authoryomguy <yomguy@parisson.com>
Wed, 30 Nov 2011 10:46:33 +0000 (11:46 +0100)
committeryomguy <yomguy@parisson.com>
Wed, 30 Nov 2011 10:46:33 +0000 (11:46 +0100)
telemeta/templates/telemeta_default/search_criteria.html
telemeta/web/base.py

index 6979aaf0200432a9eefd4542f6a64d2297a6d5f7..6885f9e8cfcc0d5661a638476251defa80056d80 100644 (file)
@@ -126,11 +126,11 @@ $(document).ready(function () {
     </select>
     </p>
     {% endif %}
-    <!--
+
     <p><label for="sound">{% trans "Sound" %}</label>
     <input type="checkbox" name="sound" value="True" align="left" />
     </p>
-    -->
+
 </fieldset>
 
 <p class="input">
index f5889e216398d06c2147d7c4f5b1a3fac5ecf4c9..8ce79687a3d7e910466ad862bcb4ee91985fd063 100644 (file)
@@ -287,6 +287,9 @@ class GeneralView(object):
                 collections.by_publish_year(int(value), int(input.get('pub_year_to', value))), 
                 items.by_publish_year(int(value), int(input.get('pub_year_to', value)))),
             'pub_year_to': lambda value: (collections, items),
+            'sound': lambda value: (
+                collections.sound(),
+                items.sound()),
         }
        
         for key, value in input.items():