[open-ils-commits] r93 - in servres/trunk/conifer: syrup templates

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Jan 4 21:52:09 EST 2009


Author: artunit
Date: 2009-01-04 21:52:07 -0500 (Sun, 04 Jan 2009)
New Revision: 93

Modified:
   servres/trunk/conifer/syrup/views.py
   servres/trunk/conifer/templates/master.xhtml
Log:


Modified: servres/trunk/conifer/syrup/views.py
===================================================================
--- servres/trunk/conifer/syrup/views.py	2009-01-05 01:47:18 UTC (rev 92)
+++ servres/trunk/conifer/syrup/views.py	2009-01-05 02:52:07 UTC (rev 93)
@@ -66,6 +66,29 @@
     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

Modified: servres/trunk/conifer/templates/master.xhtml
===================================================================
--- servres/trunk/conifer/templates/master.xhtml	2009-01-05 01:47:18 UTC (rev 92)
+++ servres/trunk/conifer/templates/master.xhtml	2009-01-05 02:52:07 UTC (rev 93)
@@ -52,7 +52,18 @@
 	${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>



More information about the open-ils-commits mailing list