From 76f3507e3a2ba514eca8c74e189b53e47ce59515 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 17 Jan 2023 20:20:30 +0000 Subject: [PATCH] Bug 32661: Use template wrapper for invoices page tabs This patch implements the template WRAPPER system (see Bug 32571) for building tabs on the invoices page. To test you must have at least one open invoice and one closed invoice. - Go to Acquisitions -> Invoices. - You should see two tabs, "Open invoices" and "Closed invoices." - The tabs should look correct and work correctly. Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/acqui/invoices.tt | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt index 2d4bf06923..8df2db4ed1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -135,13 +135,13 @@ [% END # /IF CAN_user_acquisition_merge_invoices %] [% END # /BLOCK invoices_table %] -
- -
-
+ [% WRAPPER tabs id= "invoicestabs" %] + [% WRAPPER tabs_nav %] + [% WRAPPER tab_item tabname= "opened" active= 1 %] Open invoices ([% openedinvoices.size || 0 | html %]) [% END %] + [% WRAPPER tab_item tabname= "closed" %] Closed invoices ([% closedinvoices.size || 0 | html %]) [% END %] + [% END %] + [% WRAPPER tab_panels %] + [% WRAPPER tab_panel tabname="opened" active= 1 %] [% IF openedinvoices %] [% INCLUDE invoices_table invoices = openedinvoices %] [% ELSE %] @@ -149,8 +149,9 @@

Your search returned no open invoices.

[% END %] -
-
+ [% END # /#opened %] + + [% WRAPPER tab_panel tabname="closed" %] [% IF closedinvoices %] [% INCLUDE invoices_table invoices = closedinvoices closed = 1 %] [% ELSE %] @@ -158,10 +159,9 @@

Your search returned no closed invoices.

[% END %] -
- - - + [% END # /#closed %] + [% END # /tab_panels %] + [% END # /#invoicestabs %]
-- 2.39.5