From c8bb2d44e33f2f37c818b86124884f4ccaf165e3 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) --- .../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 bb64189312..82e8b7f553 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 @@ -178,28 +178,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' %] @@ -304,9 +297,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' %] @@ -411,9 +404,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' %] @@ -515,10 +508,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 10c0aa5fce..12a703ef5e 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 @@ -92,22 +93,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 ) %]
@@ -116,8 +117,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 %] @@ -142,16 +144,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.30.2