From: Thomas Berezansky Date: Wed, 1 Aug 2012 20:40:51 +0000 (-0400) Subject: Fix place hold hiding logic X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=61a95875189d27ed3543f45edb63d3e243aa272a;p=contrib%2FConifer.git Fix place hold hiding logic Always show the place hold link for staff with permission to place holds that won't fill currently. Otherwise, only show the link if: There are holdable copies AND We aren't blocking OR there are no available copies Signed-off-by: Thomas Berezansky Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index 32858db322..990201d143 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -25,10 +25,9 @@
[%- search_ou = ctx.search_ou; IF ctx.place_unfillable || - (ctx.holds_block.enabled != 'true' && - attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size > 0 - ) || - (ctx.holds_block.enable == 'true' && attrs.org_copy_counts.$search_ou.available > 0) + ( attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size > 0 + && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0) + ) %]