From: Dan Scott Date: Thu, 11 Oct 2012 05:43:01 +0000 (-0400) Subject: TPAC: Respect location visibility for result copies X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=239e70e2256b52bcb2d4dd32fa310c5e77b98e6e;p=evergreen%2Fpines.git TPAC: Respect location visibility for result copies Robert Soulliere noted in LP# 1062502 that copies in a location marked "opac_visible = FALSE" were erroneously being displayed in search results. This would occur if at least one copy on a record was in a visible location, but other copies were in an invisible location. This commit prevents copies in hidden locations from being displayed, and also adds guards for the visibility of the copy status and the circulation library. Signed-off-by: Dan Scott Signed-off-by: Robert Soulliere --- diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2 index 45d3f54ca1..c188e97f57 100644 --- a/Open-ILS/src/templates/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2 @@ -221,8 +221,13 @@ NEXT IF cp.visible == 'false'; loc = copy.findnodes('./*[local-name()="location"]'); + NEXT IF loc.getAttribute('opac_visible') == 'false'; + circlib = copy.findnodes('./*[local-name()="circlib"]'); + NEXT IF circlib.getAttribute('opac_visible') == 'false'; + status = copy.findnodes('./*[local-name()="status"]'); + NEXT IF status.getAttribute('opac_visible') == 'false'; holding = { label => vol.label,