From: Bill Erickson Date: Mon, 28 Mar 2011 14:20:27 +0000 (-0400) Subject: show copy part in copy detail grid on rdetail page X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ed53318f2026328cf4288e8586c34e03db3a715b;p=evergreen%2Fequinox.git show copy part in copy detail grid on rdetail page --- diff --git a/Open-ILS/web/opac/locale/en-US/opac.dtd b/Open-ILS/web/opac/locale/en-US/opac.dtd index ac9d626e68..c1ebf6bec9 100644 --- a/Open-ILS/web/opac/locale/en-US/opac.dtd +++ b/Open-ILS/web/opac/locale/en-US/opac.dtd @@ -489,6 +489,7 @@ Please see a librarian to renew your account."> Rdetail ================================================================= --> + diff --git a/Open-ILS/web/opac/skin/default/js/copy_details.js b/Open-ILS/web/opac/skin/default/js/copy_details.js index e5c50c0939..04e8e416f5 100644 --- a/Open-ILS/web/opac/skin/default/js/copy_details.js +++ b/Open-ILS/web/opac/skin/default/js/copy_details.js @@ -208,6 +208,7 @@ function cpdDrawCopies(r) { function cpdDrawCopy(r) { var copy = r.getResultObject(); var row = r.row; + var trow = r.args.templateRow; if (r.args.copy_location && copy.location().name() != r.args.copy_location) { hideMe(row); @@ -218,6 +219,18 @@ function cpdDrawCopy(r) { $n(row, 'location').appendChild(text(copy.location().name())); $n(row, 'status').appendChild(text(copy.status().name())); + // append comma-separated list of part this copy is linked to + if(copy.parts() && copy.parts().length) { + unHideMe($n(trow, 'copy_part_label')); + unHideMe($n(row, 'copy_part')); + for(var i = 0; i < copy.parts().length; i++) { + var part = copy.parts()[i]; + var node = $n(row, 'copy_part'); + if(i > 0) node.appendChild(text(',')); + node.appendChild(text(part.label())); + } + } + if(isXUL()) { /* show the hold link */ var l = $n(row, 'copy_hold_link'); diff --git a/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_cn_details.xml b/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_cn_details.xml index 09765fd4e9..45a5c85d5d 100644 --- a/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_cn_details.xml +++ b/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_cn_details.xml @@ -13,6 +13,7 @@ &rdetail.cn.barcode; &common.status; &rdetail.cn.location; + &rdetail.cn.part; &rdetail.cn.hold.age; &rdetail.cn.genesis; &rdetail.cn.holdable; @@ -35,6 +36,7 @@ + &rdetail.cn.disabled;