Bug 34405: Fix inconsistencies in EDI accounts/Library EAN page titles, breadcrumbs, and headers

This patch fixes some inconsistencies in templates for EDI accounts
and Library EANs, making sure the page title, breadcrumb navigation, and
page headers are consistent with each other.

To test, apply the patch and check these views:

- Administration -> EDI accounts
  - New EDI account
  - Edit EDI account
  - Confirm deletion of EDI account
- Administration -> Library EANs
  - New library EAN
  - Edit library EAN
  - Confirm deletion of EDI account
    - With an account for a specific library
    - With an account for any library

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Owen Leonard 2023-10-06 11:24:49 +00:00 committed by Tomas Cohen Arazi
parent d19cfb44ae
commit eedd3223bc
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 47 additions and 33 deletions

View file

@ -7,13 +7,13 @@
<title>[% FILTER collapse %]
[% IF acct_form %]
[% IF account %]
[% t("Modify account") | html %]
[% tx("Modify account '{edi_account}' for vendor '{vendor}'", { edi_account = account.description, vendor = account.vendor.name }) %]
[% ELSE %]
[% t("Add new account") | html %]
[% t("New account") | html %]
[% END %] &rsaquo;
[% END %]
[% IF delete_confirm %]
[% t("Confirm deletion of account") | html %] &rsaquo;
[% tx("Confirm deletion of account '{edi_account}' for vendor '{vendor}'", { edi_account = account.description, vendor = account.vendor.name }) %]
[% END %]
[% t("EDI accounts") | html %] &rsaquo;
[% t("Administration") | html %] &rsaquo;
@ -45,17 +45,17 @@
[% IF acct_form %]
[% IF account %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Modify account</span>
[% tx("Modify account '{edi_account}' for vendor '{vendor}'", { edi_account = account.description, vendor = account.vendor.name }) %]
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Add new account</span>
<span>New account</span>
[% END %]
[% END %]
[% ELSIF delete_confirm %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Confirm deletion of account</span>
[% tx("Confirm deletion of account '{edi_account}' for vendor '{vendor}'", { edi_account = account.description, vendor = account.vendor.name }) %]
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
@ -88,16 +88,15 @@
[% IF account %]
<input type="hidden" name="id" value="[% account.id | html %]" />
[% END %]
<h1>
[% IF account %]
[% tx("Modify account '{edi_account}' for vendor '{vendor}'", { edi_account = account.description, vendor = account.vendor.name }) %]
[% ELSE %]
<span>New account</span>
[% END %]
</h1>
<fieldset class="rows">
<legend>
<h1>
[% IF account %]
Modify account
[% ELSE %]
New account
[% END %]
</h1>
</legend>
<legend class="sr-only">Account details</legend>
<ol>
<li>
@ -265,7 +264,7 @@
[% END %]
[% IF delete_confirm %]
<div class="dialog alert">
<h1>Delete this account?</h1>
<h1>Confirm deletion of account?</h1>
<table>
<tr>
<th>Vendor</th>
@ -294,7 +293,7 @@
[% END %]
[% IF display %]
[% IF ( ediaccounts ) %]
<h1>Vendor EDI accounts</h1>
<h1>EDI accounts</h1>
<div class="page-section">
<table>
<tr>

View file

@ -6,13 +6,17 @@
<title>[% FILTER collapse %]
[% IF ean_form %]
[% IF ean %]
[% t("Modify library EAN") | html %]
[% tx("Modify library EAN '{ean}'", { ean = ean.description }) %]
[% ELSE %]
[% t("Add new library EAN") | html %]
[% t("New library EAN") | html %]
[% END %] &rsaquo;
[% END %]
[% IF delete_confirm %]
[% t("Confirm deletion of EAN") | html %] &rsaquo;
[% IF ( ean.branch.branchname ) %]
[% tx("Confirm deletion of EAN '{ean}' for '{library}'?", { ean = ean.description, library = ean.branch.branchname }) %]
[% ELSE %]
[% tx("Confirm deletion of EAN '{ean}'?", { ean = ean.description }) %]
[% END %] &rsaquo;
[% END %]
[% t("Library EANs") | html %] &rsaquo;
[% t("Administration") | html %] &rsaquo;
@ -37,9 +41,9 @@
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1%]
[% IF ean %]
<span>Modify library EAN</span>
[% tx("Modify library EAN '{ean}'", { ean = ean.description }) %]
[% ELSE %]
<span>Add new library EAN</span>
<span>New library EAN</span>
[% END %]
[% END %]
@ -48,7 +52,11 @@
<a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1%]
<span>Confirm deletion of EAN</span>
[% IF ( ean.branch.branchname ) %]
[% tx("Confirm deletion of EAN '{ean}' for '{library}'?", { ean = ean.description, library = ean.branch.branchname }) %]
[% ELSE %]
[% tx("Confirm deletion of EAN '{ean}'?", { ean = ean.description }) %]
[% END %]
[% END %]
[% ELSE %]
@ -81,16 +89,16 @@
<input type="hidden" name="id" value="[% ean.id | html %]" />
[% END %]
<h1>
[% IF ean %]
[% tx("Modify library EAN '{ean}'", { ean = ean.description }) %]
[% ELSE %]
<span>New EAN</span>
[% END %]
</h1>
<fieldset class="rows">
<legend>
<h1>
[% IF ean %]
Modify EAN
[% ELSE %]
New EAN
[% END %]
</h1>
</legend>
<legend class="sr-only">EAN details</legend>
<ol>
<li>
@ -142,7 +150,14 @@
[% IF delete_confirm %]
<div class="dialog alert">
<h1>Delete EAN [% ean.ean | html %] for [% ean.branch.branchname | html %]?</h1>
<h1>
[% IF ( ean.branch.branchname ) %]
[% tx("Confirm deletion of EAN '{ean}' for '{library}'?", { ean = ean.description, library = ean.branch.branchname }) %]
[% ELSE %]
[% tx("Confirm deletion of EAN '{ean}'?", { ean = ean.description }) %]
[% END %]
</h1>
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="post">
<input type="hidden" name="op" value="delete_confirmed" />
<input type="hidden" name="id" value="[% ean.id | html %]" />