From cceb27cecc355a7d495ee6bc98e5f0cc5a9dc24c 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 e9cdc0ed0e..4039a30fbb 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 %] @@ -877,14 +878,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