From 7c28ce8ddcc71b53bfb8b232b6cffb0beb508e35 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 25 Aug 2023 17:38:56 +0000 Subject: [PATCH] Bug 34403: Inconsistencies in Currencies and exchange rates page titles, breadcrumbs, and header This patch updates the currencies administration page in order to make the page title, breadcrumb navigation, and page headings consistent with each other. To test, apply the patch and go to Administration -> Currencies and exchange rates. Test each variation of the page to confirm that the title, breadcrumbs, and headings are consistent. - Currencies main page - New currency - Edit currency - Delete currency confirmation Signed-off-by: David Cook Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/admin/currency.tt | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt index b841b7d47a..83644f7133 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt @@ -9,16 +9,13 @@ [% FILTER collapse %] [% IF op == 'add_form' %] [% IF currency %] - [% tx("Modify currency '{currency}'", { currency = currency.currency }) | html %] › + [% tx("Modify currency '{currency_name}'", { currency_name = currency.currency }) | html %] › [% ELSE %] [% t("New currency") | html %] › [% END %] [% END %] [% IF op == 'delete_confirm' %] - [% tx("Confirm deletion of currency '{currency}'", { currency = currency.currency }) | html %] › - [% END %] - [% IF op == 'list' %] - [% t("Currencies") | html %] › + [% tx("Confirm deletion of currency '{currency_name}'", { currency_name = currency.currency }) | html %] › [% END %] [% t("Currencies and exchange rates") | html %] › [% t("Administration") | html %] › @@ -37,14 +34,20 @@ [% WRAPPER breadcrumb_item %] <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> [% END %] - [% WRAPPER breadcrumb_item %] - <a href="/cgi-bin/koha/admin/currency.pl">Currencies and exchange rates</a> + [% IF op == 'add_form' || op == 'delete_confirm' %] + [% WRAPPER breadcrumb_item %] + <a href="/cgi-bin/koha/admin/currency.pl">Currencies and exchange rates</a> + [% END %] + [% ELSIF op == 'list' %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + <span>Currencies and exchange rates</span> + [% END %] [% END %] [% IF op == 'add_form' %] [% WRAPPER breadcrumb_item bc_active= 1 %] [% IF currency %] - <span>Modify currency '[% currency.currency | html %]'</span> + [% tx("Modify currency '{currency_name}'", { currency_name = currency.currency }) | html %] [% ELSE %] <span>New currency</span> [% END %] @@ -53,14 +56,11 @@ [% IF op == 'delete_confirm' %] [% WRAPPER breadcrumb_item bc_active= 1 %] - <span>Confirm deletion of currency [% currency.currency | $HtmlTags tag='span' attributes=>'class="ex"' %]</span> - [% END %] - - [% ELSIF op == 'list' %] - [% WRAPPER breadcrumb_item bc_active= 1 %] - <span>Currencies</span> + [% tx("Confirm deletion of currency '{currency_name}'", { currency_name = currency.currency }) | html %] [% END %] [% END %] + + [% END #/ WRAPPER breadcrumbs %] [% END #/ WRAPPER sub-header.inc %] @@ -100,18 +100,18 @@ [% IF op == 'add_form' %] +<h1> + [% IF currency %] + [% tx("Modify currency '{currency_name}'", { currency_name = currency.currency }) | html %] + [% ELSE %] + <span>New currency</span> + [% END %] +</h1> + <form action="/cgi-bin/koha/admin/currency.pl" name="Aform" method="post" class="validated"> <input type="hidden" name="op" value="add_validate" /> <fieldset class="rows"> - <legend> - <h1> - [% IF currency %] - <span>Modify currency</span> - [% ELSE %] - <span>New currency</span> - [% END %] - </h1> - </legend> + <legend class="sr-only">New currency entry form</legend> <ol> <li> [% IF currency %] @@ -184,7 +184,7 @@ </div> [% ELSE %] <div class="dialog alert"> - <h1>Confirm deletion of currency [% currency.currency | $HtmlTags tag='span' attributes=>'class="ex"' %]</h1> + <h1>[% tx("Confirm deletion of currency '{currency_name}'", { currency_name = currency.currency }) | html %]</h1> <table> <tr><th>Currency</th> <td>[% currency.currency | html %]</td> -- 2.39.5