From e3041f47670dddc93b29e332f4b942b91271f878 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 9 Mar 2023 19:28:47 +0000 Subject: [PATCH] Bug 33187: Use template wrapper for tabs article requests and holds awaiting pickup pages This patch updates the article requests management and holds awaiting pickup templates in the staff interface so that they use the new WRAPPER directive for building tabs. To test, apply the patch and make sure the ArticleRequests system preference is enabled. - Go to Circulation -> Article requests - You should see three tabs, "New," "Pending," and "Processing." - The tabs should look correct and work correctly. - Go to Circulation -> Holds awaiting pickup - You should see three tabs, "Holds waiting", "Holds waiting over X days," and "Holds with cancellation requests." ("X" is the value in the ReservesMaxPickUpDelay system preference) Signed-off-by: Matt Blenkinsop Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 8a4e971ad311662033ba7386bc0048040b4db26a) Signed-off-by: Matt Blenkinsop --- .../prog/en/modules/circ/article-requests.tt | 52 ++++++++----------- .../prog/en/modules/circ/waitingreserves.tt | 50 ++++++++++-------- 2 files changed, 49 insertions(+), 53 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt index a81947a707..af63e41876 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt @@ -172,28 +172,21 @@ -
- -
-
+ [% WRAPPER tabs id= "article-request-tabs" %] + [% WRAPPER tabs_nav %] + [% WRAPPER tab_item tabname= "article-requests-requested" bt_active= 1 %] + New ([% article_requests_requested.count | html %]) + [% END %] + [% WRAPPER tab_item tabname= "article-requests-pending" %] + Pending ([% article_requests_pending.count | html %]) + [% END %] + [% WRAPPER tab_item tabname= "article-requests-processing" %] + Processing ([% article_requests_processing.count | html %]) + [% END %] + [% END # /WRAPPER tabs_nav %] + + [% WRAPPER tab_panels %] + [% WRAPPER tab_panel tabname="article-requests-requested" bt_active= 1 %]
Select all | Clear all [% PROCESS actions menuid='article-menu-requested' id_arg=0 pull_right='' aria_menu='table_controls' %] @@ -298,9 +291,9 @@ [% END %] -
+ [% END # /tab_panel#article-requests-requested %] -
+ [% WRAPPER tab_panel tabname="article-requests-pending" %]
Select all | Clear all [% PROCESS actions menuid='article-menu-pending' id_arg=0 pull_right='' aria_menu='table_controls' %] @@ -405,9 +398,9 @@ [% END %] -
+ [% END # /tab_panel#article-requests-pending %] -
+ [% WRAPPER tab_panel tabname="article-requests-processing" %]
Select all | Clear all [% PROCESS actions menuid='article-menu-processing' id_arg=0 pull_right='' aria_menu='table_controls' %] @@ -509,10 +502,9 @@ [% END %] -
-
-
-
+ [% END # /tab_panel#article-requests-processing %] + [% END # /WRAPPER tab_panels %] + [% END # /WRAPPER tabs %]
[% IF Koha.Preference('CircSidebar') %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt index 3b5fcb24a0..61a5686f18 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt @@ -5,6 +5,7 @@ [% USE Branches %] [% USE TablesSettings %] [% USE AuthorisedValues %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Holds awaiting pickup › Circulation › Koha @@ -87,22 +88,22 @@

View detail of the enqueued job

[% END %] -
- -
-
+ + [% WRAPPER tabs id= "resultlist" %] + [% WRAPPER tabs_nav %] + [% WRAPPER tab_item tabname= "holdswaiting" bt_active= 1 %] + Holds waiting: [% reservecount | html %] + [% END %] + [% WRAPPER tab_item tabname= "holdsover" %] + [% tx("Holds waiting over {count} days:", { count = Koha.Preference('ReservesMaxPickUpDelay') }) %] [% overcount | html %] + [% END %] + [% WRAPPER tab_item tabname= "holdscancelled" %] + Holds with cancellation requests: [% cancel_reqs_count | html %] + [% END %] + [% END # /WRAPPER tabs_nav %] + + [% WRAPPER tab_panels %] + [% WRAPPER tab_panel tabname="holdswaiting" bt_active= 1 %] [% IF ( reserveloop ) %]
@@ -111,8 +112,9 @@ [% ELSE %]
No holds found.
[% END %] -
-
+ [% END # /tab_panel#holdswaiting %] + + [% WRAPPER tab_panel tabname="holdsover" %] [% IF ( ReservesMaxPickUpDelay ) %]

Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay | html %] days.

[% END %] @@ -137,16 +139,18 @@ [% ELSE %]
No holds found.
[% END # /IF( overloop ) %] -
-
+ [% END # /tab_panel#holdsover %] + + [% WRAPPER tab_panel tabname="holdscancelled" %] [% IF cancel_reqs_count %] [% INCLUDE waiting_holds.inc select_column='1' table_name='holdscr' reserveloop=cancel_reqs tab='holdscr' %] [% ELSE %]
No holds found.
[% END %] -
-
-
+ [% END # /tab_panel#holdscancelled %] + [% END # /WRAPPER tab_panels %] + [% END # /WRAPPER tabs %] + [% END # /IF ( cancel_result ) %]
-- 2.39.5