4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Administration › Authority MARC subfield structure</title>
6 [% INCLUDE 'doc-head-close.inc' %]
9 <body id="admin_auth_subfields_structure" class="admin">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'prefs-admin-search.inc' %]
12 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
13 <a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a> ›
14 [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri%]">[% authtypecode | html %] framework</a> ›
15 [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a> ›
17 [% IF ( else ) %]Authority MARC subfield structure for [% tagfield | html %]
18 [% ELSE %]<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> ›
20 [% IF ( delete_confirm ) %]Confirm deletion of subfield [% tagsubfield | html %]?[% END %]
21 [% IF ( delete_confirmed ) %]Data deleted[% END %]
23 [% IF ( use_heading_flags_p ) %]
24 [% IF ( heading_edit_subfields_p ) %]Edit MARC subfields constraints[% END %]
25 [% ELSE %][% action | html %][% END %]
29 <div class="main container-fluid">
31 <div class="col-sm-10 col-sm-push-2">
36 <h1>[% IF ( use_heading_flags_p ) %]
37 [% IF ( heading_edit_subfields_p ) %]Edit MARC subfields constraints for field [% tagfield | html %] authority [% authtypecode | html %][% END %]
38 [% ELSE %][% action | html %][% END %]</h1>
39 <form action="[% script_name | html %]" name="Aform" method="post">
40 <input type="hidden" name="op" value="add_validate" />
41 <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
42 <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
43 <fieldset class="action"><input type="submit" class="submit" value="Save changes" /> <a class="cancel" href="/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=[% tagfield | uri %]&authtypecode=[% authtypecode |uri %]">Cancel</a></fieldset>
44 <div id="subfieldtabs" class="toptabs numbered">
46 [% FOREACH loo IN loop %]
47 [% IF ( loo.new_subfield ) %]
48 <li><a href="#sub[% loo.tagsubfield | uri %]field" title="[% loo.liblibrarian | html_entity %]">New</a></li>
50 <li><a href="#sub[% loo.tagsubfield | uri %]field" title="[% loo.liblibrarian | html_entity %]">
51 [% loo.tagsubfield | html %]
57 [% FOREACH loo IN loop %]
58 <div id="sub[% loo.tagsubfield | html %]field">
59 <fieldset class="rows"><ol>
61 [% IF ( loo.new_subfield ) %]
63 <label for="tagsubfieldinput[% loo.row | html %]">Subfield code: </label>
64 <input type="text" name="tagsubfield" value="[% loo.tagsubfield | html %]" size="1" id="tagsubfield" maxlength="1" />
68 <input type="hidden" name="tagsubfield" value="[% loo.tagsubfield | html %]" />
72 <label for="repeatable[% loo.row | html %]">Repeatable: </label>
73 [% IF loo.repeatable %]
74 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable[% loo.row | html %]" checked="checked" value="1" />
76 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable[% loo.row | html %]" value="1" />
80 <label for="mandatory[% loo.row | html %]">Mandatory: </label>
81 [% IF loo.mandatory %]
82 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory[% loo.row | html %]" checked="checked" value="1" />
84 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory[% loo.row | html %]" value="1" />
87 <li><label for="liblibrarian[% loo.row | html %]">Text for librarian: </label><input id="liblibrarian[% loo.row | html %]" type="text" name="liblibrarian" value="[% loo.liblibrarian | html_entity %]" size="40" maxlength="80" /></li>
88 <li><label for="libopac[% loo.row | html %]">Text for OPAC: </label><input type="text" id="libopac[% loo.row | html %]" name="libopac" value="[% loo.libopac | html_entity %]" size="40" maxlength="80" /></li>
89 <li><label for="tab[% loo.row | html %]">Managed in tab: </label>
90 <select name="tab" size="1" id="tab[% loo.row | html %]">
91 [%- IF ( loo.tab == -1 ) -%]
92 <option value="-1" selected="selected">ignore</option>
94 <option value="-1">ignore</option>
96 [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] -%]
97 [%- IF ( loo.tab == t && t.length>0 ) -%]
98 <option value="[%- t | html -%]" selected="selected">[%- t | html -%]</option>
99 [%- ELSIF ( loo.tab == t ) -%]
100 <option value="[%- t | html -%]" selected="selected"> </option>
102 <option value="[%- t | html -%]">[%- t | html -%]</option>
106 (ignore means that the subfield does not display in the record editor)
110 <legend>Display</legend>
112 <li><label for="ohidden[% loo.row | html %]">Select to display or not:</label>
113 <select name="ohidden" size="1" id="ohidden[% loo.row | html %]">
114 [%- IF ( loo.ohidden == 0 ) -%]
115 <option value= "0" selected="selected">Show all</option>
116 <option value="1">Hide all</option>
118 [%# All other non-zero values mean: Hide %]
119 <option value= "0">Show all</option>
120 <option value="1" selected="selected">Hide all</option>
128 <fieldset class="rows">
129 <legend>Advanced constraints:</legend>
132 <label for="isurl[% loo.row | html %]">Is a URL:</label>
134 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl[% loo.row | html %]" checked="checked" value="1" />
136 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl[% loo.row | html %]" value="1" />
138 (if checked, it means that the subfield is a URL and can be clicked)
141 <label for="defaultvalue[% loo.row | html %]">Default value:</label>
142 <input type="text" name="defaultvalue" id="defaultvalue[% loo.row | html %]" value="[% loo.defaultvalue | html %]" />
148 <fieldset><legend>Help input</legend>
151 <label for="kohafield[% loo.row | html %]">Koha field:</label>
152 <select name="kohafield" id="kohafield[% loo.row | html %]" size="1">
153 [%- FOREACH value IN loo.kohafields %]
154 [% IF ( value == loo.kohafield && value.length>0 ) -%]
155 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
156 [%- ELSIF ( value == loo.kohafield ) -%]
157 <option value="[% value | html %]" selected="selected"> </option>
158 [%- ELSIF ( value.length==0 ) -%]
159 <option value="[% value | html %]"> </option>
161 <option value="[% value | html %]">[% value | html %]</option>
167 <label for="authorised_value[% loo.row | html %]">Authorized value:</label>
168 <select name="authorised_value" id="authorised_value[% loo.row | html %]" size="1">
169 [%- FOREACH value IN loo.authorised_values %]
170 [% IF ( value == loo.authorised_value && value.length>0 ) -%]
171 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
172 [%- ELSIF ( value == loo.authorised_value ) -%]
173 <option value="[% value | html %]" selected> </option>
174 [%- ELSIF ( value.length==0 ) -%]
175 <option value="[% value | html %]"> </option>
177 <option value="[% value | html %]">[% value | html %]</option>
183 <label for="frameworkcode[% loo.row | html %]">Thesaurus:</label>
184 <select name="frameworkcode" id="frameworkcode[% loo.row | html %]" size="1">
185 [%- FOREACH value IN loo.frameworkcodes %]
186 [% IF ( value == loo.frameworkcode && value.length>0 ) -%]
187 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
188 [%- ELSIF ( value == loo.frameworkcode ) -%]
189 <option value="[% value | html %]" selected="selected"> </option>
190 [%- ELSIF ( value.length==0 ) -%]
191 <option value="[% value | html %]"> </option>
193 <option value="[% value | html %]">[% value | html %]</option>
199 <label for="value_builder[% loo.row | html %]">Plugin:</label>
200 <select name="value_builder" id="value_builder[% loo.row | html %]" size="1">
201 [%- FOREACH value IN loo.value_builders %]
202 [% IF ( value == loo.value_builder && value.length>0 ) -%]
203 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
204 [%- ELSIF ( value == loo.value_builder ) -%]
205 <option value="[% value | html %]" selected="selected"> </option>
206 [%- ELSIF ( value.length==0 ) -%]
207 <option value="[% value | html %]"> </option>
209 <option value="[% value | html %]">[% value | html %]</option>
217 </ol></fieldset><br class="clear" />
224 [% IF ( delete_confirm ) %]
226 <div class="dialog alert">
227 <h3>Delete subfield <span class="ex">'[% tagsubfield | html %]'?</span></h3>
228 <form action="[% delete_link | html %]" method="post">
229 <input type="hidden" name="op" value="delete_confirmed" />
231 <tr><th scope="row">Subfield:</th> <td>[% tagsubfield | html %]</td></tr>
232 <tr><th scope="row">Description:</th> <td>[% liblibrarian | html_entity %]</td></tr>
234 <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
235 <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
236 <input type="hidden" name="tagsubfield" value="[% tagsubfield | html %]" />
237 <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
238 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this subfield</button>
241 <form action="[% delete_link | html %]" method="get">
242 <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
243 <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
244 <input type="hidden" name="tagsubfield" value="[% tagsubfield | html %]" />
245 <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
246 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
251 [% IF ( delete_confirmed ) %]
253 <div class="dialog message"> <h3>Data deleted</h3>
254 <form action="[% script_name | html %]" method="post">
255 <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
256 <input type="submit" class="approve" value="OK" />
262 <h1>Authority MARC subfield structure admin for [% tagfield | html %] (authority: [% authtypecode | html %])</h1>
263 <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>
264 <p>The column 'Koha field' shows that the subfield is linked with a Koha field.</p>
273 [% FOREACH loo IN loop %]
275 <td>[% loo.tagsubfield | html %]</td>
277 [% IF ( loo.subfield_ignored ) %]
278 <i>[% loo.liblibrarian | html_entity %]</i>
280 [% loo.liblibrarian | html_entity %]
284 [% IF ( loo.subfield_ignored ) %]
285 <i>subfield ignored</i>
287 <strong>Tab:</strong>[% loo.tab | html %],
288 [% IF ( loo.kohafield ) %] | <strong>Koha field:</strong> [% loo.kohafield | html %], [% END %]
289 [% IF ( loo.repeatable ) %]Repeatable, [% ELSE %]Not repeatable,
291 [% IF ( loo.mandatory ) %]Mandatory, [% ELSE %]Not mandatory,
293 [% IF ( loo.hidden ) %]hidden,
295 [% IF ( loo.isurl ) %]is a url,
297 [% IF ( loo.authorised_value ) %] | <strong>Auth value:</strong>[% loo.authorised_value | html %],
299 [% IF ( loo.frameworkcode ) %] | <strong>Authority:</strong>[% loo.frameworkcode | html %],
301 [% IF ( loo.value_builder ) %] | <strong>Plugin:</strong>[% loo.value_builder | html %],[% END %]
304 <td><a href="[% loo.delete | url %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a></td>
309 <form action="[% script_name | html %]" method="get">
310 <fieldset class="action"><input type="hidden" name="op" value="add_form" />
311 <input type="hidden" name="tagfield" value="[% edit_tagfield | html %]" />
312 <input type="hidden" name="authtypecode" value="[% edit_authtypecode | html %]" />
313 <input type="submit" value="Edit subfields" />
314 <a class="cancel" href="auth_tag_structure.pl?searchfield=[% tagfield | uri%]&authtypecode=[% authtypecode | uri %]">Cancel</a></fieldset>
317 [% IF ( previous ) %]
318 <input type="image" src="[% interface | html %]/[% theme | html %]/images/1leftarrow.png" title="previous" alt="previous" />
323 <input type="image" src="[% interface | html %]/[% theme | html %]/images/1rightarrow.png" title="next" alt="next" />
330 </div> <!-- /.col-sm-10.col-sm-push-2 -->
332 <div class="col-sm-2 col-sm-pull-10">
334 [% INCLUDE 'admin-menu.inc' %]
336 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
337 </div> <!-- /.row -->
339 [% MACRO jsinclude BLOCK %]
340 [% Asset.js("js/admin-menu.js") | $raw %]
342 $(document).ready(function() {
343 $('#subfieldtabs').tabs();
347 [% INCLUDE 'intranet-bottom.inc' %]