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

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Dec 16 15:54:39 EST 2008


Author: artunit
Date: 2008-12-16 15:54:35 -0500 (Tue, 16 Dec 2008)
New Revision: 84

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


Modified: servres/trunk/conifer/syrup/views.py
===================================================================
--- servres/trunk/conifer/syrup/views.py	2008-12-16 20:05:06 UTC (rev 83)
+++ servres/trunk/conifer/syrup/views.py	2008-12-16 20:54:35 UTC (rev 84)
@@ -158,6 +158,7 @@
     page_num = int(request.GET.get('page', 1))
     count = int(request.GET.get('count', 5))
     norm_query = ''
+    query_string = ''
     
 
     #TODO: need to block or do something useful with blank query (seems dumb to do entire list)
@@ -188,7 +189,6 @@
         instructor_list = models.Member.objects.filter(instr_query).filter(role='INSTR').order_by('user__last_name')[0:5]
         instr_len = len(models.Member.objects.filter(instr_query).filter(role='INSTR'))
     else:
-        query_string = 'no query specified'
         paginator = Paginator( models.Item.objects.order_by('-date_created'),
             count)
         course_list = models.Course.objects.filter(active=True).order_by('title')[0:5]

Modified: servres/trunk/conifer/templates/search_results.xhtml
===================================================================
--- servres/trunk/conifer/templates/search_results.xhtml	2008-12-16 20:05:06 UTC (rev 83)
+++ servres/trunk/conifer/templates/search_results.xhtml	2008-12-16 20:54:35 UTC (rev 84)
@@ -15,8 +15,12 @@
   </script>
 </head>
 <body>
-  <h1>${title}</h1>
-    <h3>You searched: <i>${query_string}</i></h3>
+<h1>${title}</h1>
+    
+<h3 py:if="query_string">
+    You searched: <i>${query_string}</i>
+</h3>
+
     <p style="font-size: large;">
         No. of instructors: <i> ${instr_len}</i>
     </p>



More information about the open-ils-commits mailing list