From 023a5b493e7656da6fc7545147835f0d66ad6f6a Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 31 Oct 2016 14:39:40 +0000 Subject: [PATCH] Bug 14876 - Show number of holds per record on the search results This patch sues the existing plugin Koha::Template::Plugin::Biblio->HoldsCount To be consistent with current behaviour 'Holds (0)' is shown when no holds have been placed on an item To test: 1 - Search in staff 2 - Note holds link has no extra information 3 - Apply patch 4 - prove -v t/db_dependent/Template/Plugin/Holds.t 5 - Do search in staff that returns records with some holds (i.e. place some holds) 6 - Note the number of holds now displays next to the text of the link: Holds (#) Signed-off-by: Barbara Johnson --- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 031c1f8..0b3c2d3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -1,4 +1,5 @@ [% USE Koha %] +[% USE Biblio %] [% INCLUDE 'doc-head-open.inc' %] Koha › Catalog › [% IF ( searchdesc ) %]Results of search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %][% ELSE %]You did not specify any search criteria[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -587,7 +588,7 @@ var holdForPatron = function () { [% IF ( SEARCH_RESULT.norequests ) %] No holds allowed [% ELSE %] - Holds + Holds ([% Biblio.HoldsCount( SEARCH_RESULT.biblionumber ) %]) [% IF ( holdfor ) %] | Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])[% END %] [% END %] -- 2.1.4