Patch from Lebbeous Fogle-Weekley to add a renewal type field (opac/desk/phone) to...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 12 Nov 2009 14:37:02 +0000 (14:37 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 12 Nov 2009 14:37:02 +0000 (14:37 +0000)
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
Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul
Open-ILS/xul/staff_client/server/locale/en-US/circ.properties

index 134eb05..c69d5c1 100644 (file)
 <!ENTITY staff.circ.alternate_copy_summary.Circulation_History.label "Circulation History">
 <!ENTITY staff.circ.alternate_copy_summary.Copy_ID.label "Copy ID">
 <!ENTITY staff.circ.alternate_copy_summary.Copy_Location.label "Copy Location">
+<!ENTITY staff.circ.alternate_copy_summary.Renewal_Type.label "Renewal Type">
 <!ENTITY staff.circ.alternate_copy_summary.Date_Created.label "Date Created">
 <!ENTITY staff.circ.alternate_copy_summary.Status_Changed_Time.label "Status Changed">
 <!ENTITY staff.circ.alternate_copy_summary.Due_Date.label "Due Date">
index 87cacc6..d6ba72a 100644 (file)
@@ -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()); 
index aee9697..b6edcdf 100644 (file)
                                 <textbox name="price" readonly="true" context="clipboard"/>
                                 <label value="&staff.circ.alternate_copy_summary.Copy_Location.label;" />
                                 <textbox name="location" readonly="true" context="clipboard"/>
-                                <spacer />
-                                <spacer />
+                                <!--                                <spacer />
+                                <spacer /> -->
+                                <label value="&staff.circ.alternate_copy_summary.Renewal_Type.label;" />
+                                <textbox name="renewal_type" readonly="true" context="clipboard"/>
                                 <label value="&staff.circ.alternate_copy_summary.Due_Date.label;" />
                                 <textbox name="due_date" readonly="true" context="clipboard"/>
                             </row>
index 857af5e..d359619 100644 (file)
@@ -79,6 +79,9 @@ staff.circ.copy_details.last_circ=Last Circulation
 staff.circ.copy_details.current_circ=Current Circulation
 staff.circ.copy_details.no_circ=This item has yet to circulate.
 staff.circ.copy_details.not_transit=This item is not in transit.
+staff.circ.copy_details.desk_renewal=Desk
+staff.circ.copy_details.opac_renewal=OPAC
+staff.circ.copy_details.phone_renewal=Phone
 # Displays user info: "Family name, First name : Barcode"
 staff.circ.copy_details.user_details=%1$s, %2$s : %3$s
 staff.circ.copy_details.bad_hold_status=This item is not captured for a hold, however its status is incorrectly set to "On Holds Shelf".  Please check this item in to correct the status.