[open-ils-commits] r196 - in servres/trunk/conifer: syrup templates/admin (artunit)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 17 13:39:10 EDT 2009


Author: artunit
Date: 2009-03-17 13:39:07 -0400 (Tue, 17 Mar 2009)
New Revision: 196

Modified:
   servres/trunk/conifer/syrup/urls.py
   servres/trunk/conifer/syrup/views.py
   servres/trunk/conifer/templates/admin/index.xhtml
Log:
removed extraneous admin entry point for courses and items

Modified: servres/trunk/conifer/syrup/urls.py
===================================================================
--- servres/trunk/conifer/syrup/urls.py	2009-03-17 14:58:30 UTC (rev 195)
+++ servres/trunk/conifer/syrup/urls.py	2009-03-17 17:39:07 UTC (rev 196)
@@ -36,8 +36,6 @@
     (ITEM_PREFIX + r'add/$', 'item_add'), # for adding sub-things
     (r'^admin/$', 'admin_index'),
     (r'^admin/terms/' + GENERIC_REGEX, 'admin_terms'),
-    (r'^admin/courses/' + GENERIC_REGEX, 'admin_courses'),
-    (r'^admin/items/' + GENERIC_REGEX, 'admin_items'),
     (r'^admin/depts/' + GENERIC_REGEX, 'admin_depts'),
     (r'^admin/news/' + GENERIC_REGEX, 'admin_news'),
     (r'^admin/targets/' + GENERIC_REGEX, 'admin_targets'),

Modified: servres/trunk/conifer/syrup/views.py
===================================================================
--- servres/trunk/conifer/syrup/views.py	2009-03-17 14:58:30 UTC (rev 195)
+++ servres/trunk/conifer/syrup/views.py	2009-03-17 17:39:07 UTC (rev 196)
@@ -838,7 +838,6 @@
         print("results are %d" % len(res))
         collector = [(None,None)] * len(res)
 
-        # we fudge this since it has more overhead 
         start = (page_num - 1) * count
         end = (page_num * count) + 1
 
@@ -880,7 +879,8 @@
                 #collector.append ((bibid, unicode(title, 'ascii', 'ignore')))
 
                 collector.pop(idx)
-                collector.insert (idx,(bibid, unicode(title, 'ascii', 'ignore')))
+                # collector.insert (idx,(bibid, unicode(title, 'ascii', 'ignore')))
+                collector.insert (idx,(bibid, unicode(title, 'utf-8', 'ignore')))
             idx+=1
 
         conn.close ()
@@ -942,36 +942,6 @@
 ###
 # graham - zap this if it messes anything up :-)
 ###
-class CourseForm(ModelForm):
-    class Meta:
-        model = models.Course
-
-    class Index:
-        title = _('Courses')
-        all   = models.Course.objects.order_by('code').all
-        cols  = ['code', 'title']
-        links = [0,1]
-
-    clean_code = strip_and_nonblank('code')
-    clean_title = strip_and_nonblank('title')
-
-admin_courses = generic_handler(CourseForm, decorator=admin_only)
-
-class ItemForm(ModelForm):
-    class Meta:
-        model = models.Item
-
-    class Index:
-        title = _('Items')
-        all   = models.Item.objects.order_by('title').all
-        cols  = ['title', 'author']
-        links = [0,1]
-
-    clean_title = strip_and_nonblank('title')
-    clean_author = strip_and_nonblank('author')
-
-admin_items = generic_handler(ItemForm, decorator=admin_only)
-
 class TargetForm(ModelForm):
     class Meta:
         model = models.Target

Modified: servres/trunk/conifer/templates/admin/index.xhtml
===================================================================
--- servres/trunk/conifer/templates/admin/index.xhtml	2009-03-17 14:58:30 UTC (rev 195)
+++ servres/trunk/conifer/templates/admin/index.xhtml	2009-03-17 17:39:07 UTC (rev 196)
@@ -17,12 +17,10 @@
     <li><a href="terms/">Terms</a></li>
     <li><a href="depts/">Departments</a></li>
     <li><a href="courses/">Courses</a></li>
-    <li><a href="items/">Items</a></li>
     <li><a href="news/">News Items</a></li>
   </ul>
   <ul>
     <li><a href="targets/">Manage Z39.50 Targets</a></li>
-    <!-- not sure if this is an admin option yet -->
     <li><a href="../zsearch/">Search Z39.50 Targets</a></li>
   </ul>
 </body>



More information about the open-ils-commits mailing list