Bug 34395: Fix inconsistencies in Authority types page titles, breadcrumbs, and header
This patch fixes some inconsistencies in the authority types administration page, making sure the page title, breadcrumb navigation, and page headers are consistent with each other. Test each page to confirm that page title, heading, and breadcrumbs are consistent: - Administration -> Authority types - New authority type - Edit authority type - Delete an authority type which is not used - Delete an authority type which is in use - Authority type MARC structure - New tag - Edit tag - Delete tag - View subfields - Edit subfields Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
094441d3f6
commit
6a22310dd4
3 changed files with 112 additions and 78 deletions
|
@ -4,10 +4,28 @@
|
|||
[% SET footerjs = 1 %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>[% FILTER collapse %]
|
||||
[% t("Authority MARC subfield structure") | html %] ›
|
||||
[% IF ( add_form ) %]
|
||||
[% t("Edit subfields constraints") | html %] ›
|
||||
[% END %]
|
||||
|
||||
[% IF ( delete_confirm ) %]
|
||||
[% tx("Confirm deletion of subfield '{subfield}'", {subfield = ass.tagsubfield }) | html %] ›
|
||||
[% END %]
|
||||
|
||||
[% IF ( add_form || delete_confirm || else ) %]
|
||||
[% tx("Tag {tag}", { tag = tagfield}) | html %] ›
|
||||
[% END %]
|
||||
|
||||
[% IF ( authtypecode ) %]
|
||||
[% tx("'{authtypecode}' framework", { authtypecode = authtypecode }) | html %]
|
||||
[% ELSE %]
|
||||
[% t("Default framework") | html %]
|
||||
[% END %] ›
|
||||
[% t("Authority types") | html %] ›
|
||||
[% t("Administration") | html %] ›
|
||||
[% t("Koha") | html %]
|
||||
[% END %]</title>
|
||||
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
</head>
|
||||
|
||||
|
@ -30,7 +48,7 @@
|
|||
|
||||
[% IF ( authtypecode ) %]
|
||||
[% WRAPPER breadcrumb_item %]
|
||||
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri%]">[% authtypecode | html %] framework</a>
|
||||
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri%]">[% tx("'{authtypecode}' framework", { authtypecode = authtypecode }) | html %]</a>
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% WRAPPER breadcrumb_item %]
|
||||
|
@ -40,17 +58,17 @@
|
|||
|
||||
[% IF ( else ) %]
|
||||
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
||||
<span>Authority MARC subfield structure for [% tagfield | html %]</span>
|
||||
[% tx("Tag {tag}", { tag = tagfield}) | html %]
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% WRAPPER breadcrumb_item %]
|
||||
<a href="/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=[% tagfield | uri %]&tagsubfield=[% tagsubfield | uri %]&authtypecode=[% authtypecode |uri %]">Authority MARC subfield structure for [% tagfield | html %]</a>
|
||||
<a href="/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=[% tagfield | uri %]&tagsubfield=[% tagsubfield | uri %]&authtypecode=[% authtypecode |uri %]">[% tx("Tag {tag}", { tag = tagfield}) | html %]</a>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% IF ( delete_confirm ) %]
|
||||
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
||||
<span>Confirm deletion of subfield [% tagsubfield | html %]?</span>
|
||||
[% tx("Confirm deletion of subfield '{tagsubfield}'", { tagsubfield = ass.tagsubfield }) | html %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
@ -58,7 +76,7 @@
|
|||
[% IF ( use_heading_flags_p ) %]
|
||||
[% IF ( heading_edit_subfields_p ) %]
|
||||
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
||||
<span>Edit MARC subfields constraints</span>
|
||||
<span>Edit subfields constraints</span>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
|
@ -282,7 +300,7 @@
|
|||
[% IF ( delete_confirm ) %]
|
||||
|
||||
<div class="dialog alert">
|
||||
<h1>Delete subfield <span class="ex">'[% ass.tagsubfield | html %]'?</span></h1>
|
||||
<h1>Confirm deletion of subfield <span class="ex">'[% ass.tagsubfield | html %]'?</span></h1>
|
||||
<form action="[% delete_link | html %]" method="post">
|
||||
<input type="hidden" name="op" value="delete_confirmed" />
|
||||
<table>
|
||||
|
|
|
@ -6,44 +6,25 @@
|
|||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>[% FILTER collapse %]
|
||||
[% IF ( add_form ) %]
|
||||
[% IF ( use_heading_flags_p ) %]
|
||||
[% IF ( heading_modify_tag_p ) %]
|
||||
[% t("Modify tag ") | html %] ›
|
||||
[% IF ( authtypecode ) %]
|
||||
[% tx("{authtypecode} framework", { authtypecode = authtypecode }) | html %]
|
||||
[% ELSE %]
|
||||
[% t("Default framework") | html %]
|
||||
[% END %] ›
|
||||
[% END %]
|
||||
[% IF ( heading_add_tag_p ) %]
|
||||
[% t("New tag") | html %] ›
|
||||
[% IF ( authtypecode ) %]
|
||||
[% tx("{authtypecode} framework", { authtypecode = authtypecode }) | html %]
|
||||
[% ELSE %]
|
||||
[% t("Default framework") | html %]
|
||||
[% END %] ›
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% action | html %] ›
|
||||
[% IF ( heading_modify_tag_p ) %]
|
||||
[% tx("Modify tag '{searchfield}'", { searchfield = searchfield }) | html %] ›
|
||||
[% END %]
|
||||
[% IF ( heading_add_tag_p ) %]
|
||||
[% t("New tag") | html %] ›
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% IF ( delete_confirm ) %]
|
||||
[% t("Confirm deletion") | html %] ›
|
||||
[% IF ( authtypecode ) %]
|
||||
[% tx("{authtypecode} framework", { authtypecode = authtypecode }) | html %]
|
||||
[% ELSE %]
|
||||
[% t("Default framework") | html %]
|
||||
[% END %] ›
|
||||
[% tx("Confirm deletion of tag '{searchfield}'", { searchfield = searchfield }) | html %] ›
|
||||
[% END %]
|
||||
[% IF ( delete_confirmed ) %]
|
||||
[% t("Data deleted") | html %] ›
|
||||
[% IF ( authtypecode ) %]
|
||||
[% tx("{authtypecode} framework", { authtypecode = authtypecode }) | html %]
|
||||
[% ELSE %]
|
||||
[% t("Default framework") | html %]
|
||||
[% END %] ›
|
||||
[% END %]
|
||||
[% t("Authority MARC framework") | html %] ›
|
||||
[% IF ( authtypecode ) %]
|
||||
[% tx("'{authtypecode}' framework", { authtypecode = authtypecode }) | html %]
|
||||
[% ELSE %]
|
||||
[% t("Default framework") | html %]
|
||||
[% END %] ›
|
||||
[% t("Authority types") | html %] ›
|
||||
[% t("Administration") | html %] ›
|
||||
[% t("Koha") | html %]
|
||||
[% END %]</title>
|
||||
|
@ -68,7 +49,7 @@
|
|||
[% IF ( add_form || delete_confirm || delete_confirmed ) %]
|
||||
[% IF ( authtypecode ) %]
|
||||
[% WRAPPER breadcrumb_item %]
|
||||
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] Framework</a>
|
||||
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% tx("'{authtypecode}' framework", { authtypecode = authtypecode }) | html %]</a>
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% WRAPPER breadcrumb_item %]
|
||||
|
@ -81,7 +62,7 @@
|
|||
[% IF ( use_heading_flags_p ) %]
|
||||
[% IF ( heading_modify_tag_p ) %]
|
||||
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
||||
<span>Modify tag</span>
|
||||
[% tx("Modify tag {searchfield}", { searchfield = searchfield }) | html %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
@ -100,7 +81,7 @@
|
|||
[% ELSE %]
|
||||
[% IF ( delete_confirm ) %]
|
||||
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
||||
<span>Confirm deletion</span>
|
||||
[% tx("Confirm deletion of tag '{searchfield}'", { searchfield = searchfield }) | html %]
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% IF ( delete_confirmed ) %]
|
||||
|
@ -110,7 +91,7 @@
|
|||
[% ELSE %]
|
||||
[% IF ( authtypecode ) %]
|
||||
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
||||
[% authtypecode | html %] Framework
|
||||
[% tx("{authtypecode} framework", { authtypecode = authtypecode }) | html %]
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
||||
|
@ -129,14 +110,27 @@
|
|||
<div class="col-sm-10 col-sm-push-2">
|
||||
<main>
|
||||
|
||||
<h1>Authority MARC framework for [% IF ( authtypecode ) %][% authtypecode | html %][% ELSE %]default framework[% END %]</h1>
|
||||
[% IF ( else ) %]
|
||||
<div id="toolbar" class="btn-toolbar">
|
||||
<div class="btn-group"><a class="btn btn-default" id="newtag" href="/cgi-bin/koha/admin/auth_tag_structure.pl?op=add_form&authtypecode=[% authtypecode | uri %]"><i class="fa fa-plus"></i> New tag</a></div>
|
||||
<a class="btn btn-default" id="edit_authtype" href="/cgi-bin/koha/admin/authtypes.pl?op=add_form&authtypecode=[% authtypecode | uri %]"><i class="fa fa-pencil"></i> Edit authority type</a>
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
<h1>
|
||||
[% IF ( authtypecode ) %]
|
||||
[% tx("Authority MARC framework for '{authtypecode}'", { authtypecode = authtypecode }) | html %]
|
||||
[% ELSE %]
|
||||
[% t("Default authority MARC framework") | html %]
|
||||
[% END %]
|
||||
</h1>
|
||||
|
||||
|
||||
[% IF ( add_form ) %]
|
||||
|
||||
<h2>
|
||||
[% IF ( heading_modify_tag_p ) %]
|
||||
<span>Modify tag</span>
|
||||
[% tx("Modify tag '{searchfield}'", { searchfield = searchfield }) | html %]
|
||||
[% END %]
|
||||
[% IF ( heading_add_tag_p ) %]
|
||||
<span>New tag</span>
|
||||
|
@ -196,7 +190,7 @@
|
|||
|
||||
[% IF ( delete_confirm ) %]
|
||||
<div class="dialog alert">
|
||||
<h3>Confirm deletion</h3>
|
||||
<h3>[% tx("Confirm deletion of tag '{searchfield}'", { searchfield = searchfield }) | html %]</h3>
|
||||
<form action="[% script_name | html %]" method="post">
|
||||
<table>
|
||||
<tr><th scope="row">Tag: </th><td>[% searchfield | html %] [% liblibrarian | html %]</td></tr>
|
||||
|
@ -243,24 +237,24 @@
|
|||
|
||||
[% IF ( else ) %]
|
||||
|
||||
<div id="toolbar" class="btn-toolbar">
|
||||
<div class="btn-group"><a class="btn btn-default" id="newtag" href="/cgi-bin/koha/admin/auth_tag_structure.pl?op=add_form&authtypecode=[% authtypecode | uri %]"><i class="fa fa-plus"></i> New tag</a></div>
|
||||
</div>
|
||||
|
||||
<h2>Select an authority framework</h2>
|
||||
<form action="[% script_name | html %]" method="post">
|
||||
<select name="authtypecode">
|
||||
[% FOREACH authority_type IN authority_types%]
|
||||
[% IF authority_type.authtypecode == authtypecode%]
|
||||
<option value="[% authority_type.authtypecode | html %]" selected="selected">[% authority_type.authtypetext | html %]</option>
|
||||
[% ELSE %]
|
||||
<option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</select>
|
||||
<input type="text" name="searchfield" value="[% searchfield | html %]" />
|
||||
<input type="submit" value="OK" class="btn btn-primary" />
|
||||
</form><br />
|
||||
<fieldset>
|
||||
<label for="searchfield"><strong>Search for tag:</strong></label>
|
||||
<input type="text" id="searchfield" name="searchfield" size="4" value="[% searchfield | html %]" />
|
||||
<label for="authtypecode"><strong>In framework:</strong> </label>
|
||||
<select id="authtypecode" name="authtypecode">
|
||||
[% FOREACH authority_type IN authority_types%]
|
||||
[% IF authority_type.authtypecode == authtypecode%]
|
||||
<option value="[% authority_type.authtypecode | html %]" selected="selected">[% authority_type.authtypetext | html %]</option>
|
||||
[% ELSE %]
|
||||
<option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</select>
|
||||
<input type="submit" class="btn btn-primary" value="Search" />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<div id="pagertable_authtagstructure">
|
||||
</div>
|
||||
|
||||
|
|
|
@ -6,12 +6,20 @@
|
|||
<title>[% FILTER collapse %]
|
||||
[% IF op == 'add_form' %]
|
||||
[% IF authority_type.authtypecode.defined %]
|
||||
[% t("Modify authority type") | html %]
|
||||
[% IF authority_type.authtypecode %]
|
||||
[% tx("Modify authority type '{authority_type_code}'", { authority_type_code= authority_type.authtypecode }) | html %]
|
||||
[% ELSE %]
|
||||
[% t("Modify default authority type") | html %]
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% t("New authority type") | html %]
|
||||
[% END %] ›
|
||||
[% ELSIF op == 'delete_confirm' %]
|
||||
[% t("Confirm deletion of authority type") | html %] ›
|
||||
[% IF authorities_using_it %]
|
||||
[% t("Authority type cannot be deleted") | html %]
|
||||
[% ELSE %]
|
||||
[% tx("Confirm deletion of authority type '{authority_type_code}'", { authority_type_code= authority_type.authtypecode } ) | html %]
|
||||
[% END %] ›
|
||||
[% END %]
|
||||
[% t("Authority types") | html %] ›
|
||||
[% t("Administration") | html %] ›
|
||||
|
@ -44,7 +52,11 @@
|
|||
[% IF op == 'add_form' %]
|
||||
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
||||
[% IF authority_type.authtypecode.defined %]
|
||||
<span>Modify authority type</span>
|
||||
[% IF authority_type.authtypecode %]
|
||||
[% tx("Modify authority type '{authority_type_code}'", { authority_type_code= authority_type.authtypecode }) | html %]
|
||||
[% ELSE %]
|
||||
[% t("Modify default authority type") | html %]
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
<span>New authority type</span>
|
||||
[% END %]
|
||||
|
@ -52,7 +64,11 @@
|
|||
|
||||
[% ELSIF op == 'delete_confirm' %]
|
||||
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
||||
<span>Confirm deletion of authority type</span>
|
||||
[% IF authorities_using_it %]
|
||||
[% t("Authority type cannot be deleted") | html %]
|
||||
[% ELSE %]
|
||||
[% tx("Confirm deletion of authority type '{authority_type_code}'", { authority_type_code= authority_type.authtypecode } ) | html %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% END %]
|
||||
|
@ -89,16 +105,19 @@
|
|||
|
||||
[% IF op == 'add_form' %]
|
||||
<form action="/cgi-bin/koha/admin/authtypes.pl" name="Aform" method="post" class="validated">
|
||||
<fieldset class="rows">
|
||||
<legend>
|
||||
<h1>
|
||||
[% IF authority_type.authtypecode.defined %]
|
||||
Modify authority type
|
||||
<h1>
|
||||
[% IF authority_type.authtypecode.defined %]
|
||||
[% IF authority_type.authtypecode %]
|
||||
[% tx("Modify authority type '{authority_type_code}'", { authority_type_code= authority_type.authtypecode }) | html %]
|
||||
[% ELSE %]
|
||||
New authority type
|
||||
[% t("Modify default authority type") | html %]
|
||||
[% END %]
|
||||
</h1>
|
||||
</legend>
|
||||
[% ELSE %]
|
||||
<span>New authority type</span>
|
||||
[% END %]
|
||||
</h1>
|
||||
<fieldset class="rows">
|
||||
<legend class="sr-only">Enter authority type details</legend>
|
||||
<ol>
|
||||
<li>
|
||||
[% IF authority_type.authtypecode.defined %]
|
||||
|
@ -107,10 +126,10 @@
|
|||
<input type="hidden" name="checked" value="0" />
|
||||
<input type="hidden" name="authtypecode" value="[% authority_type.authtypecode | html %]" />[% authority_type.authtypecode | html %]
|
||||
[% ELSE %]
|
||||
<div class="hint">10 characters maximum</div>
|
||||
<label for="authtypecode" class="required">Authority type: </label>
|
||||
<input id="authtypecode" type="text" class="required focus" required="required" name="authtypecode" size="20" maxlength="10" />
|
||||
<span class="required">Required</span>
|
||||
<div class="hint">10 characters maximum</div>
|
||||
[% END %]
|
||||
</li>
|
||||
<li>
|
||||
|
@ -123,9 +142,9 @@
|
|||
<textarea id="summary" name="summary" cols="55" rows="7">[% authority_type.summary | html %]</textarea>
|
||||
</li>
|
||||
<li>
|
||||
<div class="hint">Note: for 'Authority field to copy', enter the authority field that should be copied from the authority record to the bibliographic record. E.g., in MARC21, field 100 in the authority record should be copied to field 100 in the bibliographic record</div>
|
||||
<label for="auth_tag_to_report">Authority field to copy: </label>
|
||||
<input type="text" id="auth_tag_to_report" name="auth_tag_to_report" size="5" maxlength="3" value="[% authority_type.auth_tag_to_report | html %]" />
|
||||
<div class="hint">Note: for 'Authority field to copy', enter the authority field that should be copied from the authority record to the bibliographic record. E.g., in MARC21, field 100 in the authority record should be copied to field 100 in the bibliographic record</div>
|
||||
<input type="hidden" name="op" value="add_validate" />
|
||||
[% IF authority_type.authtypecode.defined %]
|
||||
<input type="hidden" name="is_a_modif" value="1" />
|
||||
|
@ -144,8 +163,11 @@
|
|||
<div class="dialog alert">
|
||||
[% IF authorities_using_it %]
|
||||
<h1>This authority type cannot be deleted</h1>
|
||||
<p>This record is used <strong>[% authorities_using_it | html %]</strong> times</p>
|
||||
<a class="cancel" href="/cgi-bin/koha/admin/authtypes.pl">Back to the list</a>
|
||||
<p><strong><span class="ex">[% authority_type.authtypecode | html %]</span></strong></p>
|
||||
<p>[% tnx('This authority type is used {count} time.', 'This authority type is used {count} times', authorities_using_it, { count = authorities_using_it }) %]</p>
|
||||
<form action="/cgi-bin/koha/admin/authtypes.pl" method="get">
|
||||
<button type="submit"><i class="fa fa-fw fa-arrow-left"></i> Return to authority types</button>
|
||||
</form>
|
||||
[% ELSE %]
|
||||
<h1>Confirm deletion of authority structure definition for <span class="ex">'[% authority_type.authtypetext | html %]' ([% authority_type.authtypecode | html %])</span></h1>
|
||||
<form action="/cgi-bin/koha/admin/authtypes.pl" method="post">
|
||||
|
|
Loading…
Reference in a new issue