Bug 33410: Use template wrapper for breadcrumbs: Patron card creator

This patch updates several patron card creator templates so that they
use the new WRAPPER for displaying breadcrumbs.

Unrelated minor change: I added <span> around a few other strings in
edit-profile.tt and edit-template.tt in order to improve
translatability.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Patron card creator
    - New ->
      - Card batch
      - Image
      - Layout
      - Card template
      - Printer profile
    - Manage ->
      - Card batches
      - Images
      - Layouts
      - Card templates
      - Printer profiles

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e957afb9a)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
This commit is contained in:
Owen Leonard 2023-04-04 16:39:02 +00:00 committed by Jacob O'Mara
parent 8714e36881
commit b8561410a8
7 changed files with 119 additions and 146 deletions

View File

@ -12,34 +12,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/tools/tools-home.pl">Tools</a>
</li>
<li>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a>
</li>
<li>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/patroncards/manage.pl?card_element=batch">Batches</a>
</li>
<li>
<a href="#" aria-current="page">
[% IF description %]
<span>Edit [% description | html %]</span>
[% ELSIF batch_id %]
<span>Edit ([% batch_id | html %])</span>
[% ELSE %]
<span>New</span>
[% END %]
</a>
</li>
</ol>
</nav>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF description %]
<span>Edit [% description | html %]</span>
[% ELSIF batch_id %]
<span>Edit ([% batch_id | html %])</span>
[% ELSE %]
<span>New</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View File

@ -1,3 +1,4 @@
[% USE raw %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( layout_id ) %]Edit ([% layout_id | html %])[% ELSE %]New[% END %] &rsaquo; Layout &rsaquo; Patron card creator &rsaquo; Tools &rsaquo; Koha</title>
@ -10,32 +11,25 @@
[% 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="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a>
</li>
<li>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Layouts</a>
</li>
<li>
<a href="#" aria-current="page">
[% IF ( layout_id ) %]
Edit ([% layout_id | html %])
[% ELSE %]
New
[% END %]
</a>
</li>
</ol>
</nav>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF ( layout_id ) %]
<span>Edit ([% layout_id | html %])</span>
[% ELSE %]
<span>New</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View File

@ -1,3 +1,4 @@
[% USE raw %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( profile_id ) %]Edit ([% profile_id | html %])[% ELSE %]New[% END%] &rsaquo; Profiles &rsaquo; Patron card creator &rsaquo; Tools &rsaquo; Koha</title>
@ -10,32 +11,25 @@
[% 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="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a>
</li>
<li>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/patroncards/manage.pl?card_element=profile">Profiles</a>
</li>
<li>
<a href="#" aria-current="page">
[% IF ( profile_id ) %]
Edit ([% profile_id | html %])
[% ELSE %]
New
[% END%]
</a>
</li>
</ol>
</nav>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF ( profile_id ) %]
<span>Edit ([% profile_id | html %])</span>
[% ELSE %]
<span>New</span>
[% END%]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
@ -44,7 +38,14 @@
[% INCLUDE 'patroncards-toolbar.inc' %]
<h1>[% IF (profile_id) %]Edit[% ELSE %]Create[% END%] printer profile[% IF (profile_id) %] ([% profile_id | html %])[% END %]</h1>
<h1>
[% IF (profile_id) %]
<span>Edit printer profile</span>
[% ELSE %]
<span>Create printer profile</span>
[% END%]
[% IF (profile_id) %] ([% profile_id | html %])[% END %]
</h1>
<form name="input" action="/cgi-bin/koha/patroncards/edit-profile.pl" method="get">
<fieldset class="rows"><legend>Profile settings</legend>
<ol>

View File

@ -12,32 +12,25 @@
[% 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="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a>
</li>
<li>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Templates</a>
</li>
<li>
<a href="#" aria-current="page">
[% IF (template_id) %]
Edit ([% template_id | html %])
[% ELSE %]
New
[% END %]
</a>
</li>
</ol>
</nav>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF (template_id) %]
<span>Edit ([% template_id | html %])</span>
[% ELSE %]
<span>New</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
@ -45,7 +38,14 @@
<main>
[% INCLUDE 'patroncards-toolbar.inc' %]
<h1>[% IF (template_id) %]Edit[% ELSE %]Create[% END %] patron card template[% IF (template_id) %] ([% template_id | html %])[% END %]</h1>
<h1>
[% IF (template_id) %]
<span>Edit patron card template</span>
[% ELSE %]
<span>Create patron card template</span>
[% END %]
[% IF (template_id) %] ([% template_id | html %])[% END %]
</h1>
<form name="input" action="/cgi-bin/koha/patroncards/edit-template.pl" method="get">
<div class="row">
<div class="col-sm-6">

View File

@ -1,4 +1,4 @@
[% USE raw %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Patron card creator &rsaquo; Tools &rsaquo; Koha</title>
[% INCLUDE 'doc-head-close.inc' %]
@ -7,23 +7,17 @@
[% WRAPPER 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
[% 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 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
</li>
<li>
<a href="#" aria-current="page">
Patron card creator
</a>
</li>
</ol>
</nav>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Patron card creator</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View File

@ -1,3 +1,4 @@
[% USE raw %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Images &rsaquo; Patron card creator &rsaquo; Tools &rsaquo; Koha</title>
@ -8,24 +9,21 @@
[% WRAPPER 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
[% END %]
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
<ol>
<li>
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
</li>
<li>
[% WRAPPER 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
</li>
<li>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a>
</li>
<li>
<a href="#" aria-current="page">
Images
</a>
</li>
</ol>
</nav>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Images</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View File

@ -34,25 +34,18 @@
[% 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="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a>
</li>
<li>
<a href="#" aria-current="page">
[% PROCESS translate_card_element element=card_element_title %]
</a>
</li>
</ol>
</nav>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% PROCESS translate_card_element element=card_element_title %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">