From 61a95875189d27ed3543f45edb63d3e243aa272a Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Wed, 1 Aug 2012 16:40:51 -0400 Subject: [PATCH] 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 --- Open-ILS/src/templates/opac/parts/record/summary.tt2 | 7 +++---- Open-ILS/src/templates/opac/parts/result/table.tt2 | 8 +++----- 2 files changed, 6 insertions(+), 9 deletions(-) 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) + ) %]