From 044ead6a31520fb8ac22328791af4c562f366144 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 21 Sep 2021 10:44:48 +0000 Subject: [PATCH] Bug 29058: (follow-up) Add hold count and don't display show options if no holds --- .../prog/en/modules/reserve/request.tt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 4d36b6cb78..461502e45f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -3,6 +3,7 @@ [% USE Asset %] [% USE JSON.Escape %] [% USE Koha %] +[% USE Biblio %] [% USE KohaDates %] [% USE Branches %] [% USE Categories %] @@ -881,14 +882,16 @@ [% END %] [% UNLESS ( patron ) %] - - - [% IF always_show_holds == 'DONT' %] - - Show holds - [% ELSE %] - - [% END %] + [% SET hold_count = Biblio.HoldsCount( biblio.biblionumber ) | html %] + [% IF hold_count %] + + [% IF always_show_holds == 'DONT' %] + + Show holds ([% hold_count %]) + [% ELSE %] + + [% END %] + [% END %] [% IF ( reserveloop ) %]
[% IF ( multi_hold ) %] -- 2.20.1