From 4e957afb9aa7449546c73c2335c0a69f6cd2048d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 4 Apr 2023 16:39:02 +0000 Subject: [PATCH] Bug 33410: Use template wrapper for breadcrumbs: Patron card creator This patch updates several patron card creator templates so that they use the new WRAPPER for displaying breadcrumbs. Unrelated minor change: I added around a few other strings in edit-profile.tt and edit-template.tt in order to improve translatability. To test, apply the patch and test each page and its variations. Breadcrumbs should look correct, and each link should be correct. - Tools -> - Patron card creator - New -> - Card batch - Image - Layout - Card template - Printer profile - Manage -> - Card batches - Images - Layouts - Card templates - Printer profiles Signed-off-by: Matt Blenkinsop Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/patroncards/edit-batch.tt | 43 +++++++--------- .../en/modules/patroncards/edit-layout.tt | 40 +++++++-------- .../en/modules/patroncards/edit-profile.tt | 49 ++++++++++--------- .../en/modules/patroncards/edit-template.tt | 48 +++++++++--------- .../prog/en/modules/patroncards/home.tt | 28 +++++------ .../en/modules/patroncards/image-manage.tt | 30 ++++++------ .../prog/en/modules/patroncards/manage.tt | 27 ++++------ 7 files changed, 119 insertions(+), 146 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt index 58615048b9..e83941a458 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt @@ -12,34 +12,27 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - - [% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% IF description %] + Edit [% description | html %] + [% ELSIF batch_id %] + Edit ([% batch_id | html %]) + [% ELSE %] + New + [% END %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] + [% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-layout.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-layout.tt index 4ccd13e469..5ab532b15e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-layout.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-layout.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( layout_id ) %]Edit ([% layout_id | html %])[% ELSE %]New[% END %] › Layout › Patron card creator › Tools › Koha @@ -10,32 +11,25 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - - [% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% IF ( layout_id ) %] + Edit ([% layout_id | html %]) + [% ELSE %] + New + [% END %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] + [% END #/ WRAPPER sub-header.inc %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-profile.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-profile.tt index af4e464fd7..0d96f48745 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-profile.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-profile.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( profile_id ) %]Edit ([% profile_id | html %])[% ELSE %]New[% END%] › Profiles › Patron card creator › Tools › Koha @@ -10,32 +11,25 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - - [% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% IF ( profile_id ) %] + Edit ([% profile_id | html %]) + [% ELSE %] + New + [% END%] + [% END %] + [% END #/ WRAPPER breadcrumbs %] + [% END #/ WRAPPER sub-header.inc %]
@@ -44,7 +38,14 @@ [% INCLUDE 'patroncards-toolbar.inc' %] -

[% IF (profile_id) %]Edit[% ELSE %]Create[% END%] printer profile[% IF (profile_id) %] ([% profile_id | html %])[% END %]

+

+ [% IF (profile_id) %] + Edit printer profile + [% ELSE %] + Create printer profile + [% END%] + [% IF (profile_id) %] ([% profile_id | html %])[% END %] +

Profile settings
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-template.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-template.tt index c4a2105973..8accfe9dae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-template.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-template.tt @@ -12,32 +12,25 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - - [% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% IF (template_id) %] + Edit ([% template_id | html %]) + [% ELSE %] + New + [% END %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] + [% END #/ WRAPPER sub-header.inc %]
    @@ -45,7 +38,14 @@
    [% INCLUDE 'patroncards-toolbar.inc' %] -

    [% IF (template_id) %]Edit[% ELSE %]Create[% END %] patron card template[% IF (template_id) %] ([% template_id | html %])[% END %]

    +

    + [% IF (template_id) %] + Edit patron card template + [% ELSE %] + Create patron card template + [% END %] + [% IF (template_id) %] ([% template_id | html %])[% END %] +

    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/home.tt index 1972d8e77b..1c47375bc9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/home.tt @@ -1,4 +1,4 @@ - +[% USE raw %] [% INCLUDE 'doc-head-open.inc' %] Patron card creator › Tools › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -7,23 +7,17 @@ [% WRAPPER 'header.inc' %] [% INCLUDE 'cat-search.inc' %] [% END %] - [% WRAPPER 'sub-header.inc' %] - - [% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Patron card creator + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt index 9f39a0f848..022f80c8f4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Images › Patron card creator › Tools › Koha @@ -8,24 +9,21 @@ [% WRAPPER 'header.inc' %] [% INCLUDE 'cat-search.inc' %] [% END %] - + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Images + [% END %] + [% END #/ WRAPPER breadcrumbs %] +[% END #/ WRAPPER sub-header.inc %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt index 531376b0c7..9603931242 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt @@ -34,25 +34,18 @@ [% END %] [% WRAPPER 'sub-header.inc' %] - - [% END %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% PROCESS translate_card_element element=card_element_title %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] + [% END #/ WRAPPER sub-header.inc %]
    -- 2.39.5