From 2f151a6b6f22b202f427fca2124b6a4e6c61225a Mon Sep 17 00:00:00 2001 From: artunit Date: Wed, 27 Apr 2011 19:59:04 +0000 Subject: [PATCH] added notes field for item git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@1425 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/integration/uwindsor.py | 5 +++-- conifer/syrup/models.py | 2 ++ conifer/syrup/views/items.py | 1 + conifer/templates/item/common_metadata.xhtml | 1 + conifer/templates/item/item_metadata.xhtml | 1 + 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/conifer/integration/uwindsor.py b/conifer/integration/uwindsor.py index 2f8d5e4..d568093 100644 --- a/conifer/integration/uwindsor.py +++ b/conifer/integration/uwindsor.py @@ -100,8 +100,9 @@ class UWindsorIntegration(EvergreenIntegration): 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): diff --git a/conifer/syrup/models.py b/conifer/syrup/models.py index 920d3fa..f65b7d0 100644 --- a/conifer/syrup/models.py +++ b/conifer/syrup/models.py @@ -752,6 +752,8 @@ class Item(BaseModel): 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'] diff --git a/conifer/syrup/views/items.py b/conifer/syrup/views/items.py index d366969..01a5527 100644 --- a/conifer/syrup/views/items.py +++ b/conifer/syrup/views/items.py @@ -179,6 +179,7 @@ def item_add(request, site_id, item_id): issue=clean('issue'), pages=clean('pages'), isbn=clean('isbn'), + itemnotes=clean('itemnotes'), ) item.save() elif item_type == 'ELEC': diff --git a/conifer/templates/item/common_metadata.xhtml b/conifer/templates/item/common_metadata.xhtml index 7279f24..9299b98 100644 --- a/conifer/templates/item/common_metadata.xhtml +++ b/conifer/templates/item/common_metadata.xhtml @@ -24,6 +24,7 @@ if len(authors) < 2: Pages ISBN Bib Id of Item + Item Notes Copyright Status diff --git a/conifer/templates/item/item_metadata.xhtml b/conifer/templates/item/item_metadata.xhtml index a81c721..a90c36e 100644 --- a/conifer/templates/item/item_metadata.xhtml +++ b/conifer/templates/item/item_metadata.xhtml @@ -52,6 +52,7 @@ callnum = item.call_number() Issue${item.issue} Pages${item.pages} ISBN${item.isbn} + Notes${item.itemnotes} -- 2.11.0