From 28354b300fbcf19b242e811dbf23c31083a65885 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 14 Jun 2023 17:09:48 +0000 Subject: [PATCH] Bug 34012: Use template wrapper for tabs: Recalls awaiting pickup This patch updates the recalls awaiting pickup template so that it uses the new WRAPPER directive to build tabbed navigation. Note: this patch includes indentation changes, so check the diff accordingly. To test you must have UseRecalls enabled. Apply the patch and go to Circulation -> Recalls awaiting pickup. Both the "Recalls waiting" and "Recalls waiting over X days" tabs should look correct and work correctly. Signed-off-by: Sam Lau Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 309148160b34e5dbb6f2ca723d1c2aeb1400d6ba) Signed-off-by: Martin Renvoize (cherry picked from commit 4e2b346b07fce75b00585b6a3fb403d496f4cebb) Signed-off-by: Pedro Amorim --- .../en/modules/recalls/recalls_waiting.tt | 202 +++++++++--------- 1 file changed, 99 insertions(+), 103 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt index 7d414fe03b..508f9005c1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt @@ -35,110 +35,106 @@ [% IF Koha.Preference('UseRecalls') %] -
+ [% WRAPPER tabs id= "results" %] + [% WRAPPER tabs_nav %] + [% WRAPPER tab_item tabname= "recallswaiting" bt_active= 1 %] Recalls waiting: [% recalls.count | html %] [% END %] + [% WRAPPER tab_item tabname= "recallsover" %] Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% over.count | html %] [% END %] + [% END # /WRAPPER tabs_nav %] - - -
-
- [% IF ( recalls ) %] - - - - - - - - - - [% FOREACH recall IN recalls %] - - - - - - [% END %] - -
Available sinceTitleRequested byPickup location 
[% recall.waiting_date | $KohaDates %] - - [% recall.biblio.title | html %] - [% FOREACH s IN recall.biblio.subtitle %] - [% s | html %] - [% END %] - - [% recall.biblio.author | html %] -
Barcode: [% recall.item.barcode | html %] -
- [% recall.patron.firstname | html %] [% recall.patron.surname | html %] - [% IF ( recall.patron.phone ) %]
[% recall.patron.phone | html %][% END %] - [% IF ( recall.patron.email ) %]
[% recall.patron.email | html %][% END %] -
[% recall.library.branchname | html %] -
- - -
- - -
-
-
- [% ELSE %] -
There are no recalls to show.
- [% END %] -
- -
- [% IF ( over.size ) %] - [% IF ( Koha.Preference('RecallsMaxPickUpDelay') ) %]

Recalls listed here have been awaiting pickup for more than [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days.

[% END %] - - - - - - - - - - [% FOREACH recall IN over %] - - - - - - [% END %] - -
Available sinceTitleRequested byPickup location 
[% recall.waiting_date | $KohaDates %] - [% INCLUDE 'biblio-title.inc' biblio=recall.biblio link = 1 %] - [% IF recall.biblio.author %] by [% recall.biblio.author | html %][% END %] - [% recall.item.enumchron | html %] - [% IF ( recall.item.barcode ) %]
Barcode: [% recall.item.barcode | html %][% END %] -
- [% recall.patron.firstname | html %] [% recall.patron.surname | html %] - [% IF ( recall.patron.phone ) %]
[% recall.patron.phone | html %][% END %] - [% IF ( recall.patron.email ) %]
[% recall.patron.email | html %][% END %] -
[% recall.library.branchname | html %] -
- - -
- - -
-
-
- [% ELSE %] -
There are no recalls to show.
- [% END %] -
-
-
+ [% WRAPPER tab_panels %] + [% WRAPPER tab_panel tabname="recallswaiting" bt_active= 1 %] + [% IF ( recalls ) %] + + + + + + + + + + [% FOREACH recall IN recalls %] + + + + + + [% END %] + +
Available sinceTitleRequested byPickup location 
[% recall.waiting_date | $KohaDates %] + + [% recall.biblio.title | html %] + [% FOREACH s IN recall.biblio.subtitle %] + [% s | html %] + [% END %] + + [% recall.biblio.author | html %] +
Barcode: [% recall.item.barcode | html %] +
+ [% recall.patron.firstname | html %] [% recall.patron.surname | html %] + [% IF ( recall.patron.phone ) %]
[% recall.patron.phone | html %][% END %] + [% IF ( recall.patron.email ) %]
[% recall.patron.email | html %][% END %] +
[% recall.library.branchname | html %] +
+ + +
+ + +
+
+
+ [% ELSE %] +
There are no recalls to show.
+ [% END %] + [% END # /tab_panel# %] + [% WRAPPER tab_panel tabname="recallsover" %] +
+ [% IF ( over.size ) %] + [% IF ( Koha.Preference('RecallsMaxPickUpDelay') ) %]

Recalls listed here have been awaiting pickup for more than [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days.

[% END %] + + + + + + + + + + [% FOREACH recall IN over %] + + + + + + [% END %] + +
Available sinceTitleRequested byPickup location 
[% recall.waiting_date | $KohaDates %] + [% INCLUDE 'biblio-title.inc' biblio=recall.biblio link = 1 %] + [% IF recall.biblio.author %] by [% recall.biblio.author | html %][% END %] + [% recall.item.enumchron | html %] + [% IF ( recall.item.barcode ) %]
Barcode: [% recall.item.barcode | html %][% END %] +
+ [% recall.patron.firstname | html %] [% recall.patron.surname | html %] + [% IF ( recall.patron.phone ) %]
[% recall.patron.phone | html %][% END %] + [% IF ( recall.patron.email ) %]
[% recall.patron.email | html %][% END %] +
[% recall.library.branchname | html %] +
+ + +
+ + +
+
+
+ [% ELSE %] +
There are no recalls to show.
+ [% END %] +
+ [% END # /tab_panel# %] + [% END # /WRAPPER tab_panels %] + [% END # /WRAPPER tabs %] [% ELSE %]
Recalls have not been enabled. Enable the UseRecalls system preference to use recalls.
-- 2.39.5