From 6e8e1de4f1a1267a42c1f1590058593708e1b3f6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 25 Aug 2023 15:00:20 +0000 Subject: [PATCH] Bug 34395: Fix inconsistencies in Authority types page titles, breadcrumbs, and header This patch fixes some inconsistencies in the authority types administration page, making sure the page title, breadcrumb navigation, and page headers are consistent with each other. Test each page to confirm that page title, heading, and breadcrumbs are consistent: - Administration -> Authority types - New authority type - Edit authority type - Delete an authority type which is not used - Delete an authority type which is in use - Authority type MARC structure - New tag - Edit tag - Delete tag - View subfields - Edit subfields Signed-off-by: Martin Renvoize --- .../modules/admin/auth_subfields_structure.tt | 32 ++++-- .../en/modules/admin/auth_tag_structure.tt | 104 +++++++++--------- .../prog/en/modules/admin/authtypes.tt | 54 ++++++--- 3 files changed, 112 insertions(+), 78 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt index e591e6b3ac2..11ca22de5f2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt @@ -4,10 +4,28 @@ [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% FILTER collapse %] - [% t("Authority MARC subfield structure") | html %] › + [% IF ( add_form ) %] + [% t("Edit subfields constraints") | html %] › + [% END %] + + [% IF ( delete_confirm ) %] + [% tx("Confirm deletion of subfield '{subfield}'", {subfield = ass.tagsubfield }) | html %] › + [% END %] + + [% IF ( add_form || delete_confirm || else ) %] + [% tx("Tag {tag}", { tag = tagfield}) | html %] › + [% END %] + + [% IF ( authtypecode ) %] + [% tx("'{authtypecode}' framework", { authtypecode = authtypecode }) | html %] + [% ELSE %] + [% t("Default framework") | html %] + [% END %] › + [% t("Authority types") | html %] › [% t("Administration") | html %] › [% t("Koha") | html %] [% END %] + [% INCLUDE 'doc-head-close.inc' %] @@ -30,7 +48,7 @@ [% IF ( authtypecode ) %] [% WRAPPER breadcrumb_item %] - [% authtypecode | html %] framework + [% tx("'{authtypecode}' framework", { authtypecode = authtypecode }) | html %] [% END %] [% ELSE %] [% WRAPPER breadcrumb_item %] @@ -40,17 +58,17 @@ [% IF ( else ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Authority MARC subfield structure for [% tagfield | html %] + [% tx("Tag {tag}", { tag = tagfield}) | html %] [% END %] [% ELSE %] [% WRAPPER breadcrumb_item %] - Authority MARC subfield structure for [% tagfield | html %] + [% tx("Tag {tag}", { tag = tagfield}) | html %] [% END %] [% END %] [% IF ( delete_confirm ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Confirm deletion of subfield [% tagsubfield | html %]? + [% tx("Confirm deletion of subfield '{tagsubfield}'", { tagsubfield = ass.tagsubfield }) | html %] [% END %] [% END %] @@ -58,7 +76,7 @@ [% IF ( use_heading_flags_p ) %] [% IF ( heading_edit_subfields_p ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Edit MARC subfields constraints + Edit subfields constraints [% END %] [% END %] [% ELSE %] @@ -282,7 +300,7 @@ [% IF ( delete_confirm ) %]
-

Delete subfield '[% ass.tagsubfield | html %]'?

+

Confirm deletion of subfield '[% ass.tagsubfield | html %]'?

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt index b967e80737b..83694421520 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt @@ -6,44 +6,25 @@ [% INCLUDE 'doc-head-open.inc' %] [% FILTER collapse %] [% IF ( add_form ) %] - [% IF ( use_heading_flags_p ) %] - [% IF ( heading_modify_tag_p ) %] - [% t("Modify tag ") | html %] › - [% IF ( authtypecode ) %] - [% tx("{authtypecode} framework", { authtypecode = authtypecode }) | html %] - [% ELSE %] - [% t("Default framework") | html %] - [% END %] › - [% END %] - [% IF ( heading_add_tag_p ) %] - [% t("New tag") | html %] › - [% IF ( authtypecode ) %] - [% tx("{authtypecode} framework", { authtypecode = authtypecode }) | html %] - [% ELSE %] - [% t("Default framework") | html %] - [% END %] › - [% END %] - [% ELSE %] - [% action | html %] › + [% IF ( heading_modify_tag_p ) %] + [% tx("Modify tag '{searchfield}'", { searchfield = searchfield }) | html %] › + [% END %] + [% IF ( heading_add_tag_p ) %] + [% t("New tag") | html %] › [% END %] [% END %] [% IF ( delete_confirm ) %] - [% t("Confirm deletion") | html %] › - [% IF ( authtypecode ) %] - [% tx("{authtypecode} framework", { authtypecode = authtypecode }) | html %] - [% ELSE %] - [% t("Default framework") | html %] - [% END %] › + [% tx("Confirm deletion of tag '{searchfield}'", { searchfield = searchfield }) | html %] › [% END %] [% IF ( delete_confirmed ) %] [% t("Data deleted") | html %] › - [% IF ( authtypecode ) %] - [% tx("{authtypecode} framework", { authtypecode = authtypecode }) | html %] - [% ELSE %] - [% t("Default framework") | html %] - [% END %] › [% END %] - [% t("Authority MARC framework") | html %] › + [% IF ( authtypecode ) %] + [% tx("'{authtypecode}' framework", { authtypecode = authtypecode }) | html %] + [% ELSE %] + [% t("Default framework") | html %] + [% END %] › + [% t("Authority types") | html %] › [% t("Administration") | html %] › [% t("Koha") | html %] [% END %] @@ -68,7 +49,7 @@ [% IF ( add_form || delete_confirm || delete_confirmed ) %] [% IF ( authtypecode ) %] [% WRAPPER breadcrumb_item %] - [% authtypecode | html %] Framework + [% tx("'{authtypecode}' framework", { authtypecode = authtypecode }) | html %] [% END %] [% ELSE %] [% WRAPPER breadcrumb_item %] @@ -81,7 +62,7 @@ [% IF ( use_heading_flags_p ) %] [% IF ( heading_modify_tag_p ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Modify tag + [% tx("Modify tag {searchfield}", { searchfield = searchfield }) | html %] [% END %] [% END %] @@ -100,7 +81,7 @@ [% ELSE %] [% IF ( delete_confirm ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Confirm deletion + [% tx("Confirm deletion of tag '{searchfield}'", { searchfield = searchfield }) | html %] [% END %] [% ELSE %] [% IF ( delete_confirmed ) %] @@ -110,7 +91,7 @@ [% ELSE %] [% IF ( authtypecode ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - [% authtypecode | html %] Framework + [% tx("{authtypecode} framework", { authtypecode = authtypecode }) | html %] [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] @@ -129,14 +110,27 @@
-

Authority MARC framework for [% IF ( authtypecode ) %][% authtypecode | html %][% ELSE %]default framework[% END %]

+ [% IF ( else ) %] + + [% END %] + +

+ [% IF ( authtypecode ) %] + [% tx("Authority MARC framework for '{authtypecode}'", { authtypecode = authtypecode }) | html %] + [% ELSE %] + [% t("Default authority MARC framework") | html %] + [% END %] +

[% IF ( add_form ) %]

[% IF ( heading_modify_tag_p ) %] - Modify tag + [% tx("Modify tag '{searchfield}'", { searchfield = searchfield }) | html %] [% END %] [% IF ( heading_add_tag_p ) %] New tag @@ -196,7 +190,7 @@ [% IF ( delete_confirm ) %]
-

Confirm deletion

+

[% tx("Confirm deletion of tag '{searchfield}'", { searchfield = searchfield }) | html %]

@@ -243,24 +237,24 @@ [% IF ( else ) %] - - -

Select an authority framework

- - - -
+
+ + + + + +
+ +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt index e0128143e96..ca7eae5d017 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt @@ -6,12 +6,20 @@ [% FILTER collapse %] [% IF op == 'add_form' %] [% IF authority_type.authtypecode.defined %] - [% t("Modify authority type") | html %] + [% IF authority_type.authtypecode %] + [% tx("Modify authority type '{authority_type_code}'", { authority_type_code= authority_type.authtypecode }) | html %] + [% ELSE %] + [% t("Modify default authority type") | html %] + [% END %] [% ELSE %] [% t("New authority type") | html %] [% END %] › [% ELSIF op == 'delete_confirm' %] - [% t("Confirm deletion of authority type") | html %] › + [% IF authorities_using_it %] + [% t("Authority type cannot be deleted") | html %] + [% ELSE %] + [% tx("Confirm deletion of authority type '{authority_type_code}'", { authority_type_code= authority_type.authtypecode } ) | html %] + [% END %] › [% END %] [% t("Authority types") | html %] › [% t("Administration") | html %] › @@ -44,7 +52,11 @@ [% IF op == 'add_form' %] [% WRAPPER breadcrumb_item bc_active= 1 %] [% IF authority_type.authtypecode.defined %] - <span>Modify authority type</span> + [% IF authority_type.authtypecode %] + [% tx("Modify authority type '{authority_type_code}'", { authority_type_code= authority_type.authtypecode }) | html %] + [% ELSE %] + [% t("Modify default authority type") | html %] + [% END %] [% ELSE %] <span>New authority type</span> [% END %] @@ -52,7 +64,11 @@ [% ELSIF op == 'delete_confirm' %] [% WRAPPER breadcrumb_item bc_active= 1 %] - <span>Confirm deletion of authority type</span> + [% IF authorities_using_it %] + [% t("Authority type cannot be deleted") | html %] + [% ELSE %] + [% tx("Confirm deletion of authority type '{authority_type_code}'", { authority_type_code= authority_type.authtypecode } ) | html %] + [% END %] [% END %] [% END %] @@ -89,16 +105,19 @@ [% IF op == 'add_form' %] <form action="/cgi-bin/koha/admin/authtypes.pl" name="Aform" method="post" class="validated"> - <fieldset class="rows"> - <legend> - <h1> - [% IF authority_type.authtypecode.defined %] - Modify authority type + <h1> + [% IF authority_type.authtypecode.defined %] + [% IF authority_type.authtypecode %] + [% tx("Modify authority type '{authority_type_code}'", { authority_type_code= authority_type.authtypecode }) | html %] [% ELSE %] - New authority type + [% t("Modify default authority type") | html %] [% END %] - </h1> - </legend> + [% ELSE %] + <span>New authority type</span> + [% END %] + </h1> + <fieldset class="rows"> + <legend class="sr-only">Enter authority type details</legend> <ol> <li> [% IF authority_type.authtypecode.defined %] @@ -107,10 +126,10 @@ <input type="hidden" name="checked" value="0" /> <input type="hidden" name="authtypecode" value="[% authority_type.authtypecode | html %]" />[% authority_type.authtypecode | html %] [% ELSE %] - <div class="hint">10 characters maximum</div> <label for="authtypecode" class="required">Authority type: </label> <input id="authtypecode" type="text" class="required focus" required="required" name="authtypecode" size="20" maxlength="10" /> <span class="required">Required</span> + <div class="hint">10 characters maximum</div> [% END %] </li> <li> @@ -123,9 +142,9 @@ <textarea id="summary" name="summary" cols="55" rows="7">[% authority_type.summary | html %]</textarea> </li> <li> - <div class="hint">Note: for 'Authority field to copy', enter the authority field that should be copied from the authority record to the bibliographic record. E.g., in MARC21, field 100 in the authority record should be copied to field 100 in the bibliographic record</div> <label for="auth_tag_to_report">Authority field to copy: </label> <input type="text" id="auth_tag_to_report" name="auth_tag_to_report" size="5" maxlength="3" value="[% authority_type.auth_tag_to_report | html %]" /> + <div class="hint">Note: for 'Authority field to copy', enter the authority field that should be copied from the authority record to the bibliographic record. E.g., in MARC21, field 100 in the authority record should be copied to field 100 in the bibliographic record</div> <input type="hidden" name="op" value="add_validate" /> [% IF authority_type.authtypecode.defined %] <input type="hidden" name="is_a_modif" value="1" /> @@ -144,8 +163,11 @@ <div class="dialog alert"> [% IF authorities_using_it %] <h1>This authority type cannot be deleted</h1> - <p>This record is used <strong>[% authorities_using_it | html %]</strong> times</p> - <a class="cancel" href="/cgi-bin/koha/admin/authtypes.pl">Back to the list</a> + <p><strong><span class="ex">[% authority_type.authtypecode | html %]</span></strong></p> + <p>[% tnx('This authority type is used {count} time.', 'This authority type is used {count} times', authorities_using_it, { count = authorities_using_it }) %]</p> + <form action="/cgi-bin/koha/admin/authtypes.pl" method="get"> + <button type="submit"><i class="fa fa-fw fa-arrow-left"></i> Return to authority types</button> + </form> [% ELSE %] <h1>Confirm deletion of authority structure definition for <span class="ex">'[% authority_type.authtypetext | html %]' ([% authority_type.authtypecode | html %])</span></h1> <form action="/cgi-bin/koha/admin/authtypes.pl" method="post"> -- 2.41.0
Tag: [% searchfield | html %] [% liblibrarian | html %]