From: artunit Date: Tue, 6 Jan 2009 03:09:44 +0000 (+0000) Subject: git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@94 6d9bc8c9-1ec2-4278... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=64b3fd13871ba1a43ed71b8a6de3497d9c22c1d0;p=Syrup.git git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@94 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/conifer/syrup/views.py b/conifer/syrup/views.py index 5f6571b..b273404 100644 --- a/conifer/syrup/views.py +++ b/conifer/syrup/views.py @@ -66,6 +66,7 @@ def join_course(request): return g.render('join_course.xhtml') def browse_courses(request, browse_option=''): + #the defaults should be moved into a config file or something... page_num = int(request.GET.get('page', 1)) count = int(request.GET.get('count', 5)) @@ -77,15 +78,15 @@ def browse_courses(request, browse_option=''): count=count) elif browse_option == 'departments': - paginator = Paginator(models.UserProfile.active_instructors(), count) + paginator = Paginator(models.Department.objects.filter(active=True), count) - return g.render('instructors.xhtml', paginator=paginator, + return g.render('departments.xhtml', paginator=paginator, page_num=page_num, count=count) elif browse_option == 'courses': - paginator = Paginator(models.UserProfile.active_instructors(), count) + paginator = Paginator(models.Course.objects.filter(active=True), count) - return g.render('instructors.xhtml', paginator=paginator, + return g.render('courses.xhtml', paginator=paginator, page_num=page_num, count=count) @@ -137,7 +138,6 @@ def _heading_detail(request, item): """Display a heading. Show the subitems for this heading.""" return g.render('item_heading_detail.xhtml', item=item) - def normalize_query(query_string, findterms=re.compile(r'"([^"]+)"|(\S+)').findall, normspace=re.compile(r'\s{2,}').sub): diff --git a/conifer/templates/master.xhtml b/conifer/templates/master.xhtml index fecc1e1..c9d715d 100644 --- a/conifer/templates/master.xhtml +++ b/conifer/templates/master.xhtml @@ -59,7 +59,7 @@ app_name = 'Syrup E-Reserve System' probably a more elegant way of detecting whether we are on the front page but this works for the short term --> - + Start Over - Syrup is a subproject of Project Conifer © 2008