add an "All Courses" option to the timeframe menu, for those who don't like it/get it.
authorgfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Wed, 20 Apr 2011 02:58:47 +0000 (02:58 +0000)
committergfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Wed, 20 Apr 2011 02:58:47 +0000 (02:58 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@1406 6d9bc8c9-1ec2-4278-b937-99fde70a366f

conifer/syrup/models.py
conifer/templates/components/timeframe.xhtml

index dc92076..920d3fa 100644 (file)
@@ -221,6 +221,8 @@ class Term(BaseModel):
             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)
         
index c32c282..993ef92 100644 (file)
@@ -15,6 +15,8 @@
     ${opt( 0, _('Active courses'), True)}
     ${opt( 1, _('Starting soon'))}
     ${opt( 2, _('Future courses'))}
+    ${opt( 99, _('&mdash;&mdash;'), True)}
+    ${opt( 99, _('All courses'))}
   </select>
   <script>
   $(function() { $('#timeframe select').change(function () { $('#timeframe')[0].submit(); }); });