From 92bf26bbb4f5f477a43b905e363a8d5427d73321 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 12 Nov 2009 14:37:02 +0000 Subject: [PATCH] Patch from Lebbeous Fogle-Weekley to add a renewal type field (opac/desk/phone) to the new copy details UI git-svn-id: svn://svn.open-ils.org/ILS/trunk@14881 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/locale/en-US/lang.dtd | 1 + .../server/circ/alternate_copy_summary.js | 20 ++++++++++++++++++++ .../server/circ/alternate_copy_summary.xul | 6 ++++-- .../staff_client/server/locale/en-US/circ.properties | 3 +++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 134eb05751..c69d5c10fb 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -2945,6 +2945,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js index 87cacc62e2..d6ba72a360 100644 --- a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js +++ b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js @@ -35,6 +35,24 @@ function set_tooltip(name,value) { } } +function renewal_composite_kludge(circ) { + // Only a corrupt database could give us a situation where more + // than one of these were true at a time, right? + if (circ.desk_renewal() == "t") + return document.getElementById('circStrings').getString( + 'staff.circ.copy_details.desk_renewal' + ); + else if (circ.opac_renewal() == "t") + return document.getElementById('circStrings').getString( + 'staff.circ.copy_details.opac_renewal' + ); + else if (circ.phone_renewal() == "t") + return document.getElementById('circStrings').getString( + 'staff.circ.copy_details.phone_renewal' + ); + else return ""; +} + function load_item() { try { if (! xulG.barcode) return; @@ -115,6 +133,7 @@ function load_item() { set("copy_id", ''); set("loan_duration", ''); set("location", ''); + set("renewal_type", ''); set("opac_visible", ''); set("price", ''); set("ref", ''); @@ -300,6 +319,7 @@ function load_item() { set("max_fine_rule", details.circ.max_fine_rule()); set("opac_renewal", details.circ.opac_renewal()); set("phone_renewal", details.circ.phone_renewal()); + set("renewal_type", renewal_composite_kludge(details.circ)); set("recuring_fine", details.circ.recuring_fine()); set("recuring_fine_rule", details.circ.recuring_fine_rule()); set("renewal_remaining", details.circ.renewal_remaining()); diff --git a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul index aee96970ea..b6edcdffd0 100644 --- a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul +++ b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul @@ -84,8 +84,10 @@