From 0fbf5221837d27731bab6c1b821c2a1517f4369a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 31 Mar 2023 14:27:17 +0000 Subject: [PATCH] Bug 33383: Use template wrapper for breadcrumbs: Course reserves This patch updates several course reserves 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. - Course reserves - New course - Edit course - Batch remove reserves - Course details - Add reserves (step one and two) - Batch add reserves Signed-off-by: Andrew Auld Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../course_reserves/add_items-step1.tt | 28 ++++++-------- .../course_reserves/add_items-step2.tt | 36 +++++++++--------- .../course_reserves/batch_add_items.tt | 28 ++++++-------- .../modules/course_reserves/batch_rm_items.tt | 23 ++++-------- .../modules/course_reserves/course-details.tt | 26 +++++-------- .../course_reserves/course-reserves.tt | 17 +++------ .../prog/en/modules/course_reserves/course.tt | 37 +++++++++++-------- .../modules/course_reserves/invalid-course.tt | 25 +++++-------- 8 files changed, 95 insertions(+), 125 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt index 47f494debd..751c89ac1c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Add reserves › [% course.course_name | html %] › Course reserves › Koha @@ -10,25 +11,18 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Add reserves + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt index 8c8913291d..ba14d8f2d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt @@ -1,6 +1,9 @@ +[% USE raw %] +[% USE HtmlTags %] [% USE Branches %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] +[% PROCESS 'i18n.inc' %] [% IF is_edit || course_reserve %]Edit reserve[% ELSE %]Add reserves[% END %] › [% course.course_name | html %] › Course reserves › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -12,26 +15,23 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% IF is_edit || course_reserve %] + [% tp("Edit course reserve", "Edit") | html %] + [% ELSE %] + [% tp("Place course reserve", "Reserve") | html %] + [% END %] + [% biblio.title | html | $HtmlTags tag="em" %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt index a33c6fd7bd..eb4e674a24 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE AuthorisedValues %] [% USE Branches %] [% USE ItemTypes %] @@ -15,25 +16,18 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Add reserves + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_rm_items.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_rm_items.tt index 6ead79e787..7f3f657a2a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_rm_items.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_rm_items.tt @@ -12,22 +12,15 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Batch remove reserves + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt index cb109938a3..cb415fe2ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt @@ -1,4 +1,5 @@ [% USE raw %] +[% USE HtmlTags %] [% USE Asset %] [% USE AuthorisedValues %] [% USE ItemTypes %] @@ -32,22 +33,15 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Course details for [% course.course_name | html | $HtmlTags tag="em" %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
@@ -73,7 +67,7 @@
[% END %] -
+
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt index c54b09467a..50f12bfeb6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt @@ -17,17 +17,12 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Course reserves + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt index 702637f92f..14a808b17c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt @@ -1,3 +1,5 @@ +[% USE raw %] +[% USE HtmlTags %] [% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] @@ -20,29 +22,32 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% IF course_name %] + Edit [% course_name | html | $HtmlTags tag="em" %] + [% ELSE %] + New course + [% END %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %] [% IF ( departments ) %]
    -

    [% IF course_name %] Edit [% course_name | html %] [% ELSE %] New course [% END %]

    +

    + [% IF course_name %] + Edit [% course_name | html | $HtmlTags tag="em" %] + [% ELSE %] + New course + [% END %] +

    [% IF course_id %][% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/invalid-course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/invalid-course.tt index 5c5ddee2a7..e68cdd197a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/invalid-course.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/invalid-course.tt @@ -1,5 +1,4 @@ - - +[% USE raw %] [% INCLUDE 'doc-head-open.inc' %] Course reserves › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -10,19 +9,15 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - -[% END %] + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item %] + Course reserves + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Invalid course + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
    -- 2.39.5