git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@93 6d9bc8c9-1ec2-4278...
authorartunit <artunit@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Mon, 5 Jan 2009 02:52:07 +0000 (02:52 +0000)
committerartunit <artunit@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Mon, 5 Jan 2009 02:52:07 +0000 (02:52 +0000)
conifer/syrup/views.py
conifer/templates/master.xhtml

index 6db0546..5f6571b 100644 (file)
@@ -66,6 +66,29 @@ def join_course(request):
     return g.render('join_course.xhtml')
 
 def browse_courses(request, browse_option=''):
+    page_num = int(request.GET.get('page', 1))
+    count = int(request.GET.get('count', 5))
+
+    if browse_option == 'instructors':
+        paginator = Paginator(models.UserProfile.active_instructors(), count)
+
+        return g.render('instructors.xhtml', paginator=paginator,
+            page_num=page_num,
+            count=count)
+
+    elif browse_option == 'departments':
+        paginator = Paginator(models.UserProfile.active_instructors(), count)
+
+        return g.render('instructors.xhtml', paginator=paginator,
+            page_num=page_num,
+            count=count)
+    elif browse_option == 'courses':
+        paginator = Paginator(models.UserProfile.active_instructors(), count)
+
+        return g.render('instructors.xhtml', paginator=paginator,
+            page_num=page_num,
+            count=count)
+
     return g.render('browse_courses.xhtml')
 
 @login_required
index b6f6046..fecc1e1 100644 (file)
@@ -52,7 +52,18 @@ app_name = 'Syrup E-Reserve System'
        ${select('*|text()')}
       </div>
       <div id="footer">
-       <div>&copy; 2008, <a href="http://conifer.mcmaster.ca/">Project Conifer</a></div>
+       <div> 
+    <!--
+        We may eventually have a tab bar for non authenticated users,
+        but we definitely need a start over option for now. There is
+        probably a more elegant way of detecting whether we are on
+        the front page but this works for the short term
+    -->
+    <span py:if="not request.META.PATH_INFO == '/syrup/'">
+        <a href="/syrup">Start Over</a>  -
+    </span>
+    Syrup is a subproject of <a href="http://conifer.mcmaster.ca/">Project Conifer</a> &copy; 2008
+    </div>
       </div>
     </body>
   </py:match>