[open-ils-commits] r893 - conifer/branches/rel_1_6_0/circ (kbeswick)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jun 11 12:18:06 EDT 2010
Author: kbeswick
Date: 2010-06-11 12:18:03 -0400 (Fri, 11 Jun 2010)
New Revision: 893
Modified:
conifer/branches/rel_1_6_0/circ/circ_duration.js
conifer/branches/rel_1_6_0/circ/circ_duration_OWAL.js
conifer/branches/rel_1_6_0/circ/circ_groups.js
conifer/branches/rel_1_6_0/circ/circ_lib.js
conifer/branches/rel_1_6_0/circ/circ_permit_copy.js
Log:
Add categories 'Alumni' , 'College Students' and 'High School Students'. Give them same circ rules as Readers category. In reference to
Conifer ticket #284
Modified: conifer/branches/rel_1_6_0/circ/circ_duration.js
===================================================================
--- conifer/branches/rel_1_6_0/circ/circ_duration.js 2010-06-11 15:37:36 UTC (rev 892)
+++ conifer/branches/rel_1_6_0/circ/circ_duration.js 2010-06-11 16:18:03 UTC (rev 893)
@@ -76,11 +76,10 @@
if (patronProfile == 'Staff members') {
result.durationRule = '3_weeks_2_renew';
}
-if (patronProfile == 'Readers') {
+if (patronProfile == 'Readers' || patronProfile == 'Alumni' || patronProfile == 'College Students' || patronProfile == 'High School Students') {
result.durationRule = '3_weeks_2_renew';
}
-
log_info('final duration results: ' +
result.durationRule + ' : ' + result.recurringFinesRule + ' : ' + result.maxFine );
Modified: conifer/branches/rel_1_6_0/circ/circ_duration_OWAL.js
===================================================================
--- conifer/branches/rel_1_6_0/circ/circ_duration_OWAL.js 2010-06-11 15:37:36 UTC (rev 892)
+++ conifer/branches/rel_1_6_0/circ/circ_duration_OWAL.js 2010-06-11 16:18:03 UTC (rev 893)
@@ -31,9 +31,9 @@
var temp_array = patronProfile.split(" ");
var profileFirst = temp_array[0];
- if (patronProfile == 'Readers' && patron.home_ou.shortname != 'OWAL') {
+ if ((patronProfile == 'Readers' || patronProfile == 'Alumni' || patronProfile == 'College Students' || patronProfile == 'High School Students') && patron.home_ou.shortname != 'OWAL') {
// use override value - Non-Law Readers can borrow nothing
- } else if (patronProfile == 'Readers' && copy.circ_modifier == 'LAW_MONO') {
+ } else if ((patronProfile == 'Readers' || patronProfile == 'Alumni' || patronProfile == 'College Students' || patronProfile == 'High School Students') && copy.circ_modifier == 'LAW_MONO') {
result.durationRule = 'OWAL_' + profileFirst; // Law Readers can only borrow LAW_MONO items
} else {
switch(copy.circ_modifier) {
Modified: conifer/branches/rel_1_6_0/circ/circ_groups.js
===================================================================
--- conifer/branches/rel_1_6_0/circ/circ_groups.js 2010-06-11 15:37:36 UTC (rev 892)
+++ conifer/branches/rel_1_6_0/circ/circ_groups.js 2010-06-11 16:18:03 UTC (rev 893)
@@ -48,5 +48,23 @@
overdueThreshold : 100,
maxHolds : -1
},
+ 'Alumni' : {
+ maxItemsOut : 15,
+ fineThreshold : 10,
+ overdueThreshold : 100,
+ maxHolds : -1
+ },
+ 'College Students' : {
+ maxItemsOut : 15,
+ fineThreshold : 10,
+ overdueThreshold : 100,
+ maxHolds : -1
+ },
+ 'High School Students' : {
+ maxItemsOut : 15,
+ fineThreshold : 10,
+ overdueThreshold : 100,
+ maxHolds : -1
+ },
}
Modified: conifer/branches/rel_1_6_0/circ/circ_lib.js
===================================================================
--- conifer/branches/rel_1_6_0/circ/circ_lib.js 2010-06-11 15:37:36 UTC (rev 892)
+++ conifer/branches/rel_1_6_0/circ/circ_lib.js 2010-06-11 16:18:03 UTC (rev 893)
@@ -315,7 +315,7 @@
/* custom functions for Windsor libraries */
function isValidPatron(patronProfile) {
- var valid_patrons = ['Faculty', 'Graduate', 'Undergraduate', 'Staff members', 'Readers'];
+ var valid_patrons = ['Faculty', 'Graduate', 'Undergraduate', 'Staff members', 'Readers', 'Alumni', 'College Students', 'High School Students'];
for (var i = 0; i < valid_patrons.length; i++) {
if (valid_patrons[i] == patronProfile) {
return true;
Modified: conifer/branches/rel_1_6_0/circ/circ_permit_copy.js
===================================================================
--- conifer/branches/rel_1_6_0/circ/circ_permit_copy.js 2010-06-11 15:37:36 UTC (rev 892)
+++ conifer/branches/rel_1_6_0/circ/circ_permit_copy.js 2010-06-11 16:18:03 UTC (rev 893)
@@ -87,7 +87,7 @@
if (isValidPatron(patronProfile)) {
// only Law external borrowers can borrow Law items
- if (patronProfile == 'Readers' && patron.home_ou.shortname != 'OWAL') {
+ if ((patronProfile == 'Readers' || patronProfile == 'Alumni' || patronProfile == 'College Students' || patronProfile == 'High School Students') && patron.home_ou.shortname != 'OWAL') {
result.events.push('COPY_CIRC_NOT_ALLOWED');
}
More information about the open-ils-commits
mailing list