Bug 33007: Use template wrapper for breadcrumbs: Administration part 2

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

Note: The patch includes indentation changes, so ignore whitespace
when viewing the diff.

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

Administration ->
  - Authorized values
    - New category
    - View category
      - Add authorized value
      - Edit authorized value
 - Authority types
   - New authority type
   - Edit authority type
   - Confirm deletion of authority type
 - Manage jobs
   - Details of job
 - MARC bibliographic framework
   - New framework
   - Edit framework
   - Confirm deletion of framework
 - Library transfer limits
 - Libraries
   - New library
   - Edit library
   - Confirm deletion of library
 - Cash registers
   - New cash register
   - Edit cash register
 - Patron categories
   - New category
   - Edit category
   - Confirm deletion of category
 - MARC bibliographic framework test
 - Classification configuration
   - Modify classification source
   - Add classification source
   - Modify filing rule
   - Add filing rule
   - Modify splitting rule
   - Add splitting rule

Signed-off-by: Andrew Auld <andrew.auld@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 ad53b3b538)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
This commit is contained in:
Owen Leonard 2023-01-06 15:44:55 +00:00 committed by Jacob O'Mara
parent b427fd5876
commit 389069cb06
10 changed files with 241 additions and 371 deletions

View file

@ -46,68 +46,50 @@
[% 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/admin/admin-home.pl">Administration</a>
</li>
[% END %]
[% IF ( op == 'add_form' || loop || searchfield ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Authorized values</span>
[% END %]
[% END %]
[% IF op == 'add_form' %]
<li>
<a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a>
</li>
[% IF ( action_modify || action_add_value ) %]
<li>
<a href="#">
<a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=[% category_name | uri %]">Authorized values for category [% category_name | html %]</a>
</a>
</li>
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=[% category_name | uri %]">Authorized values for category [% category_name | html %]</a>
[% END %]
[% IF ( action_modify ) %]
<li>
<a href="#" aria-current="page">
Modify authorized value
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Modify authorized value</span>
[% END %]
[% END %]
[% IF ( action_add_value ) %]
<li>
<a href="#" aria-current="page">
New authorized value
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>New authorized value</span>
[% END %]
[% END %]
[% END %]
[% IF ( action_add_category ) %]
<li>
<a href="#" aria-current="page">
New category
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>New category</span>
[% END %]
[% END %]
[% ELSIF ( loop || searchfield ) %]
<li>
<a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a>
</li>
<li>
<a href="#" aria-current="page">
Authorized values for category [% category.category_name | html %]
</a>
</li>
[% ELSE %]
<li>
<a href="#" aria-current="page">
Authorized values
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Authorized values for category [% category.category_name | html %]</span>
[% END %]
[% END # /IF op == 'add_form' %]
</ol>
</nav> <!-- /#breadcrumbs -->
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View file

@ -21,47 +21,38 @@ Authority types &rsaquo; Administration &rsaquo; Koha
[% 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/admin/admin-home.pl">Administration</a>
</li>
[% END %]
[% IF op == 'add_form' || op == 'delete_confirm' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Authority types</span>
[% END %]
[% END %]
[% IF op == 'add_form' %]
<li>
<a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a>
</li>
<li>
<a href="#" aria-current="page">
[% IF authority_type.authtypecode.defined %]
<span>Modify authority type</span>
[% ELSE %]
<span>New authority type</span>
[% END %]
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF authority_type.authtypecode.defined %]
<span>Modify authority type</span>
[% ELSE %]
<span>New authority type</span>
[% END %]
[% END %]
[% ELSIF op == 'delete_confirm' %]
<li>
<a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a>
</li>
<li>
<a href="#" aria-current="page">
Confirm deletion of authority type
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Confirm deletion of authority type</span>
[% END %]
[% ELSE %]
<li>
<a href="#" aria-current="page">Authority types</a>
</li>
[% END %]
</ol>
</nav>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View file

@ -21,36 +21,30 @@
[% 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>
[% IF CAN_user_parameters_manage_background_jobs %]
<li>
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
</li>
[% IF op == 'view' %]
<li>
<a href="/cgi-bin/koha/admin/background_jobs.pl">Jobs</a>
</li>
<li>
<a href="#" aria-current="page">Details of job #[% job.id | html %]</a>
</li>
[% WRAPPER breadcrumbs %]
[% IF CAN_user_parameters_manage_background_jobs %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
[% END %]
[% IF op == 'view' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/background_jobs.pl">Jobs</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Details of job #[% job.id | html %]</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Jobs</span>
[% END %]
[% END %]
[% ELSE %]
<li>
<a href="#" aria-current="page">Jobs</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Administration</span>
[% END %]
[% END %]
[% ELSE %]
<li>
<a href="#" aria-current="page">Administration</a>
</li>
[% END %]
</ol>
</nav>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View file

@ -21,53 +21,40 @@ MARC frameworks &rsaquo; Administration &rsaquo; Koha
[% 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/admin/admin-home.pl">Administration</a>
</li>
[% END %]
[% IF op == 'add_form' %]
<li>
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
</li>
[% END %]
[% IF framework %]
<li>
<a href="#" aria-current="page">
Modify framework text
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
Modify framework text
[% END %]
[% ELSE %]
<li>
<a href="#" aria-current="page">
Add framework
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
Add framework
[% END %]
[% END %]
[% ELSIF op == 'delete_confirm' %]
<li>
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
</li>
<li>
<a href="#" aria-current="page">
Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?
</a>
</li>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?
[% END %]
[% ELSE %]
<li>
<a href="#" aria-current="page">
MARC frameworks
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
MARC frameworks
[% END %]
[% END %]
</ol>
</nav>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View file

@ -14,22 +14,15 @@
[% 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/admin/admin-home.pl">Administration</a>
</li>
<li>
<a href="#" aria-current="page">
Set library checkin and transfer policy
</a>
</li>
</ol>
</nav>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Set library checkin and transfer policy</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View file

@ -26,63 +26,45 @@ Libraries &rsaquo; Administration &rsaquo; Koha
[% 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/admin/admin-home.pl">Administration</a>
</li>
[% END %]
[% IF op == 'add_form' || op == 'delete_confirm' || op == 'view' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/branches.pl">Libraries</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Libraries</span>
[% END %]
[% END %]
[% IF op == 'add_form' %]
<li>
<a href="/cgi-bin/koha/admin/branches.pl">Libraries</a>
</li>
[% IF library %]
<li>
<a href="#" aria-current="page">
Modify library
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Modify library</span>
[% END %]
[% ELSE %]
<li>
<a href="#" aria-current="page">
New library [% library.branchcode | html %]
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>New library [% library.branchcode | html %]</span>
[% END %]
[% END %]
[% ELSIF op == 'delete_confirm' %]
<li>
<a href="/cgi-bin/koha/admin/branches.pl">Libraries</a>
</li>
<li>
<a href="#" aria-current="page">
Confirm deletion of library '[% library.branchcode | html %]'
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Confirm deletion of library '[% library.branchcode | html %]'</span>
[% END %]
[% ELSIF op == 'view' %]
<li>
<a href="/cgi-bin/koha/admin/branches.pl">Libraries</a>
</li>
<li>
<a href="#" aria-current="page">
[% library.branchname | html %]
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% library.branchname | html %]
[% END %]
[% ELSE %]
<li>
<a href="#" aria-current="page">
Libraries
</a>
</li>
[% END %]
</ol>
</nav>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View file

@ -23,52 +23,40 @@ Cash registers &rsaquo; Administration &rsaquo; Koha
[% 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/admin/admin-home.pl">Administration</a>
</li>
[% END %]
[% IF op == 'add_form' || op == 'delete_confirm' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/cash_registers.pl">Cash registers</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Cash registers</span>
[% END %]
[% END %]
[% IF op == 'add_form' %]
<li>
<a href="/cgi-bin/koha/admin/cash_registers.pl">Cash registers</a>
</li>
[% IF cash_register %]
<li>
<a href="#" aria-current="page">
Modify cash register [% cash_register.id | html %]
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Modify cash register [% cash_register.id | html %]</span>
[% END %]
[% ELSE %]
<li>
<a href="#" aria-current="page">
New cash register
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>New cash register</span>
[% END %]
[% END %]
[% ELSIF op == 'delete_confirm' %]
<li>
<a href="/cgi-bin/koha/admin/cash_registers.pl">Cash registers</a>
</li>
<li>
<a href="#" aria-current="page">
Confirm deletion of cash register '[% cash_register.id | html %]'
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Confirm deletion of cash register '[% cash_register.id | html %]'</span>
[% END %]
[% ELSE %]
<li>
<a href="#" aria-current="page">
Cash registers</a>
</li>
[% END %]
</ol>
</nav>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View file

@ -36,74 +36,52 @@
[% 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/admin/admin-home.pl">Administration</a>
</li>
[% END %]
[% IF op == 'add_form' || op == 'delete_confirm' || op == 'delete_confirmed' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Patron categories</span>
[% END %]
[% END %]
[% IF op == 'add_form' %]
<li>
<a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a>
</li>
[% IF ( categorycode ) %]
<li>
<a href="#" aria-current="page">
Modify category '[% categorycode | html %]'
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Modify category '[% categorycode | html %]'</span>
[% END %]
[% ELSE %]
<li>
<a href="#" aria-current="page">
New category
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>New category</span>
[% END %]
[% END %]
[% END %]
[% IF op == 'delete_confirm' %]
<li>
<a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a>
</li>
[% IF ( patrons_in_category > 0 ) %]
<li>
<a href="#" aria-current="page">
Cannot delete: Category [% categorycode | html %] in use
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Cannot delete: Category [% categorycode | html %] in use</span>
[% END %]
[% ELSE %]
<li>
<a href="#" aria-current="page">
Confirm deletion of category '[% categorycode | html %]'
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Confirm deletion of category '[% categorycode | html %]'</span>
[% END %]
[% END %]
[% END %]
[% IF op == 'delete_confirmed' %]
<li>
<a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a>
</li>
<li>
<a href="#" aria-current="page">
Category deleted
</a>
</li>
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Category deleted</span>
[% END %]
[% END %]
[% IF op == 'list' %]
<li>
<a href="#" aria-current="page">
Patron categories
</a>
</li>
[% END %]
</ol>
</nav>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View file

@ -12,27 +12,19 @@
[% 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/admin/admin-home.pl">Administration</a>
</li>
<li>
<a href="#" aria-current="page">
MARC check
[% IF ( total ) %]
: [% total | html %] errors found
[% ELSE %]
: Configuration OK!
[% END %]
</a>
</li>
</ol>
</nav>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF ( total ) %]
<span>MARC check: [% total | html %] errors found</span>
[% ELSE %]
<span>MARC check: Configuration OK!</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View file

@ -38,68 +38,51 @@ Classification sources &rsaquo; Administration &rsaquo; Koha
[% 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/admin/admin-home.pl">Administration</a>
</li>
[% IF op == 'add_source' %]
<li>
<a href="/cgi-bin/koha/admin/classsources.pl">Classification sources</a>
</li>
<li>
<a href="#" aria-current="page">
[% IF class_source %]
Modify classification source
[% ELSE %]
Add classification source
[% END %]
</a>
</li>
[% ELSIF op == 'add_sort_rule' %]
<li>
<a href="/cgi-bin/koha/admin/classsources.pl">Classification sources</a>
</li>
<li>
<a href="#" aria-current="page">
[% IF sort_rule %]
Modify filing rule
[% ELSE %]
Add filing rule
[% END %]
</a>
</li>
[% ELSIF op == 'add_split_rule' %]
<li>
<a href="/cgi-bin/koha/admin/classsources.pl">Classification sources</a>
</li>
<li>
<a href="#" aria-current="page">
[% IF split_rule %]
Modify splitting rule
[% ELSE %]
Add splitting rule
[% END %]
</a>
</li>
[% ELSE %]
<li>
<a href="#" aria-current="page">
Classification sources
</a>
</li>
[% END %]
</ol>
</nav>
[% END %]
[% IF op == 'add_source' || op == 'add_sort_rule' || op == 'add_split_rule' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/classsources.pl">Classification configuration</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Classification configuration</span>
[% END %]
[% END %]
[% IF op == 'add_source' %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF class_source %]
<span>Modify classification source</span>
[% ELSE %]
<span>Add classification source</span>
[% END %]
[% END %]
[% ELSIF op == 'add_sort_rule' %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF sort_rule %]
<span>Modify filing rule</span>
[% ELSE %]
<span>Add filing rule</span>
[% END %]
[% END %]
[% ELSIF op == 'add_split_rule' %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF split_rule %]
<span>Modify splitting rule</span>
[% ELSE %]
<span>Add splitting rule</span>
[% END %]
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">