[open-ils-commits] r636 - conifer/trunk/circ (risard)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Sep 1 15:18:18 EDT 2009
Author: risard
Date: 2009-09-01 15:18:13 -0400 (Tue, 01 Sep 2009)
New Revision: 636
Modified:
conifer/trunk/circ/circ_permit_copy.js
Log:
added algoma to circ_permit_copy.js
Modified: conifer/trunk/circ/circ_permit_copy.js
===================================================================
--- conifer/trunk/circ/circ_permit_copy.js 2009-08-26 15:46:03 UTC (rev 635)
+++ conifer/trunk/circ/circ_permit_copy.js 2009-09-01 19:18:13 UTC (rev 636)
@@ -8,7 +8,8 @@
var lusys = ['LUSYS', 'CRC', 'HUNTINGTON', 'LDCR', 'MRC', 'OSUL', 'MEDIACEN', 'SUDBURY'];
var hearstsys = ['HEARSTSYS', 'HEARST', 'KAP', 'TIMMINS'];
var nosmsys = ['OSM', 'NOSME', 'NOSMW'];
-var winsys = ['OWA', 'OWAL'];
+var winsys = ['OWA', 'OWAL'];
+var algsys = ['OSTMA']; /* looks silly but we do plan to add one or two branches during the winter term */
/* In theory, isOrgDescendent would work - but it isn't, for some reason */
if (patron.home_ou.id != copy.circ_lib.id) {
@@ -111,7 +112,37 @@
result.events.push('COPY_CIRC_NOT_ALLOWED'); // would prefer this to push a "Check Patron Profile" message
}
} // end permissions for Windsor Law
+
+/*******************************
+ PERMIT FOR ALGOMA
+********************************/
+
+if (copy.circ_lib.shortname == 'OSTMA') {
+ if (isValidPatron(patronProfile)) {
+
+ if (copy.location == 'ALGO-SHWK') ||
+ (copy.location == 'ALGO-REF') ||
+ (copy.location == 'ALGO-PER') ||
+ (copy.location == 'ALGO-DOC')
+ {
+ result.events.push('COPY_CIRC_NOT_ALLOWED');
+ }
+ }
+
+
+ if ( !(patronProfile == 'Faculty') && (copy.location == 'ALGO-AV') {
+ result.events.push('COPY_CIRC_NOT_ALLOWED');
+ }
+
+}
+
+
+/*******************************
+ END -- PERMIT FOR ALGOMA
+********************************/
+
+
if( ! isTrue(isRenewal) ) {
if(copyStatus != 'Available' &&
copyStatus != 'On holds shelf' && copyStatus != 'Reshelving' ) {
More information about the open-ils-commits
mailing list