Bugzilla – Attachment 156585 Details for
Bug 34393
Inconsistencies in MARC bibliographic framework page titles, breadcrumbs, and header
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34393: Fix inconsistencies in MARC bibliographic framework page titles, breadcrumbs, and header
Bug-34393-Fix-inconsistencies-in-MARC-bibliographi.patch (text/plain), 21.28 KB, created by
Katrin Fischer
on 2023-10-05 20:51:17 UTC
(
hide
)
Description:
Bug 34393: Fix inconsistencies in MARC bibliographic framework page titles, breadcrumbs, and header
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-10-05 20:51:17 UTC
Size:
21.28 KB
patch
obsolete
>From 3896fb65a42e17fc5a5fd18b3ef8a4d4988fcb18 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 2 Oct 2023 18:41:15 +0000 >Subject: [PATCH] Bug 34393: Fix inconsistencies in MARC bibliographic > framework page titles, breadcrumbs, and header > >This patch fixes some inconsistencies in the MARC bibliographic >framework administration page, making sure the page title, breadcrumb >navigation, and page headers are consistent with each other. > >The file admin/marc_subfields_structure.pl is modified so that it >provides the framework name to the template. > >Test each page to confirm that page title, heading, and breadcrumbs are >consistent: > >- MARC bibliographic frameworks > - New framework > - Edit framework > - Delete a framework which is not used > - Delete a framework which is in use > - Framework MARC structure > - New tag > - Edit tag > - Delete tag > - View subfields > - Edit subfields > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > admin/marc_subfields_structure.pl | 6 +- > .../prog/en/modules/admin/biblio_framework.tt | 40 ++++++---- > .../modules/admin/marc_subfields_structure.tt | 74 ++++++++----------- > .../prog/en/modules/admin/marctagstructure.tt | 35 +++++---- > 4 files changed, 81 insertions(+), 74 deletions(-) > >diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl >index 8fe34624fd..10f16e182f 100755 >--- a/admin/marc_subfields_structure.pl >+++ b/admin/marc_subfields_structure.pl >@@ -27,6 +27,7 @@ use C4::Context; > use Koha::Authority::Types; > use Koha::AuthorisedValueCategories; > use Koha::Filter::MARC::ViewPolicy; >+use Koha::BiblioFrameworks; > > use List::MoreUtils qw( uniq ); > >@@ -52,11 +53,14 @@ my $cache = Koha::Caches->get_instance(); > my $op = $input->param('op') || ""; > $tagfield =~ s/\,//g; > >+my $framework = Koha::BiblioFrameworks->search({ frameworkcode => $frameworkcode })->next; >+ > if ($op) { > $template->param( > script_name => $script_name, > tagfield => $tagfield, > frameworkcode => $frameworkcode, >+ framework => $framework, > $op => 1 > ); # we show only the TMPL_VAR names $op > } >@@ -65,6 +69,7 @@ else { > script_name => $script_name, > tagfield => $tagfield, > frameworkcode => $frameworkcode, >+ framework => $framework, > else => 1 > ); # we show only the TMPL_VAR names $op > } >@@ -199,7 +204,6 @@ if ( $op eq 'add_form' ) { > $template->param( 'use_heading_flags_p' => 1 ); > $template->param( 'heading_edit_subfields_p' => 1 ); > $template->param( >- action => "Edit subfields", > tagfield => $tagfield, > tagsubfield => $tagsubfield, > loop => \@loop_data, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >index 6acf1b92cf..540988a26d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >@@ -6,14 +6,18 @@ > <title>[% FILTER collapse %] > [% IF op == 'add_form' %] > [% IF framework %] >- [% t("Modify framework text") | html %] >+ [% tx("Modify framework '{framework}' ({frameworkcode})", { framework = framework.frameworktext, frameworkcode = framework.frameworkcode }) | html %] > [% ELSE %] >- [% t("Add framework") | html %] >+ [% t("New framework") | html %] > [% END %] › > [% ELSIF op == 'delete_confirm' %] >- [% tx("Delete framework for {framework} ({frameworkcode})?", { framework = framework.frameworktext, frameworkcode = framework.frameworkcode }) | html %] › >+ [% IF ( biblios_use_this_framework ) %] >+ [% tx("Framework cannot be deleted", { framework = framework.frameworktext, frameworkcode = framework.frameworkcode }) | html %] › >+ [% ELSE %] >+ [% tx("Confirm deletion of framework '{framework}' ({frameworkcode})", { framework = framework.frameworktext, frameworkcode = framework.frameworkcode }) | html %] › >+ [% END %] > [% END %] >- [% t("MARC frameworks") | html %] › >+ [% t("MARC bibliographic frameworks") | html %] › > [% t("Administration") | html %] › > [% t("Koha") | html %] > [% END %]</title> >@@ -33,29 +37,33 @@ > > [% IF op == 'add_form' %] > [% WRAPPER breadcrumb_item %] >- <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a> >+ <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC bibliographic frameworks</a> > [% END %] > [% IF framework %] > [% WRAPPER breadcrumb_item bc_active= 1 %] >- <span>Modify framework text</span> >+ [% tx("Modify framework '{framework}' ({frameworkcode})", { framework = framework.frameworktext, frameworkcode = framework.frameworkcode }) | html %] > [% END %] > [% ELSE %] > [% WRAPPER breadcrumb_item bc_active= 1 %] >- <span>Add framework</span> >+ <span>New framework</span> > [% END %] > [% END %] > > [% ELSIF op == 'delete_confirm' %] > [% WRAPPER breadcrumb_item %] >- <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a> >+ <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC bibliographic frameworks</a> > [% END %] > [% WRAPPER breadcrumb_item bc_active= 1 %] >- <span>Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?</span> >+ [% IF ( biblios_use_this_framework ) %] >+ [% tx("Framework cannot be deleted", { framework = framework.frameworktext, frameworkcode = framework.frameworkcode }) | html %] >+ [% ELSE %] >+ [% tx("Confirm deletion of framework '{framework}' ({frameworkcode})", { framework = framework.frameworktext, frameworkcode = framework.frameworkcode }) | html %] >+ [% END %] > [% END %] > > [% ELSE %] > [% WRAPPER breadcrumb_item bc_active= 1 %] >- <span>MARC frameworks</span> >+ <span>MARC bibliographic frameworks</span> > [% END %] > [% END %] > [% END #/ WRAPPER breadcrumbs %] >@@ -98,7 +106,13 @@ > [% END %] > > [% IF op == 'add_form' %] >- <h1>[% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]</h1> >+ <h1> >+ [% IF framework %] >+ [% tx("Modify framework '{framework}' ({frameworkcode})", { framework = framework.frameworktext, frameworkcode = framework.frameworkcode }) | html %] >+ [% ELSE %] >+ <span>New framework</span> >+ [% END %] >+ </h1> > <form action="/cgi-bin/koha/admin/biblio_framework.pl" name="Aform" method="post" class="validated"> > <input type="hidden" name="op" value="add_validate" /> > <fieldset class="rows"> >@@ -139,7 +153,7 @@ > <button type="submit"><i class="fa fa-fw fa-arrow-left"></i> Return to frameworks</button> > </form> > [% ELSE %] >- <h1>Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?</h1> >+ <h1>[% tx("Confirm deletion of framework '{framework}' ({frameworkcode})?", { framework = framework.frameworktext, frameworkcode = framework.frameworkcode }) | html %]</h1> > <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="post"> > <input type="hidden" name="op" value="delete_confirmed" /> > <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" /> >@@ -153,7 +167,7 @@ > [% END %] > > [% IF op == 'list' %] >-<h1>MARC frameworks</h1> >+<h1>MARC bibliographic frameworks</h1> > <div class="page-section"> > <table id="table_biblio_frameworks"> > <thead> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt >index 7414b8295f..4dbce11ad0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt >@@ -5,28 +5,27 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>[% FILTER collapse %] > [% IF ( add_form ) %] >- [% IF ( use_heading_flags_p ) %] >- [% IF ( heading_edit_subfields_p ) %] >- [% t("Edit MARC subfields constraints") | html %] › >- [% t("MARC subfield structure") | html %] >- [% END %] >- [% ELSE %] >- [% action | html %] › >- [% t("MARC subfield structure") | html %] >- [% END %] >+ [% t("Edit subfields constraints") | html %] › > [% END %] >+ > [% IF ( delete_confirm ) %] >- Confirm deletion of subfield [% tagsubfield | html %] › >- [% t("MARC subfield structure") | html %] >+ [% tx("Confirm deletion of subfield '{subfield}'", {subfield = mss.tagsubfield }) | html %] › > [% END %] >- [% IF ( delete_confirmed ) %] >- [% t("Subfield deleted") | html %] › >- [% t("MARC subfield structure") | html %] >+ >+ [% IF ( add_form || delete_confirm || else ) %] >+ [% tx("Tag {tag}", { tag = tagfield}) | html %] › > [% END %] >- [% IF ( else ) %] >- [% t("MARC subfield structure") | html %] >+ >+ [% IF ( frameworkcode ) %] >+ [% framework.frameworktext | html %] ([% framework.frameworkcode | html %]) >+ [% ELSE %] >+ [% t("Default framework") | html %] > [% END %] › >+ >+ [% t("MARC bibliographic frameworks") | html %] › >+ > [% t("Administration") | html %] › >+ > [% t("Koha") | html %] > [% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -44,50 +43,39 @@ > <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> > [% END %] > [% WRAPPER breadcrumb_item %] >- <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a> >+ <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC bibliographic frameworks</a> > [% END %] > [% WRAPPER breadcrumb_item %] > <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode | uri %]&searchfield=[% tagfield | uri %]"> > [% IF ( frameworkcode ) %] >- <span>[% frameworkcode | html %] framework structure</span> >+ [% framework.frameworktext | html %] ([% framework.frameworkcode | html %]) > [% ELSE %] >- <span>Default framework structure</span> >+ <span>Default framework</span> > [% END %] > </a> > [% END %] > > [% IF ( add_form ) %] >- [% IF ( use_heading_flags_p ) %] >- [% IF ( heading_edit_subfields_p ) %] >- [% WRAPPER breadcrumb_item %] >- <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] subfield structure</a> >- [% END %] >- [% WRAPPER breadcrumb_item bc_active= 1 %] >- <span>Edit subfields constraints</span> >- [% END %] >- [% END %] >- [% ELSE %] >- [% WRAPPER breadcrumb_item %] >- <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] Subfield structure</a> >- [% END %] >- [% WRAPPER breadcrumb_item bc_active= 1 %] >- [% action | html %] >- [% END %] >+ [% WRAPPER breadcrumb_item %] >+ <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]">[% tx("Tag {tag}", { tag = tagfield}) | html %]</a> >+ [% END %] >+ [% WRAPPER breadcrumb_item bc_active= 1 %] >+ <span>Edit subfields constraints</span> > [% END %] > [% END %] > > [% IF ( delete_confirm ) %] > [% WRAPPER breadcrumb_item %] >- <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% mss.tagfield | uri %]&frameworkcode=[% mss.frameworkcode | uri %]">Tag [% mss.tagfield | html %] Subfield structure</a> >+ <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% mss.tagfield | uri %]&frameworkcode=[% mss.frameworkcode | uri %]">[% tx("Tag {tag}", { tag = tagfield}) | html %]</a> > [% END %] > [% WRAPPER breadcrumb_item bc_active= 1 %] >- <span>Confirm deletion of subfield [% mss.tagsubfield | html %]</span> >+ [% tx("Confirm deletion of subfield '{subfield}'?", {subfield = mss.tagsubfield }) | html %] > [% END %] > [% END %] > > [% IF ( else ) %] > [% WRAPPER breadcrumb_item bc_active= 1 %] >- <span>Tag [% tagfield | html %] Subfield structure</span> >+ <span>[% tx("Tag {tag} subfield structure", { tag = tagfield}) | html %]</span> > [% END %] > [% END %] > [% END #/ WRAPPER breadcrumbs %] >@@ -100,11 +88,7 @@ > > [% IF ( add_form ) %] > <h1> >- [% IF ( use_heading_flags_p ) %] >- [% IF ( heading_edit_subfields_p ) %]<span>Tag</span> [% tagfield | html %] <span>Subfield constraints</span>[% END %] >- [% ELSE %] >- [% action | html %] >- [% END %] >+ [% tx("Tag {tag} subfield constraints", { tag = tagfield}) | html %] > </h1> > <div class="hint">You can drag and drop the subfield tabs to change the order.</div> > >@@ -331,7 +315,7 @@ > > [% IF ( delete_confirm ) %] > <div class="dialog alert"> >- <h1>Confirm deletion of subfield [% mss.tagsubfield | html %]?</h1> >+ <h1>[% tx("Confirm deletion of subfield '{subfield}'?", {subfield = mss.tagsubfield }) | html %]</h1> > <p>Subfield: [% mss.tagsubfield | html %]</p> > <p>Description: [% mss.liblibrarian | html_entity %]</p> > >@@ -354,7 +338,7 @@ > > [% IF ( else ) %] > [% IF ( frameworkcode ) %] >- <h1>MARC subfield structure admin for [% tagfield | html %] (framework [% frameworkcode | html %])</h1> >+ <h1>[% tx("Tag {tag} subfield structure (framework {frameworkcode})", { tag = tagfield, frameworkcode = frameworkcode }) | html %]</h1> > [% ELSE %] > <h1>MARC subfield structure admin for [% tagfield | html %] (default framework)</h1> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >index 6568a2070f..f09ea32f5a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >@@ -7,7 +7,7 @@ > <title>[% FILTER collapse %] > [% IF ( add_form ) %] > [% IF heading_add_tag_p %] >- [% tx("Add tag {searchfield}", { searchfield = searchfield }) | html %] >+ [% tx("New tag {searchfield}", { searchfield = searchfield }) | html %] > [% ELSE %] > [% tx("Modify tag {searchfield}", { searchfield = searchfield }) | html %] > [% END %] › >@@ -18,7 +18,8 @@ > [% IF ( delete_confirmed ) %] > [% t("Data deleted") | html %] › > [% END %] >- [% t("MARC frameworks") | html %] › >+ [% framework.frameworktext | html %] ([% framework.frameworkcode | html %]) › >+ [% t("MARC bibliographic frameworks") | html %] › > [% t("Administration") | html %] › > [% t("Koha") | html %] > [% END %]</title> >@@ -36,7 +37,7 @@ > <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> > [% END %] > [% WRAPPER breadcrumb_item %] >- <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a> >+ <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC bibliographic frameworks</a> > [% END %] > > [% IF ( add_form ) %] >@@ -45,15 +46,15 @@ > [% IF framework %] > <span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span> > [% ELSE %] >- <span>Default MARC framework</span> >+ <span>Default MARC bibliographic framework</span> > [% END%] > </a> > [% END %] > [% WRAPPER breadcrumb_item bc_active= 1%] > [% IF heading_add_tag_p %] >- <span>Add tag [% searchfield | html %]</span> >+ [% tx("New tag {searchfield}", { searchfield = searchfield }) | html %] > [% ELSE %] >- <span>Modify tag [% searchfield | html %]</span> >+ [% tx("Modify tag {searchfield}", { searchfield = searchfield }) | html %] > [% END %] > [% END %] > >@@ -62,7 +63,7 @@ > [% IF framework %] > <span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span> > [% ELSE %] >- <span>Default MARC framework</span> >+ <span>Default MARC bibliographic framework</span> > [% END %] > [% END %] > >@@ -72,12 +73,12 @@ > [% IF framework %] > <span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span> > [% ELSE %] >- <span>Default MARC framework</span> >+ <span>Default MARC bibliographic framework</span> > [% END %] > </a> > [% END %] > [% WRAPPER breadcrumb_item bc_active= 1%] >- <span>Confirm deletion of tag [% searchfield | html %]</span> >+ [% tx("Confirm deletion of tag {searchfield}", { searchfield = searchfield }) | html %] > [% END %] > > [% ELSIF ( delete_confirmed ) %] >@@ -86,7 +87,7 @@ > [% IF framework %] > <span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span> > [% ELSE %] >- <span>Default MARC framework</span> >+ <span>Default MARC bibliographic framework</span> > [% END %] > </a> > [% END %] >@@ -105,12 +106,15 @@ > [% IF ( else ) %] > <div id="toolbar" class="btn-toolbar"> > <a class="btn btn-default" id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-plus"></i> New tag</a> >+ <a class="btn btn-default" href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form&frameworkcode=[% loo.frameworkcode | uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit framework</a> > </div>[% END %] > > [% IF framework %] >- <h1>MARC Framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</h1> >+ <h1> >+ [% tx("MARC bibliographic framework '{framework}' ({frameworkcode})", { framework = framework.frameworktext, frameworkcode = framework.frameworkcode }) | html %] >+ </h1> > [% ELSE %] >- <h1>MARC Framework for default MARC framework</h1> >+ <h1>Default MARC bibliographic framework</h1> > [% END %] > > [% IF ( add_form ) %] >@@ -120,9 +124,10 @@ > <fieldset class="rows"> > <legend> > [% IF heading_add_tag_p %] >- <span>Add tag</span> >+ <span>New tag</span> > [% ELSE %] >- <span>Modify tag</span> <input type="hidden" name="modif" value="1" />[% searchfield | html %] >+ [% tx("Modify tag {searchfield}", { searchfield = searchfield }) | html %] >+ <input type="hidden" name="modif" value="1" /> > [% END %] > </legend> > <input type="hidden" name="op" value="add_validate" /> >@@ -185,7 +190,7 @@ > > [% IF ( delete_confirm ) %] > <div class="dialog alert"> >- <h3>Confirm deletion of tag <span class="ex">'[% searchfield | html %]'</span>?</h3> >+ <h3>[% tx("Confirm deletion of tag {searchfield}?", { searchfield = searchfield }) | html %]</h3> > <p>Tag: [% searchfield | html %]</p> > <p>Description: [% liblibrarian | html %]</p> > <form action="[% script_name | html %]" method="post"> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34393
:
156506
|
156511
|
156521
| 156585 |
156586