Bug 34400: Inconsistencies in OAI sets page titles, breadcrumbs, and header

This patch fixes a couple of inconsistencies in the style of the
OIA sets administration screen, making sure the page title, breadcrumb
navigation, and page headers are consistent with each other.

The patch also corrects the structure of the form on the OAI set
mappings page so that the submit button is outside the "page-section"
area.

To test, apply the patch and go to Administration -> OAI sets. Test each
variation of the page:

- Main page
- New OAI set
- Edit OAI set
- OAI set mappings

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Owen Leonard 2023-08-25 16:35:18 +00:00 committed by Tomas Cohen Arazi
parent b952d2eb99
commit f636a041a6
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 21 additions and 19 deletions

View File

@ -4,7 +4,7 @@
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% FILTER collapse %]
[% t("OAI set mappings") | html %] &rsaquo;
[% tx("Mappings for set '{oai_set}'", { oai_set = setSpec }) | html %] &rsaquo;
[% t("OAI sets") | html %] &rsaquo;
[% t("Administration") | html %] &rsaquo;
[% t("Koha") | html %]
@ -23,10 +23,10 @@
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a>
<a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>OAI set mappings</span>
[% tx("Mappings for set '{oai_set}'", { oai_set = setSpec }) | html %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
@ -42,13 +42,13 @@
<p><a href="/cgi-bin/koha/admin/oai_sets.pl">Return to sets management</a></p>
</div>
[% END %]
<h1>Mappings for set '[% setName | html %]' ([% setSpec | html %])</h1>
<h1>[% tx("Mappings for set '{oai_set}'", { oai_set = setSpec }) | html %]</h1>
[% UNLESS ( mappings ) %]
<div class="dialog alert"><p><strong>Warning:</strong> No mappings have been defined for this set</p></div>
[% END %]
<div class="page-section">
<form action="/cgi-bin/koha/admin/oai_set_mappings.pl" method="post" id="mappingform">
<form action="/cgi-bin/koha/admin/oai_set_mappings.pl" method="post" id="mappingform">
<div class="page-section">
<table id="mappings">
<thead>
<tr>
@ -132,11 +132,11 @@
</table>
<input type="hidden" name="id" value="[% id | html %]" />
<input type="hidden" name="op" value="save" />
<fieldset class="action">
<input type="submit" class="btn btn-primary" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/oai_sets.pl">Cancel</a>
</fieldset>
</form>
</div> <!-- /.page-section -->
</div> <!-- /.page-section -->
<fieldset class="action">
<input type="submit" class="btn btn-primary" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/oai_sets.pl">Cancel</a>
</fieldset>
</form>
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->

View File

@ -5,9 +5,11 @@
[% INCLUDE 'doc-head-open.inc' %]
<title>[% FILTER collapse %]
[% IF ( op_new ) %]
[% t("Add a new OAI set") | html %] &rsaquo;
[% t("New OAI set") | html %] &rsaquo;
[% ELSIF ( op_mod ) %]
[% tx("Modify OAI set '{oai_set}'", { oai_set = spec }) | html %] &rsaquo;
[% END %]
[% t("OAI sets configuration") | html %] &rsaquo;
[% t("OAI sets") | html %] &rsaquo;
[% t("Administration") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
@ -27,23 +29,23 @@
[% IF ( op_new || op_mod ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a>
<a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets</a>
[% END %]
[% END %]
[% IF ( op_new ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Add a new OAI set</span>
<span>New OAI set</span>
[% END %]
[% ELSIF ( op_mod ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Edit OAI set '[% spec | html %]'</span>
[% tx("Modify OAI set '{oai_set}'", { oai_set = spec }) | html %]
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>OAI sets configuration</span>
<span>OAI sets</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
@ -57,10 +59,10 @@
[% IF ( op_new || op_mod ) %]
<form method="post" action="/cgi-bin/koha/admin/oai_sets.pl" class="validated">
[% IF ( op_new ) %]
<h1>Add a new OAI set</h1>
<h1>New OAI set</h1>
<input type="hidden" name="op" value="savenew" />
[% ELSIF ( op_mod ) %]
<h1>Edit OAI set '[% spec | html %]'</h1>
<h1>[% tx("Modify OAI set '{oai_set}'", { oai_set = spec }) | html %]</h1>
<input type="hidden" name="op" value="savemod" />
<input type="hidden" name="id" value="[% id | html %]" />
[% END %]