From a17e436de3216d6574b355c5e0676bb321cfeceb Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 7 Sep 2023 16:46:05 +0000 Subject: [PATCH] Bug 34407: Inconsistencies in Z39.50 servers page titles, breadcrumbs, and header This patch makes changes to the Z39.50 servers administration and related templates in order to make them more consistent with other pages in Koha. One case has been added to page title and breadcrumb navigation: An indication that a search has been performed. The subheading is modified to make it clear that the search is a "starts with" search. To test, apply the patch and go to Administration -> Z39.50/SRU servers. View each variation of the page to confirm that breadcrumb navigation, page title, and page headings are consistent with each other. - Z39.50/SRU servers list. - New Z39.50 server - New SRU server - Edit Z39.50 server - Edit SRU server - Modify SRU search field mapping for a bibliographic record server - Modify SRU search field mapping for an authority record server - Use the header search form to search for a server by name --- .../prog/en/modules/admin/sru_modmapping.tt | 6 ++- .../en/modules/admin/sru_modmapping_auth.tt | 6 ++- .../prog/en/modules/admin/z3950servers.tt | 44 +++++++++++-------- 3 files changed, 33 insertions(+), 23 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt index 2c4cfb5336..e06d1c2be6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt @@ -4,7 +4,9 @@ [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% FILTER collapse %] - [% t("SRU search fields mapping for bibliographic records") | html %] › + [% t("SRU search field mapping for bibliographic records") | html %] › + [% t("Z39.50/SRU servers") | html %] › + [% t("Administration") | html %] › [% t("Koha") | html %] [% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -15,7 +17,7 @@
-

Modify SRU search fields mapping for bibliographic records

+

SRU search field mapping for bibliographic records

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping_auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping_auth.tt index 55e25f8887..7c12e278d0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping_auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping_auth.tt @@ -2,7 +2,9 @@ [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% FILTER collapse %] - [% t("SRU search fields mapping for authorities") | html %] › + [% t("SRU search field mapping for authorities") | html %] › + [% t("Z39.50/SRU servers") | html %] › + [% t("Administration") | html %] › [% t("Koha") | html %] [% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -13,7 +15,7 @@
-

Modify SRU search fields mapping for authorities

+

SRU search field mapping for authorities

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt index 3c13400d8e..8167404fdc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt @@ -13,10 +13,11 @@ [% FILTER collapse %] [% IF op == 'edit' %] - [% tx("Modify {servertype} server {servername}", { servertype = servertype, servername = server.servername }) | html %] › - [% END %] - [% IF op == 'add' %] + [% tx("Modify {servertype} server '{servername}'", { servertype = servertype, servername = server.servername }) | html %] › + [% ELSIF op == 'add' %] [% tx("New {servertype} server", { servertype = servertype }) | html %] › + [% ELSIF searchfield %] + [% tx("Search results for '{search_keyword}'", { search_keyword = searchfield }) | html %] › [% END %] [% t("Z39.50/SRU servers") | html %] › [% t("Administration") | html %] › @@ -36,26 +37,30 @@ <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> [% END %] - [% IF op == 'edit' || op == 'add' %] + [% IF op == 'edit' || op == 'add' || searchfield %] [% WRAPPER breadcrumb_item %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50/SRU servers</a> - [% END %] + [% END %] [% END %] [% IF op == 'edit' %] [% WRAPPER breadcrumb_item bc_active= 1 %] - <span>Modify [% servertype | html %] server [% server.servername | html %]</span> - [% END %] + [% tx("Modify {servertype} server '{servername}'", { servertype = servertype, servername = server.servername }) | html %] + [% END %] [% ELSIF op == 'add' %] [% WRAPPER breadcrumb_item bc_active= 1 %] - <span>New [% servertype | html %] server</span> - [% END %] + [% tx("New {servertype} server", { servertype = servertype }) | html %] + [% END %] + [% ELSIF searchfield %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% tx("Search results for '{search_keyword}'", { search_keyword = searchfield }) | html %] + [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] <span>Z39.50/SRU servers</span> - [% END %] + [% END %] [% END %] [% END #/ WRAPPER breadcrumbs %] [% END #/ WRAPPER sub-header.inc %] @@ -77,14 +82,15 @@ [% IF ( add_form ) %] <form action="[% script_name | html %]" name="Aform" method="post" id="serverentry"> - <input type="hidden" name="op" value="add_validated" /> - <input type="hidden" name="servertype" value="[% server.servertype||type||'zed' | html %]"/> [% IF op == 'edit' %] - <h1>Modify [% servertype | html %] server</h1> + <h1>[% tx("Modify {servertype} server '{servername}'", { servertype = servertype, servername = server.servername }) | html %]</h1> <input type="hidden" name="id" value="[% server.id | html %]" /> [% ELSE %] - <h1>New [% servertype | html %] server</h1> + <h1>[% tx("New {servertype} server", { servertype = servertype }) | html %]</h1> [% END %] + + <input type="hidden" name="op" value="add_validated" /> + <input type="hidden" name="servertype" value="[% server.servertype||type||'zed' | html %]"/> <fieldset class="rows"> <ol> <li><label for="name" class="required">Server name: </label> @@ -205,11 +211,11 @@ <a id="newserver" class="btn btn-default" href="/cgi-bin/koha/admin/z3950servers.pl?op=add&type=zed"><i class="fa fa-plus"></i> New Z39.50 server</a> <a id="newserver" class="btn btn-default" href="/cgi-bin/koha/admin/z3950servers.pl?op=add&type=sru"><i class="fa fa-plus"></i> New SRU server</a> </div> - <h1>Z39.50/SRU servers administration</h1> - [% IF id %] - You searched for record [% id | html %] - [% ELSIF searchfield %] - You searched for [% searchfield | html %] + <h1>Z39.50/SRU servers</h1> + [% IF searchfield %] + <h2> + [% tx("Searching by target starting with '{search_keyword}'", { search_keyword = searchfield }) | html %] + </h2> [% END %] <div class="page-section"> -- 2.30.2