[open-ils-commits] r1406 - in servres/trunk/conifer: syrup templates/components (gfawcett)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Apr 19 22:58:49 EDT 2011


Author: gfawcett
Date: 2011-04-19 22:58:47 -0400 (Tue, 19 Apr 2011)
New Revision: 1406

Modified:
   servres/trunk/conifer/syrup/models.py
   servres/trunk/conifer/templates/components/timeframe.xhtml
Log:
add an "All Courses" option to the timeframe menu, for those who don't like it/get it.

Modified: servres/trunk/conifer/syrup/models.py
===================================================================
--- servres/trunk/conifer/syrup/models.py	2011-04-20 02:43:39 UTC (rev 1405)
+++ servres/trunk/conifer/syrup/models.py	2011-04-20 02:58:47 UTC (rev 1406)
@@ -221,6 +221,8 @@
             return Q(start_term__start__lte=after, start_term__start__gt=today)
         elif N ==  2:           # all future courses
             return Q(start_term__start__gt=today)
+        elif N == 99:           # no filter at all
+            return Q()
         else:
             raise Exception('unknown timeframe: %d' % N)
         

Modified: servres/trunk/conifer/templates/components/timeframe.xhtml
===================================================================
--- servres/trunk/conifer/templates/components/timeframe.xhtml	2011-04-20 02:43:39 UTC (rev 1405)
+++ servres/trunk/conifer/templates/components/timeframe.xhtml	2011-04-20 02:58:47 UTC (rev 1406)
@@ -15,6 +15,8 @@
     ${opt( 0, _('Active courses'), True)}
     ${opt( 1, _('Starting soon'))}
     ${opt( 2, _('Future courses'))}
+    ${opt( 99, _('——'), True)}
+    ${opt( 99, _('All courses'))}
   </select>
   <script>
   $(function() { $('#timeframe select').change(function () { $('#timeframe')[0].submit(); }); });



More information about the open-ils-commits mailing list