+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Administration › Authority MARC subfield structure</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript">
-//<![CDATA[
-
- $(document).ready(function() {
- $('#subfieldtabs').tabs();
- });
-
-function displayMoreConstraint(numlayer){
- var thisdiv = document.getElementById(numlayer);
- if(thisdiv.getAttribute("class") == "content_hidden"){
- thisdiv.removeAttribute('class');
- thisdiv.setAttribute("class","content_visible");
- } else {
- thisdiv.removeAttribute('class');
- thisdiv.setAttribute("class","content_hidden");
- }
-}
-
-//]]>
-</script>
</head>
+
<body id="admin_auth_subfields_structure" class="admin">
[% INCLUDE 'header.inc' %]
-[% INCLUDE 'cat-search.inc' %]
+[% INCLUDE 'prefs-admin-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
<a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a> ›
[% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri%]">[% authtypecode |html%] framework</a> ›
<ul>
[% FOREACH loo IN loop %]
[% IF ( loo.new_subfield ) %]
- <li><a href="#sub[% loo.tagsubfield %]field" title="[% loo.liblibrarian %]">New</a></li>
+ <li><a href="#sub[% loo.tagsubfield %]field" title="[% loo.liblibrarian | html_entity %]">New</a></li>
[% ELSE %]
- <li><a href="#sub[% loo.tagsubfield %]field" title="[% loo.liblibrarian %]">
+ <li><a href="#sub[% loo.tagsubfield %]field" title="[% loo.liblibrarian | html_entity %]">
[% loo.tagsubfield %]
</a></li>
[% END %]
<div id="sub[% loo.tagsubfield %]field">
<fieldset class="rows"><ol>
- [% IF ( loo.new_subfield ) %]
- <li><label for="tagsubfieldinput[% loo.row %]">Subfield code: </label>[% loo.tagsubfieldinput %] </li>
+ [% IF ( loo.new_subfield ) %]
+ <li>
+ <label for="tagsubfieldinput[% loo.row %]">Subfield code: </label>
+ <input type="text" name="tagsubfield" value="[% loo.tagsubfield %]" size="1" id="tagsubfield" maxlength="1" />
+ </li>
+ [% ELSE %]
+ <li>
+ <input type="hidden" name="tagsubfield" value="[% loo.tagsubfield %]" />
+ </li>
+ [% END %]
+ <li>
+ <label for="repeatable[% loo.row %]">Repeatable: </label>
+ [% IF loo.repeatable %]
+ <input type="checkbox" id="repeatable[% loo.row %]" name="repeatable[% loo.row %]" checked="checked" value="1" />
[% ELSE %]
+ <input type="checkbox" id="repeatable[% loo.row %]" name="repeatable[% loo.row %]" value="1" />
+ [% END %]
+ </li>
<li>
- <input type="hidden" name="tagsubfield" value="[% loo.tagsubfield %]" />
- </li>
+ <label for="mandatory[% loo.row %]">Mandatory: </label>
+ [% IF loo.mandatory %]
+ <input type="checkbox" id="mandatory[% loo.row %]" name="mandatory[% loo.row %]" checked="checked" value="1" />
+ [% ELSE %]
+ <input type="checkbox" id="mandatory[% loo.row %]" name="mandatory[% loo.row %]" value="1" />
[% END %]
- <li><label for="repeatable[% loo.row %]">Repeatable: </label>[% loo.repeatable %] </li>
- <li><label for="mandatory[% loo.row %]">Mandatory: </label>[% loo.mandatory %] </li>
- <li><label for="liblibrarian[% loo.row %]">Text for librarian: </label><input id="liblibrarian[% loo.row %]" type="text" name="liblibrarian" value="[% loo.liblibrarian %]" size="40" maxlength="80" /></li>
- <li><label for="libopac[% loo.row %]">Text for OPAC: </label><input type="text" id="libopac[% loo.row %]" name="libopac" value="[% loo.libopac %]" size="40" maxlength="80" /></li>
+ </li>
+ <li><label for="liblibrarian[% loo.row %]">Text for librarian: </label><input id="liblibrarian[% loo.row %]" type="text" name="liblibrarian" value="[% loo.liblibrarian | html_entity %]" size="40" maxlength="80" /></li>
+ <li><label for="libopac[% loo.row %]">Text for OPAC: </label><input type="text" id="libopac[% loo.row %]" name="libopac" value="[% loo.libopac | html_entity %]" size="40" maxlength="80" /></li>
<li><label for="tab[% loo.row %]">Managed in tab: </label>
- <select name="tab" size="1" id="[% loo.tab.id %]">
- [%- IF ( loo.tab.default == -1 ) -%]
+ <select name="tab" size="1" id="tab[% loo.row %]">
+ [%- IF ( loo.tab == -1 ) -%]
<option value="-1" selected="selected">ignore</option>
[%- ELSE -%]
<option value="-1">ignore</option>
[%- END -%]
[%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] -%]
- [%- IF ( loo.tab.default == t && t.length>0 ) -%]
+ [%- IF ( loo.tab == t && t.length>0 ) -%]
<option value="[%- t -%]" selected="selected">[%- t -%]</option>
- [%- ELSIF ( loo.tab.default == t ) -%]
+ [%- ELSIF ( loo.tab == t ) -%]
<option value="[%- t -%]" selected="selected"> </option>
[%- ELSE -%]
<option value="[%- t -%]">[%- t -%]</option>
<legend>Display</legend>
<ol>
<li><label for="ohidden[% loo.row %]">Select to display or not:</label>
- <select name="ohidden" size="1" id="[% loo.ohidden.id %]">
- [%- IF ( loo.ohidden.default == 0 ) -%]
+ <select name="ohidden" size="1" id="ohidden[% loo.row %]">
+ [%- IF ( loo.ohidden == 0 ) -%]
<option value= "0" selected="selected">Show all</option>
- <option value="-5">Hide all</option>
- [%- ELSIF ( loo.ohidden.default == -5 ) -%]
- <option value= "0">Show all</option>
- <option value="-5" selected="selected">Hide all</option>
+ <option value="1">Hide all</option>
[%- ELSE -%]
+ [%# All other non-zero values mean: Hide %]
<option value= "0">Show all</option>
- <option value="-5">Hide all</option>
+ <option value="1" selected="selected">Hide all</option>
[%- END -%]
</select>
</li>
<fieldset class="rows">
<legend>Advanced constraints:</legend>
<ol>
- <li><label for="isurl[% loo.row %]">Is a URL:</label>[% loo.isurl %] (if checked, it means that the subfield is a URL and can be clicked)</li>
+ <li>
+ <label for="isurl[% loo.row %]">Is a URL:</label>
+ [% IF loo.isurl %]
+ <input type="checkbox" id="isurl[% loo.row %]" name="isurl[% loo.row %]" checked="checked" value="1" />
+ [% ELSE %]
+ <input type="checkbox" id="isurl[% loo.row %]" name="isurl[% loo.row %]" value="1" />
+ [% END %]
+ (if checked, it means that the subfield is a URL and can be clicked)
+ </li>
<li>
<label for="defaultvalue[% loo.row %]">Default value:</label>
<input type="text" name="defaultvalue" id="defaultvalue[% loo.row %]" value="[% loo.defaultvalue %]" />
<ol>
<li>
<label for="kohafield[% loo.row %]">Koha field:</label>
- <select name="kohafield" id="[% loo.kohafield.id %]" size="1">
- [%- FOREACH value IN loo.kohafield.values %]
- [% IF ( value == loo.kohafield.default && value.length>0 ) -%]
+ <select name="kohafield" id="kohafield[% loo.row %]" size="1">
+ [%- FOREACH value IN loo.kohafields %]
+ [% IF ( value == loo.kohafield && value.length>0 ) -%]
<option value="[% value %]" selected="selected">[% value %]</option>
- [%- ELSIF ( value == loo.kohafield.default ) -%]
+ [%- ELSIF ( value == loo.kohafield ) -%]
<option value="[% value %]" selected="selected"> </option>
[%- ELSIF ( value.length==0 ) -%]
<option value="[% value %]"> </option>
</li>
<li>
<label for="authorised_value[% loo.row %]">Authorized value:</label>
- <select name="authorised_value" id="[% loo.authorised_value.id %]" size="1">
- [%- FOREACH value IN loo.authorised_value.values %]
- [% IF ( value == loo.authorised_value.default && value.length>0 ) -%]
+ <select name="authorised_value" id="authorised_value[% loo.row %]" size="1">
+ [%- FOREACH value IN loo.authorised_values %]
+ [% IF ( value == loo.authorised_value && value.length>0 ) -%]
<option value="[% value %]" selected="selected">[% value %]</option>
- [%- ELSIF ( value == loo.authorised_value.default ) -%]
+ [%- ELSIF ( value == loo.authorised_value ) -%]
<option value="[% value %]" selected> </option>
[%- ELSIF ( value.length==0 ) -%]
<option value="[% value %]"> </option>
</li>
<li>
<label for="frameworkcode[% loo.row %]">Thesaurus:</label>
- <select name="frameworkcode" id="[% loo.frameworkcode.id %]" size="1">
- [%- FOREACH value IN loo.frameworkcode.values %]
- [% IF ( value == loo.frameworkcode.default && value.length>0 ) -%]
+ <select name="frameworkcode" id="frameworkcode[% loo.row %]" size="1">
+ [%- FOREACH value IN loo.frameworkcodes %]
+ [% IF ( value == loo.frameworkcode && value.length>0 ) -%]
<option value="[% value %]" selected="selected">[% value %]</option>
- [%- ELSIF ( value == loo.frameworkcode.default ) -%]
+ [%- ELSIF ( value == loo.frameworkcode ) -%]
<option value="[% value %]" selected="selected"> </option>
[%- ELSIF ( value.length==0 ) -%]
<option value="[% value %]"> </option>
</li>
<li>
<label for="value_builder[% loo.row %]">Plugin:</label>
- <select name="value_builder" id="[% loo.value_builder.id %]" size="1">
- [%- FOREACH value IN loo.value_builder.values %]
- [% IF ( value == loo.value_builder.default && value.length>0 ) -%]
+ <select name="value_builder" id="value_builder[% loo.row %]" size="1">
+ [%- FOREACH value IN loo.value_builders %]
+ [% IF ( value == loo.value_builder && value.length>0 ) -%]
<option value="[% value %]" selected="selected">[% value %]</option>
- [%- ELSIF ( value == loo.value_builder.default ) -%]
+ [%- ELSIF ( value == loo.value_builder ) -%]
<option value="[% value %]" selected="selected"> </option>
[%- ELSIF ( value.length==0 ) -%]
<option value="[% value %]"> </option>
[% IF ( delete_confirm ) %]
- <div class="dialog alert"><h3>Delete subfield <span class="ex">'[% tagsubfield %]'?</span></h3>
- <form action="[% delete_link %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
- <table><tr><th scope="row">Subfield:</th> <td>[% tagsubfield %]</td></tr>
- <tr><th scope="row">Description:</th> <td>[% liblibrarian %]</td></tr></table>
- <input type="hidden" name="searchfield" value="[% searchfield %]" />
- <input type="hidden" name="tagfield" value="[% tagfield | html%]" />
- <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
- <input type="hidden" name="authtypecode" value="[% authtypecode | html%]" />
- <input type="submit" class="approve" value="Yes, delete this subfield" />
+ <div class="dialog alert">
+ <h3>Delete subfield <span class="ex">'[% tagsubfield %]'?</span></h3>
+ <form action="[% delete_link %]" method="post">
+ <input type="hidden" name="op" value="delete_confirmed" />
+ <table>
+ <tr><th scope="row">Subfield:</th> <td>[% tagsubfield %]</td></tr>
+ <tr><th scope="row">Description:</th> <td>[% liblibrarian | html_entity %]</td></tr>
+ </table>
+ <input type="hidden" name="searchfield" value="[% searchfield %]" />
+ <input type="hidden" name="tagfield" value="[% tagfield%]" />
+ <input type="hidden" name="tagsubfield" value="[% tagsubfield | html %]" />
+ <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
+ <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this subfield</button>
</form>
+
<form action="[% delete_link %]" method="get">
- <input type="hidden" name="searchfield" value="[% searchfield %]" />
- <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
- <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
- <input type="hidden" name="authtypecode" value="[% authtypecode |html%]" />
- <input type="submit" class="deny" value="No, do not delete" />
+ <input type="hidden" name="searchfield" value="[% searchfield %]" />
+ <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
+ <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
+ <input type="hidden" name="authtypecode" value="[% authtypecode |html %]" />
+ <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
</form>
</form></div>
[% END %]
[% IF ( else ) %]
<h1>Authority MARC subfield structure admin for [% tagfield | html %] (authority: [% authtypecode | html%])</h1>
-<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit. </p>
-<p>The column <b>Koha field</b> shows that the subfield is linked with a Koha field. Koha can manage a MARC interface, and a Koha interface. This link ensures that both DB are synchronized</p>
+<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit.</p>
+<p>The column 'Koha field' shows that the subfield is linked with a Koha field.</p>
<table>
<tr>
<th>Subfield</th>
<th>Text</th>
<th>Constraints</th>
- <th>Delete</th>
+ <th> </th>
</tr>
[% FOREACH loo IN loop %]
<tr>
<td>[% loo.tagsubfield %]</td>
<td>
[% IF ( loo.subfield_ignored ) %]
- <i>[% loo.liblibrarian %]</i>
+ <i>[% loo.liblibrarian | html_entity %]</i>
[% ELSE %]
- [% loo.liblibrarian %]
+ [% loo.liblibrarian | html_entity %]
[% END %]
</td>
<td>
[% IF ( loo.value_builder ) %] | <strong>Plugin:</strong>[% loo.value_builder %],[% END %]
[% END %]
</td>
- <td><a href="[% loo.delete %]">Delete</a></td>
+ <td><a href="[% loo.delete %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a></td>
</tr>
[% END %]
</table>
</form>
[% IF ( previous ) %]
- <input type="image" src="[% interface %]/[% theme %]/images/1leftarrow.png" title="previous" alt="previous" border="0" />
+ <input type="image" src="[% interface %]/[% theme %]/images/1leftarrow.png" title="previous" alt="previous" />
</a>
[% END %]
[% IF ( next ) %]
[% next %]
- <input type="image" src="[% interface %]/[% theme %]/images/1rightarrow.png" title="next" alt="next" border="0" />
+ <input type="image" src="[% interface %]/[% theme %]/images/1rightarrow.png" title="next" alt="next" />
</a>
[% END %]
[% INCLUDE 'admin-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $('#subfieldtabs').tabs();
+ });
+ </script>
+[% END %]
[% INCLUDE 'intranet-bottom.inc' %]