From 98d86424d4f7be0f2a8a83bd33bbe61f469502b7 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 6 Mar 2023 14:50:35 +0000 Subject: [PATCH] Bug 33148: Use template wrapper for breadcrumbs: Cataloging This patch updates several cataloging 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. - Cataloging -> Home page - Cataloging search results - Select two results and 'Merge selected' - Basic MARC editor - Advanced MARC editor - Item edit page - Catalog -> Search -> Bibliographic record details - Edit -> Attach item - Edit -> Link to host record (must have EasyAnalyticalRecords preference enabled) Signed-off-by: Clemens Tubach Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/cataloguing/addbiblio.tt | 53 ++++++++++--------- .../prog/en/modules/cataloguing/addbooks.tt | 42 ++++++--------- .../prog/en/modules/cataloguing/additem.tt | 34 ++++++------ .../en/modules/cataloguing/cataloging-home.tt | 19 +++---- .../prog/en/modules/cataloguing/editor.tt | 23 +++----- .../prog/en/modules/cataloguing/linkitem.tt | 26 ++++----- .../prog/en/modules/cataloguing/merge.tt | 23 +++----- .../prog/en/modules/cataloguing/moveitem.tt | 28 ++++------ 8 files changed, 107 insertions(+), 141 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index 0207a5e9e1..7e33f115d4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -1,6 +1,7 @@ [% USE raw %] [% USE Asset %] [% USE Koha %] +[% USE HtmlTags %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( biblionumber ) %]Editing [% title | html %] (Record number [% biblionumber | html %])[% ELSE %]Add MARC record[% END %] › Cataloging › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -795,28 +796,28 @@ function PopupMARCFieldDoc(field) {
Loading, please wait...
- [% INCLUDE 'header.inc' %] - [% INCLUDE 'cataloging-search.inc' %] - - + [% WRAPPER 'header.inc' %] + [% INCLUDE 'cataloging-search.inc' %] + [% END %] + +[% WRAPPER 'sub-header.inc' %] + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item %] + Cataloging + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% IF ( biblionumber ) %] + [% tp('Editing MARC record titled:', "Editing") | html %] [% title | html %] (Record number [% biblionumber | html %]) + [% ELSE %] + [% IF ( circborrowernumber ) %] + Add MARC record (fast cataloging) + [% ELSE %] + Add MARC record + [% END %] + [% END %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
@@ -826,9 +827,13 @@ function PopupMARCFieldDoc(field) {

[% IF ( biblionumber ) %] - Editing [% title | html %] (Record number [% biblionumber | html %]) + Editing [% title | $HtmlTags tag="em" %] (Record number [% biblionumber | html %]) [% ELSE %] - Add MARC record [% IF (circborrowernumber) %](fast cataloging)[% END %] + [% IF (circborrowernumber) %] + Add MARC record (fast cataloging) + [% ELSE %] + Add MARC record + [% END %] [% END %]

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt index ce30a2fc1c..09289a375f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt @@ -14,35 +14,27 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 38fdd8995a..127d2bf303 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -5,6 +5,7 @@ [% USE KohaDates %] [% USE Price %] [% USE TablesSettings %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] Items › [% biblio.title | html %] [% IF ( biblio.author ) %] by [% biblio.author | html %][% END %] (Record #[% biblio.biblionumber | html %]) › Cataloging › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -35,25 +36,24 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% tp('Items attached to a bibliographic record', 'Items') | html %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt index 289223f619..1064f74980 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt @@ -12,18 +12,13 @@ [% INCLUDE 'cataloging-search.inc' %] [% END %] - [% WRAPPER 'sub-header.inc' %] - - [% END %] +[% WRAPPER 'sub-header.inc' %] + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Cataloging + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt index 0af94ebde8..6519def77b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt @@ -21,22 +21,15 @@ [% PROCESS 'keyboard_shortcuts.inc' %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Editor + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/linkitem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/linkitem.tt index aee929ba8c..78927bc3f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/linkitem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/linkitem.tt @@ -1,4 +1,5 @@ - +[% USE raw %] +[% USE HtmlTags %] [% INCLUDE 'doc-head-open.inc' %] Link to host record › Cataloging › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -9,22 +10,15 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Link a host record to [% bibliotitle | html %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt index 9e3176616e..672fe421c5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt @@ -20,22 +20,15 @@ div#result { margin-top: 1em; } [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Merging records + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt index ba5af45734..0d89784160 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Attach an item to [% INCLUDE 'biblio-title-head.inc' %] › Cataloging › Koha @@ -9,25 +10,18 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Attach an item + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
-- 2.39.5