From fe3df3f510de88b2f2086d5b892a23615fc81829 Mon Sep 17 00:00:00 2001 From: risard Date: Wed, 26 Aug 2009 14:09:32 +0000 Subject: [PATCH] added reserves link to algoma footer git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/trunk@634 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- circ/circ_duration_OSTMA.js | 48 ++++++++++++++++++++++++++++++++++ web/opac/locale/en-CA/opac_conifer.dtd | 2 ++ web/opac/locale/en-US/opac_conifer.dtd | 2 ++ web/opac/skin/algoma/xml/footer.xml | 26 ++++++++++++++---- 4 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 circ/circ_duration_OSTMA.js diff --git a/circ/circ_duration_OSTMA.js b/circ/circ_duration_OSTMA.js new file mode 100644 index 0000000000..7e35bee1df --- /dev/null +++ b/circ/circ_duration_OSTMA.js @@ -0,0 +1,48 @@ +/* grab the config from the config script */ +var config = getItemConfig(); +var itemForm = (marcXMLDoc) ? extractFixedField(marcXMLDoc,'Form') : ""; + + +/* Set the defaults for books for most patron types */ +result.durationRule = '3_weeks_2_renew'; +result.recurringFinesRule = '50_cent_per_day'; +result.maxFine = '10_dollars'; + + +/*Set the exceptions for regular books*/ +/* FACULTY */ +if (patronProfile == 'Faculty'){ + result.durationRule = '120_days_0_renew'; +} + +/*Set exceptions for other materials*/ + +/* AV MATERIALS */ +if (copy.circ_modifier == 'AUDIO' || 'VIDEO' || 'DVD VIDEO' && patronProfile == 'Faculty'){ + result.durationRule = '14_days_0_renew'; + result.recurringFinesRule = '2_dollars_per_day'; + result.maxFine = '25_dollars'; +} + +/* RESERVES */ +/* Reserve items - let's use regular expressions to save some pain */ +res_day_re = /^RESERVE (\d+) DAY$/; +res_hour_re = /^RESERVE (\d+) HOUR$/; +res_day_match = res_day_re.exec(copy.circ_modifier); +res_hour_match = res_hour_re.exec(copy.circ_modifier); +if (res_day_match) { + result.durationRule = res_day_match[1] + '_days_0_renew'; + result.recurringFinesRule = '2_dollars_per_day'; + result.maxFine = '15_dollars; +} else if (res_hour_match) { + result.durationRule = res_hour_match[1] + '_hours_0_renew'; + result.recurringFinesRule = '50_cents_per_hour'; + result.maxFine = '15_dollars'; +} + + + + + + + diff --git a/web/opac/locale/en-CA/opac_conifer.dtd b/web/opac/locale/en-CA/opac_conifer.dtd index 201e3410dc..ccddc47882 100644 --- a/web/opac/locale/en-CA/opac_conifer.dtd +++ b/web/opac/locale/en-CA/opac_conifer.dtd @@ -39,3 +39,5 @@ + + diff --git a/web/opac/locale/en-US/opac_conifer.dtd b/web/opac/locale/en-US/opac_conifer.dtd index d20f471deb..422ef79526 100644 --- a/web/opac/locale/en-US/opac_conifer.dtd +++ b/web/opac/locale/en-US/opac_conifer.dtd @@ -39,3 +39,5 @@ + + diff --git a/web/opac/skin/algoma/xml/footer.xml b/web/opac/skin/algoma/xml/footer.xml index d74a0ca55e..de8e8e690b 100644 --- a/web/opac/skin/algoma/xml/footer.xml +++ b/web/opac/skin/algoma/xml/footer.xml @@ -7,23 +7,39 @@ | &footer.find.library; + href='&au.footer.databases.url;'>&au.footer.databases; | &footer.help; + href='&au.footer.archives.url;'>&au.footer.archives; | &footer.library.about; + href='&au.footer.contact.url;'>&au.footer.contact; | - &footer.union; + &au.footer.library.about; + + | + + &au.footer.library.home; + + + | + + &au.footer.library.reserves; + + + + +