From 0681ca86d04eba77f767245dd092e35428582ad2 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 31 Mar 2023 13:34:54 +0000 Subject: [PATCH] Bug 33382: Use template wrapper for breadcrumbs: Patron clubs This patch updates patron club 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. - Tools -> - Patron clubs - New club template - Edit club template - New club - Edit club - Club enrollments (from the "Actions" menu in the list of clubs) --- .../prog/en/modules/clubs/club-enrollments.tt | 27 +++++------- .../prog/en/modules/clubs/clubs-add-modify.tt | 41 ++++++++----------- .../prog/en/modules/clubs/clubs.tt | 23 ++++------- .../en/modules/clubs/templates-add-modify.tt | 41 ++++++++----------- 4 files changed, 54 insertions(+), 78 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt index 838540ae75..eb8e503f75 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt @@ -15,25 +15,18 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Club enrollments + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt index 8d1f7b614e..1633f42d32 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt @@ -1,3 +1,5 @@ +[% USE raw %] +[% USE HtmlTags %] [% USE KohaDates %] [% USE Branches %] [% USE AuthorisedValues %] @@ -20,29 +22,22 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% IF club %] + Modify club [% club.name | html | $HtmlTags tag="em" %] + [% ELSE %] + Create a new [% club_template.name | html | $HtmlTags tag="em" %] club + [% END %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
@@ -57,9 +52,9 @@

[% IF club %] - Modify club [% club.name | html %] + Modify club [% club.name | html | $HtmlTags tag="em" %] [% ELSE %] - Create a new [% club_template.name | html %] club + Create a new [% club_template.name | html | $HtmlTags tag="em" %] club [% END %]

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt index ffdbf47e12..115d73907b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt @@ -16,22 +16,15 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Patron clubs + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt index 4ad7478b9d..b80dbea4f4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt @@ -1,5 +1,7 @@ +[% USE raw %] [% USE Branches %] [% USE AuthorisedValues %] +[% USE HtmlTags %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] @@ -24,29 +26,22 @@ [% 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/tools/tools-home.pl">Tools</a> - </li> - <li> + [% END %] + [% WRAPPER breadcrumb_item %] <a href="clubs.pl">Patron clubs</a> - </li> - <li> - <a href="#" aria-current="page"> - [% IF club_template %] - Modify club template <em>[% club_template.name | html %]</em> - [% ELSE %] - Create a new club template - [% END %] - </a> - </li> - </ol> -</nav> -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% IF club_template %] + <span>Modify club template [% club_template.name | html | $HtmlTags tag="em" %]</span> + [% ELSE %] + <span>Create a new club template</span> + [% END %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %] <div class="main container-fluid"> <div class="row"> @@ -57,9 +52,9 @@ <h1> [% IF club_template %] - Modify club template <em>[% club_template.name | html %]</em> + <span>Modify club template [% club_template.name | html | $HtmlTags tag="em" %]</span> [% ELSE %] - Create a new club template + <span>Create a new club template</span> [% END %] </h1> -- 2.30.2