Bug 33437: Use template wrapper for breadcrumbs: Reports part 2

This patch updates several reports 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.

- Reports ->
  - Most circulated items
    - Report results
  - Items with no checkouts
    - Report results
  - Catalog statistics wizard
    - Report results
  - View dictionary
    - New definition (steps 1-5)
  - Saved reports
    - View report
    - New report
    - Edit report
  - Guided reports
    - Build a report
      - Steps 1 through 6

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fb940cf8c4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Owen Leonard 2023-04-17 17:14:05 +00:00 committed by Martin Renvoize
parent b0a196e115
commit 22b9199c98
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
5 changed files with 148 additions and 214 deletions

View File

@ -1,3 +1,4 @@
[% USE raw %]
[% USE Branches %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
@ -11,33 +12,24 @@
[% 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/reports/reports-home.pl">Reports</a>
</li>
[% IF ( do_it ) %]
<li>
<a href="/cgi-bin/koha/reports/cat_issues_top.pl">Most-circulated items</a>
</li>
<li>
<a href="#" aria-current="page">
Results
</a>
</li>
[% ELSE %]
<li>
<a href="#" aria-current="page">
Most-circulated items
</a>
</li>
[% END %]
</ol>
</nav>
[% END %]
[% IF ( do_it ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/reports/cat_issues_top.pl">Most-circulated items</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Results</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Most-circulated items</span>
[% END %]
[% END # /IF ( do_it ) %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View File

@ -1,3 +1,4 @@
[% USE raw %]
[% USE Branches %]
[% USE ItemTypes %]
[% INCLUDE 'doc-head-open.inc' %]
@ -14,22 +15,24 @@
[% 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/reports/reports-home.pl">Reports</a>
</li>
<li>
<a href="#" aria-current="page">
Items with no checkouts
</a>
</li>
</ol>
</nav>
[% END %]
[% END %]
[% IF ( do_it ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/reports/catalogue_out.pl">Items with no checkouts</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Results</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Items with no checkouts</span>
[% END %]
[% END # /IF ( do_it ) %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View File

@ -1,3 +1,4 @@
[% USE raw %]
[% USE Branches %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
@ -11,33 +12,24 @@
[% 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/reports/reports-home.pl">Reports</a>
</li>
[% IF ( do_it ) %]
<li>
<a href="/cgi-bin/koha/reports/catalogue_stats.pl">Catalog statistics</a>
</li>
<li>
<a href="#" aria-current="page">
Results
</a>
</li>
[% ELSE %]
<li>
<a href="#" aria-current="page">
Catalog statistics
</a>
</li>
[% END %]
</ol>
</nav>
[% END %]
[% IF ( do_it ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/reports/catalogue_stats.pl">Catalog statistics</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Results</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Catalog statistics</span>
[% END %]
[% END # /IF ( do_it ) %]
[% 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>Dictionary &rsaquo; Guided reports &rsaquo; Reports &rsaquo; Koha</title>
@ -22,78 +23,45 @@
[%- 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/reports/reports-home.pl">Reports</a>
</li>
<li>
<a href="/cgi-bin/koha/reports/guided_reports.pl">Guided reports wizard</a>
</li>
[% IF ( new_dictionary ) %]
<li>
<a href="/cgi-bin/koha/reports/dictionary.pl">Dictionary</a>
</li>
<li>
<a href="#" aria-current="page">
Name the new definition
</a>
</li>
[% ELSIF ( step_2 ) %]
<li>
<a href="/cgi-bin/koha/reports/dictionary.pl">Dictionary</a>
</li>
<li>
<a href="#" aria-current="page">
Step 2: Choose the area
</a>
</li>
[% ELSIF ( step_3 ) %]
<li>
<a href="/cgi-bin/koha/reports/dictionary.pl">Dictionary</a>
</li>
<li>
<a href="#" aria-current="page">
Step 3: Choose a column
</a>
</li>
[% ELSIF ( step_4 ) %]
<li>
<a href="/cgi-bin/koha/reports/dictionary.pl">Dictionary</a>
</li>
<li>
<a href="#" aria-current="page">
Step 4: Specify a value
</a>
</li>
[% ELSIF ( step_5 ) %]
<li>
<a href="/cgi-bin/koha/reports/dictionary.pl">Dictionary</a>
</li>
<li>
<a href="#" aria-current="page">
Step 5: Confirm definition
</a>
</li>
[% ELSE %]
<li>
<a href="#" aria-current="page">
Dictionary
</a>
</li>
[% END %]
</ol>
</nav>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/reports/guided_reports.pl">Guided reports wizard</a>
[% END %]
[% IF ( new_dictionary || step_2 || step_3 || step_4 || step_5 ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/reports/dictionary.pl">Dictionary</a>
[% END %]
[% END %]
[% IF ( new_dictionary ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Name the new definition</span>
[% END %]
[% ELSIF ( step_2 ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Step 2: Choose the area</span>
[% END %]
[% ELSIF ( step_3 ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Step 3: Choose a column</span>
[% END %]
[% ELSIF ( step_4 ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Step 4: Specify a value</span>
[% END %]
[% ELSIF ( step_5 ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Step 5: Confirm definition</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Dictionary</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">

View File

@ -68,87 +68,66 @@
[% 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/reports/reports-home.pl">Reports</a>
</li>
<li>
<a href="/cgi-bin/koha/reports/guided_reports.pl">Guided reports wizard</a>
</li>
[% IF ( saved1 ) %]
<li>
<a href="#" aria-current="page">
Saved reports
</a>
</li>
[% ELSIF ( create ) %]
<li>
<a href="#" aria-current="page">
Create from SQL
</a>
</li>
[% ELSIF ( showsql ) %]
<li>
<a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a>
</li>
<li>
<a href="#" aria-current="page">
[% reportname | html %] ([% id | html %])
</a>
</li>
[% ELSIF ( editsql ) %]
<li>
<a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a>
</li>
<li>
<a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id | uri %]&amp;phase=Show%20SQL">[% reportname | html %] ([% id | html %])</a>
</li>
<li>
<a href="#" aria-current="page">
Edit
</a>
</li>
[% ELSIF ( execute ) %]
<li>
<a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a>
</li>
<li>
<a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id | uri %]&amp;phase=Show%20SQL">[% name | html %] ([% id | html %])</a>
</li>
<li>
<a href="#" aria-current="page">
Run
</a>
</li>
[% ELSIF ( build1 || build2 || build3 || build4 || build5 || build6 ) %]
<li>
<a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build a report</a>
</li>
<li>
<a href="#" aria-current="page">
[% IF ( build1 ) %]
<span>Step 1 of 6: Choose a module</span>
[% ELSIF ( build2 ) %]
<span>Step 2 of 6: Pick a report type</span>
[% ELSIF ( build3 ) %]
<span>Step 3 of 6: Select columns for display</span>
[% ELSIF ( build4 ) %]
<span>Step 4 of 6: Select criteria to limit on</span>
[% ELSIF ( build5 ) %]
<span>Step 5 of 6: Pick which columns to total</span>
[% ELSIF ( build6 ) %]
<span>Step 6 of 6: Select how you want the report ordered</span>
[% END %]
</a>
[% END %]
</ol>
</nav> <!-- /#breadcrumbs -->
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/reports/guided_reports.pl">Guided reports wizard</a>
[% END %]
[% IF ( showsql || editsql || execute ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a>
[% END %]
[% END %]
[% IF ( saved1 ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Saved reports</span>
[% END %]
[% ELSIF ( create ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Create from SQL</span>
[% END %]
[% ELSIF ( showsql ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% reportname | html %] ([% id | html %])
[% END %]
[% ELSIF ( editsql ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id | uri %]&amp;phase=Show%20SQL">[% reportname | html %] ([% id | html %])</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Edit</span>
[% END %]
[% ELSIF ( execute ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id | uri %]&amp;phase=Show%20SQL">[% name | html %] ([% id | html %])</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Run</span>
[% END %]
[% ELSIF ( build1 || build2 || build3 || build4 || build5 || build6 ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build a report</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF ( build1 ) %]
<span>Step 1 of 6: Choose a module</span>
[% ELSIF ( build2 ) %]
<span>Step 2 of 6: Pick a report type</span>
[% ELSIF ( build3 ) %]
<span>Step 3 of 6: Select columns for display</span>
[% ELSIF ( build4 ) %]
<span>Step 4 of 6: Select criteria to limit on</span>
[% ELSIF ( build5 ) %]
<span>Step 5 of 6: Pick which columns to total</span>
[% ELSIF ( build6 ) %]
<span>Step 6 of 6: Select how you want the report ordered</span>
[% END # /IF ( build1 ) %]
[% END # /WRAPPER breadcrumb_item %]
[% END # /IF ( saved1 ) %]
[% END # /WRAPPER breadcrumbs %]
[% END # /WRAPPER 'sub-header.inc' %]
<div id="update_sql" class="modal" tabindex="-1" role="dialog" aria-labelledby="update_sql_label" aria-hidden="true">
<div class="modal-dialog">