From e9ac062bb6999ccaf8cc2d71027bd1c6e11a022b Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 7 Jun 2011 10:16:25 -0400 Subject: [PATCH] Use the new status.opac_visible attribute in search summary Until we exposed the OPAC visibility of the status element as set in config.copy_status, We previously had to hardcode the logic for whether a given copy should be displayed based on its status. Now we can simply use the status.opac_visible attribute to determine visibility. Signed-off-by: Dan Scott --- .../opac/skin/default/xml/result/result_table.xml | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/Open-ILS/web/opac/skin/default/xml/result/result_table.xml b/Open-ILS/web/opac/skin/default/xml/result/result_table.xml index 8838a802a5..7ee942a262 100644 --- a/Open-ILS/web/opac/skin/default/xml/result/result_table.xml +++ b/Open-ILS/web/opac/skin/default/xml/result/result_table.xml @@ -166,28 +166,15 @@ return; } - /* - Hardcoded check for copy statuses per default opac_visible - setting in config.copy_status; replace with a copy attribute - check for visible status if holdings_xml ever gets that - */ - var ident; + /* Ensure the status is visible */ + var visible_status; dojo.query('status', cp).forEach(function (status) { - ident = status.getAttribute('ident'); + visible_status = status.getAttribute('opac_visible'); }); - if (parseInt(ident) !== 0 && /* Available */ - parseInt(ident) != 1 && /* Checked out */ - parseInt(ident) != 5 && /* In process */ - parseInt(ident) != 6 && /* In transit */ - parseInt(ident) != 7 && /* Reshelving */ - parseInt(ident) != 8 && /* On holds shelf */ - parseInt(ident) != 9 && /* On order */ - parseInt(ident) != 12 - ) { + if (visible_status == 'f') { return; } - /* Ensure the circulation library is visible */ var lib_vis; dojo.query('circlib', cp).forEach(function (status) { -- 2.11.0