Show Suspended holds as Suspended
authorThomas Berezansky <tsbere@mvlc.org>
Thu, 8 Dec 2011 16:26:33 +0000 (11:26 -0500)
committerBill Erickson <berick@esilibrary.com>
Fri, 16 Dec 2011 20:44:45 +0000 (15:44 -0500)
In the staff client and JSPac show the status of a suspended hold as
Suspended rather than something like "Waiting for copy".

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
Open-ILS/web/opac/locale/en-US/opac.dtd
Open-ILS/web/opac/skin/default/js/myopac.js
Open-ILS/web/opac/skin/default/xml/myopac/myopac_holds.xml
Open-ILS/xul/staff_client/server/circ/util.js
Open-ILS/xul/staff_client/server/locale/en-US/circ.properties

index 2004ceb..6705d61 100644 (file)
@@ -1088,6 +1088,7 @@ Returns event on error or:
  4 for 'arrived',
  5 for 'hold-shelf-delay'
  6 for 'canceled'
+ 7 for 'suspended'
 END_OF_DESC
         }
     }
@@ -1114,6 +1115,9 @@ sub _hold_status {
     if ($hold->cancel_time) {
         return 6;
     }
+    if ($U->is_true($hold->frozen)) {
+        return 7;
+    }
        return 1 unless $hold->current_copy;
        return 2 unless $hold->capture_time;
 
index 02e8231..545085a 100644 (file)
@@ -210,6 +210,7 @@ avoid using bookbags all together.  Thank you.">
 <!ENTITY myopac.holds.status.waiting "Waiting for copy">
 <!ENTITY myopac.holds.status.intransit "In Transit">
 <!ENTITY myopac.holds.status.available "Ready for Pickup">
+<!ENTITY myopac.holds.status.suspended "Suspended">
 <!ENTITY myopac.holds.cancel "Cancel">
 <!ENTITY myopac.holds.verify "If you wish to cancel the selected hold, click OK, otherwise click Cancel.">
 <!ENTITY myopac.holds.freeze_selected "Suspend">
index 24caa23..92e4b12 100644 (file)
@@ -477,7 +477,9 @@ function myOShowHoldStatus(r) {
                hideMe($n(row, 'myopac_holds_cancel_link'));
        }
 
-    if (showHoldQueuePosition) {
+    if( qstats.status == 7 ) {
+        unHideMe($n(row, 'hold_status_suspended'));
+    } else if (showHoldQueuePosition) {
         var node = $n(row, 'hold_qstats');
         if (qstats.potential_copies == 1) {
             node.appendChild(text(dojo.string.substitute(opac_strings.HOLD_STATUS_SINGULAR, [qstats.queue_position, qstats.total_holds, qstats.potential_copies])));
index 08d1690..5a07d9e 100644 (file)
@@ -85,6 +85,7 @@
 
                                <td name='myopac_holds_location'></td>
                                <td>
+                                       <span class='hide_me' name='hold_status_suspended'>&myopac.holds.status.suspended;</span>
                                        <span class='hide_me' name='hold_status_waiting'>&myopac.holds.status.waiting;</span>
                                        <span class='hide_me' name='hold_status_transit'>&myopac.holds.status.intransit;</span>
                                        <span class='hide_me' name='hold_status_available'><b style='color:red'>&myopac.holds.status.available;</b></span>
index 7c8003a..e8213d9 100644 (file)
@@ -1941,6 +1941,9 @@ circ.util.hold_columns = function(modify,params) {
                     case 6:
                         return document.getElementById('circStrings').getString('staff.circ.utils.hold_status.6');
                         break;
+                    case 7:
+                        return document.getElementById('circStrings').getString('staff.circ.utils.hold_status.7');
+                        break;
                     default:
                         return my.status;
                         break;
index dcfbd18..af45237 100644 (file)
@@ -323,6 +323,7 @@ staff.circ.utils.hold_status.3=In-Transit
 staff.circ.utils.hold_status.4=Ready for pickup
 staff.circ.utils.hold_status.5=Reserved/Pending
 staff.circ.utils.hold_status.6=Canceled
+staff.circ.utils.hold_status.7=Suspended
 staff.circ.utils.hold_post_clear_shelf_action.label=Post-Clear
 staff.circ.utils.hold_post_clear_shelf_action.hold=Need for Hold
 staff.circ.utils.hold_post_clear_shelf_action.transit=Need for Transit