added algoma to circ_permit_copy.js
authorrisard <risard@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Tue, 1 Sep 2009 19:18:13 +0000 (19:18 +0000)
committerrisard <risard@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Tue, 1 Sep 2009 19:18:13 +0000 (19:18 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/trunk@636 6d9bc8c9-1ec2-4278-b937-99fde70a366f

circ/circ_permit_copy.js

index 530adfa..f6ec2ae 100644 (file)
@@ -8,7 +8,8 @@ log_vars('circ_permit_copy');
 var lusys = ['LUSYS', 'CRC', 'HUNTINGTON', 'LDCR', 'MRC', 'OSUL', 'MEDIACEN', 'SUDBURY'];\r
 var hearstsys = ['HEARSTSYS', 'HEARST', 'KAP', 'TIMMINS'];\r
 var nosmsys = ['OSM', 'NOSME', 'NOSMW'];\r
-var winsys = ['OWA', 'OWAL'];\r
+var winsys = ['OWA', 'OWAL'];
+var algsys = ['OSTMA']; /* looks silly but we do plan to add one or two branches during the winter term */\r
 \r
 /* In theory, isOrgDescendent would work - but it isn't, for some reason */\r
 if (patron.home_ou.id != copy.circ_lib.id) {\r
@@ -111,6 +112,36 @@ if (copy.circ_lib.shortname == 'OWAL') {
                result.events.push('COPY_CIRC_NOT_ALLOWED'); // would prefer this to push a "Check Patron Profile" message\r
        }\r
 } // end permissions for Windsor Law\r
+
+/*******************************
+   PERMIT FOR ALGOMA
+********************************/
+
+if (copy.circ_lib.shortname == 'OSTMA') {\r
+\r
+       if (isValidPatron(patronProfile)) {
+
+               if (copy.location == 'ALGO-SHWK') ||\r
+                  (copy.location == 'ALGO-REF') ||\r
+                  (copy.location == 'ALGO-PER') ||\r
+                  (copy.location == 'ALGO-DOC')\r
+               {\r
+                       result.events.push('COPY_CIRC_NOT_ALLOWED');\r
+               }
+        } 
+
+
+       if ( !(patronProfile == 'Faculty') && (copy.location == 'ALGO-AV') {
+               result.events.push('COPY_CIRC_NOT_ALLOWED');            
+       }
+
+}
+
+
+/*******************************
+   END -- PERMIT FOR ALGOMA
+********************************/
+
 \r
 if( ! isTrue(isRenewal) ) {\r
        if(copyStatus != 'Available' && \r