Added additional scoping options for status displays.
authorArt Rhyno <art632000@yahoo.ca>
Wed, 27 Jul 2011 12:27:05 +0000 (08:27 -0400)
committerArt Rhyno <art632000@yahoo.ca>
Wed, 27 Jul 2011 12:27:05 +0000 (08:27 -0400)
Signed-off-by: Art Rhyno <art632000@yahoo.ca>
conifer/integration/evergreen_site.py
conifer/local_settings.py.example

index c6fa1f2..e3bb28a 100644 (file)
@@ -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)
index ca763ce..5da4081 100644 (file)
@@ -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