From 6ce74d84ff349ed6c0061f4e61655071394a59fe Mon Sep 17 00:00:00 2001 From: Art Rhyno Date: Sat, 9 Jul 2011 19:20:43 -0400 Subject: [PATCH] More handling for call no prefix/suffix parms. Signed-off-by: Art Rhyno --- conifer/integration/evergreen_site.py | 15 ++++++++++++--- conifer/syrup/views/sites.py | 1 + conifer/templates/components/site.xhtml | 26 +++++++++++++++++++------- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/conifer/integration/evergreen_site.py b/conifer/integration/evergreen_site.py index 284a41e..e822933 100644 --- a/conifer/integration/evergreen_site.py +++ b/conifer/integration/evergreen_site.py @@ -169,7 +169,7 @@ class EvergreenIntegration(object): @memoize(timeout=CACHE_TIME) def _item_status(self, bib_id): def sort_out_status(counts, version, sort_lib, sort_desk, sort_avail, - sort_callno, sort_dueinfo, sort_circmod, sort_alldues): + sort_callno, sort_dueinfo, sort_circmod, sort_alldues, prefix, suffix): lib = sort_lib desk = sort_desk @@ -189,6 +189,11 @@ class EvergreenIntegration(object): callsuffix = '' if len(callno) == 0: callno = callnum + + if prefix: + callno = prefix + callno + if suffix: + callno = callno + suffix avail_here = stats.get(self.AVAILABLE, 0) avail_here += stats.get(self.RESHELVING, 0) anystatus_here = sum(stats.values()) @@ -328,9 +333,13 @@ class EvergreenIntegration(object): #TODO: clean this up, a hackish workaround for now if version >= 2.1: - for org, skip1, callnum, skip2, loc, stats in counts: + for org, prefix, callnum, suffix, loc, stats in counts: + if len(prefix) > 0: + prefix += ' ' + if len(suffix) > 0: + suffix = ' ' + suffix lib, desk, avail, callno, dueinfo, circmod, alldues = sort_out_status(counts, - version, lib, desk, avail, callno, dueinfo, circmod, alldues) + version, lib, desk, avail, callno, dueinfo, circmod, alldues, prefix, suffix) else: for org, callnum, loc, stats in counts: lib, desk, avail, callno, dueinfo, circmod, alldues = sort_out_status(counts, diff --git a/conifer/syrup/views/sites.py b/conifer/syrup/views/sites.py index 2efc4f4..0a1736c 100644 --- a/conifer/syrup/views/sites.py +++ b/conifer/syrup/views/sites.py @@ -283,6 +283,7 @@ def _revert_parms(request, source_site): if barcode and orig_call and orig_desk and orig_modifier: update_status = opensrf.ils_item_update(barcode, orig_prefix, orig_call, orig_suffix, orig_modifier, orig_desk) + # print "update_status", update_status if update_status: for sub in subitems: revert_item(parent, sub) diff --git a/conifer/templates/components/site.xhtml b/conifer/templates/components/site.xhtml index 90ccff6..3b1e482 100644 --- a/conifer/templates/components/site.xhtml +++ b/conifer/templates/components/site.xhtml @@ -118,12 +118,24 @@ searchtext = _('search this site...') ${item.source_title}. ${item.volume}(${item.issue}), ${item.pages}.
- Source: - ${item.circ_modifier}, - ${item.orig_prefix}, - ${item.orig_callno}, - ${item.orig_suffix}, - desk - ${item.circ_desk} + Revert Parms: + + + ${v} + + + ${item.orig_callno} + + + ${v} + + + (${item.circ_modifier}) + + + ${v} + +
Awaiting copyright clearance: Not available to students.
@@ -140,7 +152,7 @@ searchtext = _('search this site...') - + ${show_tree(subs, edit)} -- 2.11.0