From 072812063ec24909f916034ad2fac50d87b07415 Mon Sep 17 00:00:00 2001 From: Art Rhyno Date: Wed, 27 Jul 2011 08:27:05 -0400 Subject: [PATCH] Added additional scoping options for status displays. Signed-off-by: Art Rhyno --- conifer/integration/evergreen_site.py | 6 ++++-- conifer/local_settings.py.example | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/conifer/integration/evergreen_site.py b/conifer/integration/evergreen_site.py index c6fa1f2..e3bb28a 100644 --- a/conifer/integration/evergreen_site.py +++ b/conifer/integration/evergreen_site.py @@ -105,6 +105,9 @@ class EvergreenIntegration(object): USE_Z3950 = bool(getattr(settings, 'Z3950_CONFIG', None)) + EVERGREEN_STATUS_ORG = getattr(settings, 'EVERGREEN_STATUS_ORG', 1) + EVERGREEN_STATUS_DEPTH = getattr(settings, 'EVERGREEN_STATUS_DEPTH', 0) + TIME_FORMAT = getattr(settings, 'SYRUP_TIME_FORMAT', '%Y-%m-%dT%H:%M:%S') DUE_FORMAT = getattr(settings, 'SYRUP_DUE_FORMAT', '%b %d %Y, %r') @@ -114,7 +117,6 @@ class EvergreenIntegration(object): IS_ATTACHMENT = re.compile(ATTACHMENT_EXPRESSION) # Used if you're doing updates to Evergreen from Syrup. - UPDATE_CHOICES = [ ('One', 'Syrup only'), ('Cat', 'Catalogue'), @@ -320,7 +322,7 @@ class EvergreenIntegration(object): circmod = '' alldues = [] - counts = E1(OPENSRF_COPY_COUNTS, bib_id, 1, 0) + counts = E1(OPENSRF_COPY_COUNTS, bib_id, EVERGREEN_STATUS_ORG, EVERGREEN_STATUS_DEPTH) version = getattr(settings, 'EVERGREEN_VERSION', 2.0) diff --git a/conifer/local_settings.py.example b/conifer/local_settings.py.example index ca763ce..5da4081 100644 --- a/conifer/local_settings.py.example +++ b/conifer/local_settings.py.example @@ -57,6 +57,9 @@ SYRUP_TIME_FORMAT = '%Y-%m-%dT%H:%M:%S' SYRUP_DUE_FORMAT = '%b %d %Y, %r' ATTACHMENT_REGEXP ='\w*DVD\s?|\w*CD\s?|\w[Gg]uide\s?|\w[Bb]ooklet\s?|\w*CD\-ROM\s?' MIN_QUERY_LENGTH = 3 +# Set these for limiting options for status displays +#EVERGREEN_STATUS_ORG = 28 +#EVERGREEN_STATUS_DEPTH = 1 # Note, in the Evergreen integration, commenting out Z3950_CONFIG or setting it # equal to None will result in OpenSRF being used for catalogue search instead -- 2.11.0