[open-ils-commits] r1425 - in servres/trunk/conifer: integration syrup syrup/views templates/item (artunit)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Apr 27 15:59:09 EDT 2011


Author: artunit
Date: 2011-04-27 15:59:04 -0400 (Wed, 27 Apr 2011)
New Revision: 1425

Modified:
   servres/trunk/conifer/integration/uwindsor.py
   servres/trunk/conifer/syrup/models.py
   servres/trunk/conifer/syrup/views/items.py
   servres/trunk/conifer/templates/item/common_metadata.xhtml
   servres/trunk/conifer/templates/item/item_metadata.xhtml
Log:
added notes field for item

Modified: servres/trunk/conifer/integration/uwindsor.py
===================================================================
--- servres/trunk/conifer/integration/uwindsor.py	2011-04-27 13:41:08 UTC (rev 1424)
+++ servres/trunk/conifer/integration/uwindsor.py	2011-04-27 19:59:04 UTC (rev 1425)
@@ -100,8 +100,9 @@
            return []
  
         memberships = self._campus_info('membership_ids', userid)
-        for m in memberships:
-            m['role'] = self._decode_role(m['role'])
+        if memberships:
+            for m in memberships:
+                m['role'] = self._decode_role(m['role'])
         return memberships
 
     def _decode_role(self, role):

Modified: servres/trunk/conifer/syrup/models.py
===================================================================
--- servres/trunk/conifer/syrup/models.py	2011-04-27 13:41:08 UTC (rev 1424)
+++ servres/trunk/conifer/syrup/models.py	2011-04-27 19:59:04 UTC (rev 1425)
@@ -752,7 +752,9 @@
     fileobj_origname = m.CharField(max_length=2048, blank=True, null=True)
     fileobj_mimetype = m.CharField(max_length=128, blank=True, null=True)
 
+    itemnotes = m.TextField('Item Notes', blank=True, null=True)
 
+
     class Meta:
         ordering = ['title', 'author', 'published']
 

Modified: servres/trunk/conifer/syrup/views/items.py
===================================================================
--- servres/trunk/conifer/syrup/views/items.py	2011-04-27 13:41:08 UTC (rev 1424)
+++ servres/trunk/conifer/syrup/views/items.py	2011-04-27 19:59:04 UTC (rev 1425)
@@ -179,6 +179,7 @@
                     issue=clean('issue'),
                     pages=clean('pages'),
                     isbn=clean('isbn'),
+                    itemnotes=clean('itemnotes'),
                     )
                 item.save()
         elif item_type == 'ELEC':

Modified: servres/trunk/conifer/templates/item/common_metadata.xhtml
===================================================================
--- servres/trunk/conifer/templates/item/common_metadata.xhtml	2011-04-27 13:41:08 UTC (rev 1424)
+++ servres/trunk/conifer/templates/item/common_metadata.xhtml	2011-04-27 19:59:04 UTC (rev 1425)
@@ -24,6 +24,7 @@
       <tr><th>Pages</th><td><input type="text" name="pages" value="${item.pages}"/></td></tr>
       <tr><th>ISBN</th><td><input type="text" name="isbn" value="${item.isbn}"/></td></tr>
       <tr><th>Bib Id of Item</th><td><input type="text" name="bib_id" value="${item.bib_id}"/></td></tr>
+      <tr><th>Item Notes</th><td><textarea rows="3" name="itemnotes">${item.itemnotes}</textarea></td></tr>
       <tr py:if="user.is_staff and item.item_type == 'ELEC'">
 	<th>Copyright Status</th>
 	<td>

Modified: servres/trunk/conifer/templates/item/item_metadata.xhtml
===================================================================
--- servres/trunk/conifer/templates/item/item_metadata.xhtml	2011-04-27 13:41:08 UTC (rev 1424)
+++ servres/trunk/conifer/templates/item/item_metadata.xhtml	2011-04-27 19:59:04 UTC (rev 1425)
@@ -52,6 +52,7 @@
       <tr py:if="item.issue"><th>Issue</th><td>${item.issue}</td></tr>
       <tr py:if="item.pages"><th>Pages</th><td>${item.pages}</td></tr>
       <tr py:if="item.isbn"><th>ISBN</th><td>${item.isbn}</td></tr>
+      <tr py:if="item.itemnotes"><th>Notes</th><td>${item.itemnotes}</td></tr>
       <!--
       <tr py:if="callnum"><th>Call Number</th><td>${callnum}</td></tr>
       -->



More information about the open-ils-commits mailing list