From e244c13e020fc0ea94fcb1adc76b2ff2eae8d14a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 6 Mar 2023 16:51:56 +0000 Subject: [PATCH] Bug 33149: Use template wrapper for breadcrumbs: Circulation part 1 This patch updates several circulation templates so that they use the new WRAPPER for displaying breadcrumbs. The patch also makes a minor change to bookcount.pl to allow for correct display of the record title using the biblio-title include. Navigation context for bookcount.tt has been changed to "catalog" from "circulation" because the page is linked to from a catalog-related page. To test, apply the patch and test each page and its variations. Breadcrumbs should look correct, and each link should be correct. - Circulation home page - Checkout notes - Article requests - Transfer - Overdues with fines - Check out -> Check out to patron -> - Batch check out - Catalog -> Search -> Bibliographic record -> Items - View item's checkout history. The updated page should show this new breadcrumb sequence: Home -> Catalog -> [title] -> Items -> Circulation statistics Signed-off-by: Andrew Auld Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- circ/bookcount.pl | 1 + .../prog/en/modules/circ/article-requests.tt | 22 +++---- .../prog/en/modules/circ/bookcount.tt | 57 ++++++++++--------- .../prog/en/modules/circ/branchoverdues.tt | 26 ++++----- .../prog/en/modules/circ/branchtransfers.tt | 25 ++++---- .../prog/en/modules/circ/checkout-notes.tt | 24 +++----- .../prog/en/modules/circ/circulation-home.tt | 19 ++----- .../circ/circulation_batch_checkouts.tt | 35 ++++-------- 8 files changed, 85 insertions(+), 124 deletions(-) diff --git a/circ/bookcount.pl b/circ/bookcount.pl index eaca8c4d04..0d4a79590c 100755 --- a/circ/bookcount.pl +++ b/circ/bookcount.pl @@ -68,6 +68,7 @@ for my $library ( @$libraries ) { } $template->param( + biblio => $biblio, biblionumber => $biblionumber, title => $biblio->title, author => $biblio->author, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt index bb64189312..a81947a707 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt @@ -133,22 +133,16 @@ [% INCLUDE 'cat-search.inc' %] [% END %] - [% WRAPPER 'sub-header.inc' %] - - [% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Article requests + [% END %] + [% END #/ WRAPPER breadcrumbs %] + [% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt index 43dc82d75f..c3a4e7b5c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt @@ -1,51 +1,54 @@ +[% USE raw %] [% USE Koha %] [% USE KohaDates %] [% USE Branches %] [% SET footerjs = 1 %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Circulation statistics for [% title | html %] › Circulation › Koha +Circulation statistics for [% title | html %] › Catalog › Koha [% INCLUDE 'doc-head-close.inc' %] - + [% WRAPPER 'header.inc' %] - [% INCLUDE 'circ-search.inc' %] + [% INCLUDE 'cat-search.inc' %] [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
-

Circulation statistics for [% title | html %] [% IF ( author ) %] by [% author |html %][% END %]

+

+ [% IF ( author ) %] + Circulation statistics for [% INCLUDE 'biblio-title.inc' %] by [% author |html %] + [% ELSE %] + Circulation statistics for [% INCLUDE 'biblio-title.inc' %] + [% END %] +

[% INCLUDE 'blocking_errors.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt index 82cad8605f..1f3baf4045 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt @@ -1,5 +1,7 @@ +[% USE raw %] [% USE Branches %] [% USE Koha %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] Overdues at [% Branches.GetLoggedInBranchname | html %] › Circulation › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -9,23 +11,17 @@ [% INCLUDE 'circ-search.inc' %] [% END %] + [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% tx('Overdues at {library}', { library = Branches.GetLoggedInBranchname }) %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt index ea5ffe7887..d3e7369ffc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE Koha %] [% USE Branches %] [% USE ItemTypes %] @@ -11,23 +12,17 @@ [% INCLUDE 'circ-search.inc' %] [% END %] + [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Transfers + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt index 1e4eb701f0..82a4f5e1d5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt @@ -15,24 +15,16 @@ [% INCLUDE 'circ-search.inc' %] [% END %] - [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Checkout notes + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt index 2e7849c630..1c2c071bcb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt @@ -11,19 +11,12 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Circulation + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt index 8d89c75e09..f5396da1ba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt @@ -25,34 +25,21 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Batch check out + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
-- 2.39.5