From: gfawcett Date: Wed, 29 Dec 2010 15:42:57 +0000 (+0000) Subject: Fix marcxml import problems. No longer show Publisher on item-list view. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4b812d8e735c5d43f09c4c98e7ddb5aad7656810;p=syrup%2Fmasslnc.git Fix marcxml import problems. No longer show Publisher on item-list view. But do show the item source (journal title) if available. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@1146 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/conifer/TODO b/conifer/TODO index 46ece5c..4b223c0 100644 --- a/conifer/TODO +++ b/conifer/TODO @@ -1,6 +1,6 @@ NEW: -* can we clean up the add/edit item code in items.py? +* how should "join this site" be managed? * write up some documentation @@ -19,6 +19,8 @@ IMPORTANT: MAYBE: +* refactor the add/edit item code in items.py + * refactor fuzzyFinder into a Genshi component. * set up a proper issue-tracker? diff --git a/conifer/libsystems/marcxml.py b/conifer/libsystems/marcxml.py index 140f210..9292b0a 100644 --- a/conifer/libsystems/marcxml.py +++ b/conifer/libsystems/marcxml.py @@ -73,9 +73,9 @@ def marcxml_dictionary_to_dc(dct): if value: out[dc] = value - pub = [v.strip() for k,v in sorted(dct.items()) if k.startswith('260')] + pub = [strip_punct(v) for k,v in sorted(dct.items()) if k in ('260a', '260b')] if pub: - out['dc:publisher'] = strip_punct(' '.join(pub)) + out['dc:publisher'] = ': '.join(pub) title = [v.strip() for k,v in sorted(dct.items()) if k in ('245a', '245b')] if title: diff --git a/conifer/syrup/views/items.py b/conifer/syrup/views/items.py index efb6c40..c87b18f 100644 --- a/conifer/syrup/views/items.py +++ b/conifer/syrup/views/items.py @@ -269,7 +269,7 @@ def item_add_cat_search(request, site_id, item_id): pubdate = dublin.get('dc:date') m = re.search('([0-9]+)', pubdate) if m: - pubdate = pubdate.group(1) + pubdate = m.group(1) except: pubdate = '' diff --git a/conifer/templates/components/site.xhtml b/conifer/templates/components/site.xhtml index 5c5721a..fe2d8c3 100644 --- a/conifer/templates/components/site.xhtml +++ b/conifer/templates/components/site.xhtml @@ -57,9 +57,6 @@ searchtext = _('search this site...') (${item.published}). ${item.source_title}. ${item.volume}(${item.issue}), ${item.pages}. - - ${item.publisher}. -
Awaiting copyright clearance: Not available to students.