CAT-125 Suspended Holds Display
authorVictoria Lewis <vlewis@catalystdevworks.com>
Sun, 2 Apr 2017 21:49:47 +0000 (14:49 -0700)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Display a separate section for suspended holds.
The holds display has three fields: title, author, and status.
Heading and body are in gray font.

Signed-off-by: Victoria Lewis <vlewis@catalystdevworks.com>
modified:   KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2
modified:   Open-ILS/web/css/skin/kcls/selfcheck.css
modified:   Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js

KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2
Open-ILS/web/css/skin/kcls/selfcheck.css
Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js

index 1eb82a1..d70874c 100644 (file)
@@ -193,8 +193,21 @@ function switchTo(str,subpage) {
             </td></tr>
                   </tbody>
           </table>
-        </div>
-
+               <br /br>
+                 <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td align="center" style="font-weight:bold;font-size:20px;" class="suspHold">Suspended</td></tr></table><br />
+                 <table cellpadding="5" cellspacing="0" border="0" class="item_table" width="100%">
+                 <tbody id='oils-selfck-susp-tbody' class="suspHold">
+                         <tr id='oils-selfck-susp-row'><td>
+                         <table cellpadding="2" cellspacing="0" border="0" >
+                         <tr><td class="label">TITLE:</td><td name="title"></td></tr>
+                         <tr><td class="label">AUTHOR:</td><td name="author"></td></tr>
+                         <tr><td class="label hidden">FORMAT:</td><td class="hidden" name="format"></td></tr>
+                         <tr><td class="label">STATUS:</td><td name="status"></td></tr>
+                 </table>
+                 </td></tr>
+               </tbody>
+               </table>
+       </div>
       </td>
       <td class="sidebar" valign="top" width="226">
           <div id="floatdiv" style="position:relative; width:226px; height:375px;left:0px;top:0px;z-index:100;">
index a12f274..8298057 100644 (file)
@@ -183,6 +183,10 @@ h2 {
     color: red !important;
 }
 
+.suspHold {
+color:#A8A8A8;
+}
+
 #oils-base-body-block {
        height: auto;
 }
index 9297caa..ee0c7bd 100644 (file)
@@ -788,14 +788,19 @@ SelfCheckManager.prototype.drawHoldsPage = function() {
     switchTo('step3','step3f');
     this.holdTbody = dojo.byId('oils-selfck-hold-tbody');
     this.readyTbody = dojo.byId('oils-selfck-rdy-tbody');
+    this.suspendedTbody = dojo.byId('oils-selfck-susp-tbody');
     if(!this.readyTemplate)
         this.readyTemplate = this.readyTbody.removeChild(dojo.byId('oils-selfck-rdy-row'));
     if(!this.holdTemplate)
         this.holdTemplate = this.holdTbody.removeChild(dojo.byId('oils-selfck-hold-row'));
+    if(!this.suspTemplate)
+        this.suspTemplate = this.suspendedTbody.removeChild(dojo.byId('oils-selfck-susp-row'));
     while(this.holdTbody.childNodes[0])
         this.holdTbody.removeChild(this.holdTbody.childNodes[0]);
     while(this.readyTbody.childNodes[0])
         this.readyTbody.removeChild(this.readyTbody.childNodes[0]);
+    while(this.suspendedTbody.childNodes[0])
+        this.suspendedTbody.removeChild(this.suspendedTbody.childNodes[0]);
 
     progressDialog.show(true);
 
@@ -844,6 +849,7 @@ SelfCheckManager.prototype.drawHolds = function(holds) {
        if(!data) return;
        var row = this.holdTemplate.cloneNode(true);
        var row2 = this.readyTemplate.cloneNode(true);
+       var row3 = this.suspTemplate.cloneNode(true);
        //if(data.mvr.isbn()) {
        //    this.byName(row, 'jacket').setAttribute('src', '/opac/extras/ac/jacket/small/' + data.mvr.isbn());
        //}
@@ -855,6 +861,12 @@ SelfCheckManager.prototype.drawHolds = function(holds) {
                if(dojo.date.stamp.fromISOString(data.hold.shelf_expire_time())<(new Date())) this.byName(row2, 'date').style.color="red";
                this.byName(row2, 'date').innerHTML = dojo.date.locale.format(dojo.date.stamp.fromISOString(data.hold.shelf_expire_time()), {selector: 'date', fullYear: true});
                this.readyTbody.appendChild(row2);
+     } else if(data.status == 7) {
+    this.byName(row, 'title').innerHTML = data.mvr.title();
+    this.byName(row, 'author').innerHTML = data.mvr.author();
+    this.byName(row, 'format').innerHTML = data.mvr.types_of_resource()[0];
+    this.byName(row, 'status').innerHTML = dojo.string.substitute(localeStrings.HOLD_STATUS_WAITING,[data.queue_position, data.potential_copies]);
+    this.suspendedTbody.appendChild(row);
        } else {
 
                this.byName(row, 'title').innerHTML = data.mvr.title();