From 4535efa4aaae5c70ac9d75b4749585db51bcd874 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 6 Jan 2023 11:49:32 +0000 Subject: [PATCH] Bug 33001: Use template wrapper for breadcrumbs: Acquisitions part 2 This patch updates several acquisitions-related templates so that they use the new WRAPPER for displaying breadcrumbs. To test, apply the patch and test each page and its variations. Breadcrumbs should look correct, and each link should be correct. - Acquisitions -> - Late orders, - moddeliverydate.tt - modordernotes.tt -- These two templates aren't linked to from anywhere, but you can navigate directly to: http://127.0.0.1:8081/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=X and http://127.0.0.1:8081/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=1 - Order search, order search results - Invoice search, - Invoice details, - Invoice files - Vendor -> Basket -> Add to basket -> - From a new (empty) record - From existing orders (copy) - From a subscription Signed-off-by: Lucas Gass Signed-off-by: David Nind Signed-off-by: Katrin Fischer https://bugs.koha-community.org/show_bug.cgi?id=33005 Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/acqui/histsearch.tt | 44 +++++++------------ .../prog/en/modules/acqui/invoice-files.tt | 30 +++++-------- .../prog/en/modules/acqui/invoice.tt | 29 +++++------- .../prog/en/modules/acqui/invoices.tt | 22 ++++------ .../prog/en/modules/acqui/lateorders.tt | 22 ++++------ .../prog/en/modules/acqui/moddeliverydate.tt | 30 ++++++------- .../prog/en/modules/acqui/modordernotes.tt | 33 ++++++-------- .../prog/en/modules/acqui/neworderempty.tt | 40 +++++++---------- .../modules/acqui/neworderempty_duplicate.tt | 31 +++++-------- .../en/modules/acqui/newordersubscription.tt | 31 +++++-------- 10 files changed, 122 insertions(+), 190 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt index f9818a1c8b..4865bec71c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt @@ -15,34 +15,24 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% IF ( order_loop ) %] + [% WRAPPER breadcrumb_item %] + Orders search + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Search results + [% END %] + [% ELSE %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Order search + [% END %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt index 4e89f0facf..dfc829b1a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt @@ -12,28 +12,22 @@ [% INCLUDE 'acquisitions-search.inc' %] [% END %] - [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Files + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt index ba6ff30f0d..3edab4d332 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -28,23 +28,18 @@ [% SET readonly = NOT CAN_user_acquisition_edit_invoices %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item %] + Acquisitions + [% END %] + [% WRAPPER breadcrumb_item %] + Invoices + [% END %] + [% WRAPPER breadcrumb_item bc_active=1 %] + [% invoicenumber | html %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
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 57aa5336d4..160ea96563 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -15,22 +15,16 @@ [% INCLUDE 'acquisitions-search.inc' %] [% END %] - [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Invoices + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt index ad78d32dbf..0700170fb6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -15,22 +15,16 @@ [% INCLUDE 'acquisitions-search.inc' %] [% END %] - [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Late orders + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/moddeliverydate.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/moddeliverydate.tt index d7512ccaf6..1c718647cf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/moddeliverydate.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/moddeliverydate.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE KohaDates %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] @@ -8,25 +9,22 @@ [% INCLUDE 'header.inc' %] - + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Change estimated delivery date + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/modordernotes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/modordernotes.tt index 6398034ed3..98e6742a63 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/modordernotes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/modordernotes.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% INCLUDE 'doc-head-open.inc' %] [%- IF (type == "vendor") -%] Change order vendor note @@ -11,30 +12,22 @@ <body id="acq_modordernotes" class="acq"> [% INCLUDE 'header.inc' %] - [% WRAPPER 'sub-header.inc' %] -<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> - <ol> - <li> - <a href="/cgi-bin/koha/mainpage.pl">Home</a> - </li> - <li> + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item %] <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisition</a> - </li> - <li> + [% END %] + [% WRAPPER breadcrumb_item %] <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a> - </li> - <li> + [% END %] + [% WRAPPER breadcrumb_item %] <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketname | html %] ([% basketno | html %])</a> - </li> - <li> - <a href="#" aria-current="page"> - Change order [% IF (type == "vendor") %]vendor[% ELSE %]internal[% END %] note - </a> - </li> - </ol> -</nav> -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active=1 %] + Change order [% IF (type == "vendor") %]vendor[% ELSE %]internal[% END %] note + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %] <div class="main container-fluid"> <div class="row"> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 451d55f1f3..4e35ed156a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -44,37 +44,27 @@ [% END %] [% WRAPPER 'sub-header.inc' %] -<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> - <ol> - <li> - <a href="/cgi-bin/koha/mainpage.pl">Home</a> - </li> - <li> + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item %] <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> - </li> - <li> + [% END %] + [% WRAPPER breadcrumb_item %] <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a> - </li> - <li> + [% END %] + [% WRAPPER breadcrumb_item %] <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a> - </li> - + [% END %] [% IF ( ordernumber ) %] - <li> - <a href="#" aria-current="page"> - Modify order details (line #[% ordernumber | html %]) - </a> - </li> + [% WRAPPER breadcrumb_item bc_active= 1 %] + Modify order details (line #[% ordernumber | html %]) + [% END %] [% ELSE %] - <li> - <a href="#" aria-current="page"> - New order - </a> - </li> + [% WRAPPER breadcrumb_item bc_active= 1 %] + New order + [% END %] [% END %] - </ol> -</nav> -[% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %] [% INCLUDE 'blocking_errors.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty_duplicate.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty_duplicate.tt index 123508b660..2a87fe78ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty_duplicate.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty_duplicate.tt @@ -1,5 +1,4 @@ - - +[% USE raw %] [% INCLUDE 'doc-head-open.inc' %] <title>Duplicate warning › Basket [% basketno | html %] › Acquisitions › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -10,27 +9,19 @@ [% INCLUDE 'acquisitions-search.inc' %] [% END %] - [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Duplicate warning + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt index 875921d799..86db364bba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt @@ -16,28 +16,21 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Add order from a subscription + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
-- 2.39.5