[open-ils-commits] r66 - servres/trunk/conifer/syrup
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Nov 28 16:13:05 EST 2008
Author: artunit
Date: 2008-11-28 16:13:01 -0500 (Fri, 28 Nov 2008)
New Revision: 66
Modified:
servres/trunk/conifer/syrup/views.py
Log:
Modified: servres/trunk/conifer/syrup/views.py
===================================================================
--- servres/trunk/conifer/syrup/views.py 2008-11-28 14:59:23 UTC (rev 65)
+++ servres/trunk/conifer/syrup/views.py 2008-11-28 21:13:01 UTC (rev 66)
@@ -149,11 +149,13 @@
count = int(request.GET.get('count', 5))
if ('q' in request.GET) and request.GET['q'].strip():
query_string = request.GET['q']
- entry_query = get_query(query_string, ['title', 'author', 'course__title', 'course__department__name',])
- paginator = Paginator( models.Item.objects.filter(entry_query).order_by('-date_created'),
+ entry_query = get_query(query_string, ['title', 'author', 'course__title', 'course__department__name'])
+ instr_query = get_query(query_string, ['user__last_name'])
+ paginator = Paginator( models.Item.objects.filter(entry_query).order_by('-date_created'),
count)
+ instructor_list = models.Member.objects.filter(instr_query).filter(role='INSTR').order_by('-user__last_name')
return g.render('search_results.xhtml', paginator=paginator,
page_num=page_num,
- count=count, query_string=query_string)
+ count=count, query_string=query_string, instructor_list=instructor_list)
More information about the open-ils-commits
mailing list