[open-ils-commits] r925 - in servres/trunk/conifer: syrup/views templates/item (gfawcett)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Jul 16 11:39:52 EDT 2010


Author: gfawcett
Date: 2010-07-16 11:39:49 -0400 (Fri, 16 Jul 2010)
New Revision: 925

Modified:
   servres/trunk/conifer/syrup/views/_common.py
   servres/trunk/conifer/syrup/views/genshi_namespace.py
   servres/trunk/conifer/templates/item/item_metadata.xhtml
Log:
a few minor bug fixes.

Modified: servres/trunk/conifer/syrup/views/_common.py
===================================================================
--- servres/trunk/conifer/syrup/views/_common.py	2010-07-15 00:56:53 UTC (rev 924)
+++ servres/trunk/conifer/syrup/views/_common.py	2010-07-16 15:39:49 UTC (rev 925)
@@ -20,7 +20,7 @@
 import warnings
 import pdb
 
-from conifer.integration.hooksystem import gethook, callhook, callhook_required
+from conifer.plumbing.hooksystem    import gethook, callhook, callhook_required
 from conifer.syrup                  import models
 from datetime                       import datetime
 from django.contrib.auth            import authenticate, login, logout
@@ -41,6 +41,7 @@
 from conifer.libsystems.marcxml     import (marcxml_to_dictionary,
                                             marcxml_dictionary_to_dc)
 
+from django.utils.translation       import ugettext as _
 
 #-----------------------------------------------------------------------------
 # Authorization
@@ -49,7 +50,9 @@
     if request.user.is_anonymous():
         # then take them to login screen....
         dest = (request.META['SCRIPT_NAME'] + \
-                    '/accounts/login/?next=' + request.META['PATH_INFO'])
+                    '/accounts/login/?next=%s%s' % (
+                request.META['SCRIPT_NAME'],
+                request.META['PATH_INFO']))
         return HttpResponseRedirect(dest)
     else:
         return simple_message(_('Access denied.'), message,

Modified: servres/trunk/conifer/syrup/views/genshi_namespace.py
===================================================================
--- servres/trunk/conifer/syrup/views/genshi_namespace.py	2010-07-15 00:56:53 UTC (rev 924)
+++ servres/trunk/conifer/syrup/views/genshi_namespace.py	2010-07-16 15:39:49 UTC (rev 925)
@@ -11,8 +11,8 @@
 import itertools
 import urllib
 
-from conifer.integration.hooksystem import gethook, callhook
-from conifer.syrup                  import models
-from django.utils                   import translation
+from conifer.plumbing.hooksystem import gethook, callhook
+from conifer.syrup               import models
+from django.utils                import translation
 
 _ = translation.ugettext

Modified: servres/trunk/conifer/templates/item/item_metadata.xhtml
===================================================================
--- servres/trunk/conifer/templates/item/item_metadata.xhtml	2010-07-15 00:56:53 UTC (rev 924)
+++ servres/trunk/conifer/templates/item/item_metadata.xhtml	2010-07-16 15:39:49 UTC (rev 925)
@@ -35,7 +35,7 @@
       <tr><th>Title</th><td>${item.title}</td></tr>
       <tr py:if="item.author"><th>Author</th><td>${item.author}</td></tr>
       <tr py:if="item.publisher"><th>Publisher</th><td>${item.publisher}</td></tr>
-      <tr py:if="item.published"><th>Published</th><td>${item.published and item.published.year}</td></tr>
+      <tr py:if="item.published"><th>Published</th><td>${item.published}</td></tr>
       <tr><th>Type</th><td>${item.get_item_type_display()}</td></tr>
       <tr py:if="item.item_type=='PHYS'"
 	  py:with="avail, status = item.describe_physical_item_status()">



More information about the open-ils-commits mailing list