From e8dbc0fa0a457f59b1945b61e0009c223090e37c Mon Sep 17 00:00:00 2001 From: Victoria Lewis Date: Sun, 2 Apr 2017 14:49:47 -0700 Subject: [PATCH] CAT-125 Suspended Holds Display 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 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 | 17 +++++++++++++++-- Open-ILS/web/css/skin/kcls/selfcheck.css | 4 ++++ Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js | 12 ++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 b/KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 index 1eb82a155a..d70874cba2 100644 --- a/KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 +++ b/KCLS/openils/var/templates_kcls/circ/selfcheck/main.tt2 @@ -193,8 +193,21 @@ function switchTo(str,subpage) { - - +
+
Suspended

+ + + + +
+ + + + + +
TITLE:
AUTHOR:
STATUS:
+
+
diff --git a/Open-ILS/web/css/skin/kcls/selfcheck.css b/Open-ILS/web/css/skin/kcls/selfcheck.css index a12f2748c8..829805708a 100644 --- a/Open-ILS/web/css/skin/kcls/selfcheck.css +++ b/Open-ILS/web/css/skin/kcls/selfcheck.css @@ -183,6 +183,10 @@ h2 { color: red !important; } +.suspHold { +color:#A8A8A8; +} + #oils-base-body-block { height: auto; } diff --git a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js index 9297caa07a..ee0c7bdd18 100644 --- a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js @@ -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(); -- 2.11.0