From d2e86d4518eab5b3c2f8811c3ca5f0119f42fb04 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 cd13ceb3a7..27d824d4d8 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 %] @@ -879,14 +880,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