From: Art Rhyno Date: Fri, 27 Jul 2012 15:39:14 +0000 (-0400) Subject: Block "Place Hold" link in TPAC if item is available X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2dc732c085fc711d5b7618e49eac8d85e986a1d9;p=contrib%2FConifer.git Block "Place Hold" link in TPAC if item is available Suppress the display of the "Place Hold" link based on whether an item is available. This is set as a preference in config.tt2. Some sites may want the ability to place holds regardless of availability. Signed-off-by: Art Rhyno Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index 813280aeff..bb08435a6e 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -6,6 +6,12 @@ ############################################################################## ############################################################################## +# Holds blocking +############################################################################## +# Block the ability to place holds if item is available +ctx.holds_block.enabled = 'true'; + +############################################################################## # RefWorks configuration ############################################################################## # RefWorks is a Web-based citation manager diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index 9f83fc62a6..0ea975c7ef 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -23,12 +23,14 @@
+ [%- depth = ctx.search_ou - 1; IF ctx.copy_summary.$depth.available == 0 OR ctx.holds_block.enabled == 'false' %] + [% END %]
[% IF ctx.user; INCLUDE "opac/parts/bookbag_actions.tt2"; diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index 662041ebdd..8fa61e44e0 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -216,6 +216,7 @@
+ [%- depth = ctx.search_ou - 1; IF args.copy_counts.$depth.available == 0 OR ctx.holds_block.enabled == 'false' %] + [% END %]
[% IF ctx.user; INCLUDE "opac/parts/bookbag_actions.tt2";