4 [% INCLUDE 'doc-head-open.inc' %]
6 Koha › Administration ›
7 [%- IF ( add_form ) -%]
8 [%- IF ( use_heading_flags_p ) -%]
9 [%- IF ( heading_edit_subfields_p ) -%]
10 MARC subfield structure › Edit MARC subfields constraints
13 MARC subfield structure › [%- action | html -%]
16 [%- IF ( delete_confirm ) -%]
17 MARC subfield structure › Confirm deletion of subfield [%- tagsubfield | html -%]
19 [%- IF ( delete_confirmed ) -%]
20 MARC subfield structure › Subfield deleted
23 MARC subfield structure
26 [% INCLUDE 'doc-head-close.inc' %]
27 <style>.constraints::after { content: " "; clear: both; display:block; }</style>
30 <body id="admin_marc_subfields_structure" class="admin">
31 [% INCLUDE 'header.inc' %]
32 [% INCLUDE 'prefs-admin-search.inc' %]
34 <div id="breadcrumbs">
35 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
36 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
37 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a> ›
38 <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode | uri %]&searchfield=[% tagfield | uri %]">
39 [% IF ( frameworkcode ) %][% frameworkcode | html %][% ELSE %]Default[% END %] framework structure
42 [% IF ( use_heading_flags_p ) %]
43 [% IF ( heading_edit_subfields_p ) %]
44 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] subfield structure</a> › Edit subfields constraints
47 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] Subfield structure</a> › [% action | html %]
50 [% IF ( delete_confirm ) %]
51 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] Subfield structure</a> › Confirm deletion of subfield [% tagsubfield | html %]
53 [% IF ( delete_confirmed ) %]
54 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] subfield structure</a> › Subfield deleted
57 Tag [% tagfield | html %] Subfield structure
59 </div> <!-- /#breadcrumbs -->
61 <div class="main container-fluid">
63 <div class="col-sm-10 col-sm-push-2">
68 [% IF ( use_heading_flags_p ) %]
69 [% IF ( heading_edit_subfields_p ) %]Tag [% tagfield | html %] Subfield constraints[% END %]
75 <form action="[% script_name | html %]" name="Aform" method="post">
76 <input type="hidden" name="op" value="add_validate" />
77 <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
78 <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
80 <div id="subfieldtabs" class="toptabs numbered">
82 [% FOREACH loo IN loop %]
83 [% IF ( loo.new_subfield ) %]
84 <li><a href="#sub[% loo.urisubfieldcode | uri %]field" title="[% loo.liblibrarian | html_entity %]">New</a></li>
86 <li><a href="#sub[% loo.urisubfieldcode | uri %]field" title="[% loo.liblibrarian | html_entity %]">
87 [% loo.subfieldcode | html %]
93 [% FOREACH loo IN loop %]
94 <div class="constraints" id="sub[% loo.urisubfieldcode | uri %]field">
95 <div id="basic[% loo.urisubfieldcode | html %]" class="contraints">
96 <fieldset class="rows">
97 <legend>Basic constraints</legend>
99 [% IF ( subfieldcode == 0 || subfieldcode ) %]
101 <span class="label">Subfield code:</span>
102 [% loo.subfieldcode | html %] <input type="hidden" name="tagsubfield" value="[% loo.subfieldcode | html %]" />
106 <label for="tagsubfield[% loo.row | html %]">Subfield code:</label>
107 <input type="text" id="tagsubfield[% loo.row | html %]" name="tagsubfield" value="[% loo.subfieldcode | html %]" />
111 <label for="liblibrarian[% loo.row | html %]">Text for librarian: </label>
112 <input id="liblibrarian[% loo.row | html %]" type="text" name="liblibrarian" value="[% loo.liblibrarian | html_entity %]" size="40" maxlength="80" />
115 <label for="libopac[% loo.row | html %]">Text for OPAC: </label>
116 <input type="text" id="libopac[% loo.row | html %]" name="libopac" value="[% loo.libopac | html_entity %]" size="40" maxlength="80" />
119 <label for="repeatable[% loo.row | html %]">Repeatable: </label>
120 [% IF loo.repeatable %]
121 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable[% loo.row | html %]" checked="checked" value="1" />
123 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable[% loo.row | html %]" value="1" />
127 <label for="mandatory[% loo.row | html %]">Mandatory: </label>
128 [% IF loo.mandatory %]
129 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory[% loo.row | html %]" checked="checked" value="1" />
131 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory[% loo.row | html %]" value="1" />
135 <label for="important[% loo.row | html %]">Important: </label>
136 [% IF loo.important %]
137 <input type="checkbox" id="important[% loo.row | html %]" name="important[% loo.row | html %]" checked="checked" value="1" />
139 <input type="checkbox" id="important[% loo.row | html %]" name="important[% loo.row | html %]" value="1" />
142 <li><label for="tab[% loo.row | html %]">Managed in tab: </label>
143 <select name="tab" tabindex="" size="1" id="tab[% loo.row | html %]">
144 [%- IF ( loo.tab == -1 ) -%]
145 <option value="-1" selected="selected">ignore</option>
147 <option value="-1">ignore</option>
149 [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -%]
150 [%- IF ( loo.tab == t ) -%]
151 <option value="[%- t | html -%]" selected="selected">[%- t | html -%]</option>
153 <option value="[%- t | html -%]">[%- t | html -%]</option>
156 [%- IF ( loo.tab == 10 ) -%]
157 <option value="10" selected="selected">items (10)</option>
159 <option value="10">items (10)</option>
162 <div class="hint">Ignore means that the subfield does not display in the record editor</div>
165 </fieldset> <!-- /.rows -->
166 </div> <!-- /#basic[% loo.urisubfieldcode | html %] -->
168 <div id="advanced[% loo.urisubfieldcode | html %]" class="contraints">
169 <fieldset class="rows">
170 <legend>Advanced constraints</legend>
173 <label for="defaultvalue[% loo.row | html %]">Default value:</label>
174 <input type="text" name="defaultvalue" id="defaultvalue[% loo.row | html %]" value="[% loo.defaultvalue | html %]" />
177 <label for="maxlength[% loo.row | html %]">Max length:</label>
178 <input type="text" id="maxlength[% loo.row | html %]" name="maxlength" value="[% loo.maxlength | html %]" size="4" />
181 [% IF loo.hidden_protected %]
182 <input type="hidden" id="hidden-[% loo.row | html %]" name="hidden" value="[% loo.hidden | html %]" data-koha-protected="1" />
184 <input type="hidden" id="hidden-[% loo.row | html %]" name="hidden" value="[% loo.hidden | html %]" />
186 <label for="hidden[% loo.row | html %]" style="float: none;">Visibility: </label>
187 <input type="checkbox" id="hidden_opac_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_opac_[% loo.row | html %]"/>
188 <label for="hidden_opac_[% loo.row | html %]" style="float: none;">OPAC</label>
189 <input type="checkbox" id="hidden_intranet_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_intranet_[% loo.row | html %]"/>
190 <label for="hidden_intranet_[% loo.row | html %]" style="float: none;">Intranet</label>
191 <input type="checkbox" id="hidden_editor_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_editor_[% loo.row | html %]"/>
192 <label for="hidden_editor_[% loo.row | html %]" style="float: none;">Editor</label>
193 <input type="checkbox" id="hidden_collapsed_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_collapsed_[% loo.row | html %]"/>
194 <label for="hidden_collapsed_[% loo.row | html %]" style="float: none;">Collapsed</label>
195 <input type="checkbox" id="hidden_flagged_[% loo.row | html %]" name="flagged_[% loo.row | html %]"/>
196 <label for="hidden_flagged_[% loo.row | html %]" style="float: none;">Flagged</label>
199 <label for="isurl[% loo.row | html %]">Is a URL:</label>
201 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl[% loo.row | html %]" checked="checked" value="1" />
203 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl[% loo.row | html %]" value="1" />
205 <div class="hint">If checked, it means that the subfield is a URL and can be clicked</div>
208 <label for="link[% loo.row | html %]">Link:</label>
209 <input type="text" id="link[% loo.row | html %]" name="link" value="[% loo.link | html %]" size="10" maxlength="80" />
210 <div class="hint">An index name, e.g. title or Local-Number</div>
213 <label for="kohafield[% loo.row | html %]">Koha link:</label>
214 <!-- This select should be DISABLED; value is submitted by the following hidden input -->
215 <select name="kohafield" id="kohafield[% loo.row | html %]" size="1" disabled>
216 [% FOREACH value IN loo.kohafields %]
217 [% IF ( value == loo.kohafield ) %]
218 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
220 <option value="[% value | html %]">[% value | html %]</option>
224 <!-- Do NOT remove this next hidden input! We need it to save kohafield. -->
225 <input type="hidden" name="kohafield" value="[% loo.kohafield | html %]"/>
228 </fieldset> <!-- /.rows -->
229 </div> <!-- /#advanced[% loo.urisubfieldcode | html %] -->
231 <div id="oth[% loo.urisubfieldcode | html %]" class="constraints">
232 <fieldset class="rows">
233 <legend>Other options (choose one)</legend>
236 <label for="authorised_value[% loo.row | html %]">Authorized value:</label>
237 <select name="authorised_value" id="authorised_value[% loo.row | html %]" size="1">
238 <option value=""></option>
239 [% FOREACH value IN loo.authorised_values %]
240 [% IF ( value == loo.authorised_value ) %]
241 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
243 <option value="[% value | html %]">[% value | html %]</option>
249 <label for="authtypecode[% loo.row | html %]">Thesaurus:</label>
250 <select name="authtypecode" id="authtypecode[% loo.row | html %]" size="1">
251 [% FOREACH value IN loo.authtypes %]
252 [% IF ( value == loo.authtypecode ) %]
253 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
255 <option value="[% value | html %]">[% value | html %]</option>
261 <label for="value_builder[% loo.row | html %]">Plugin:</label>
262 <select name="value_builder" id="value_builder[% loo.row | html %]" size="1">
263 [% FOREACH value IN loo.value_builders %]
264 [% IF ( value == loo.value_builder ) %]
265 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
267 <option value="[% value | html %]">[% value | html %]</option>
273 </fieldset> <!-- /.rows -->
274 </div> <!-- /#oth[% loo.urisubfieldcode | html %] -->
275 </div><!-- /constraints -->
276 [% END # /FOREACH loo %]
277 </div><!-- /subfieldtabs -->
279 <fieldset class="action">
280 <input type="submit" value="Save changes" /> <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]" class="cancel">Cancel</a>
283 [% END # /IF ( add_form ) %]
285 [% IF ( delete_confirm ) %]
286 <div class="dialog alert">
287 <h3>Confirm deletion of subfield [% tagsubfield | html %]?</h3>
288 <p>Subfield: [% tagsubfield | html %]</p>
289 <p>Description: [% liblibrarian | html_entity %]</p>
291 <form action="[% delete_link | html %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
292 <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
293 <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
294 <input type="hidden" name="tagsubfield" value="[% tagsubfield | html %]" />
295 <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
296 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this subfield</button>
300 <form action="[% script_name | html %]" method="post">
301 <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
302 <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
303 <input type="hidden" name="tagsubfield" value="[% tagsubfield | html %]" />
304 <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
305 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
307 </div> <!-- /.dialog.alert -->
308 [% END # /IF ( delete_confirm ) %]
310 [% IF ( delete_confirmed ) %]
311 <h3>Data deleted</h3>
312 <form action="[% script_name | html %]" method="post">
313 <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
314 <input type="submit" value="OK" />
319 <h1>MARC subfield structure admin for [% tagfield | html %] [% IF ( frameworkcode ) %](framework [% frameworkcode | html %])[% ELSE %](default framework)[% END %]</h1>
321 <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>
322 <p>The column 'Koha field' shows that the subfield is linked with a Koha field.</p>
324 <table id="table_marcsubfieldstructure">
330 <th class="NoSort">Actions</th>
334 [% FOREACH loo IN loop %]
336 <td><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=[% loo.tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]#sub[% loo.tagsubfield | uri %]field">[% loo.tagsubfield | html %]</a></td>
338 [% IF ( loo.subfield_ignored ) %]
339 <em>[% loo.liblibrarian | html_entity %]</em>
341 [% loo.liblibrarian | html_entity %]
345 [% IF ( loo.subfield_ignored ) %]
346 <em>subfield ignored</em>
348 Tab:[% loo.tab | html %],
349 [% IF ( loo.kohafield ) %] | Koha field: [% loo.kohafield | html %], [% END %]
350 [% IF ( loo.repeatable ) %]Repeatable, [% ELSE %]Not repeatable,[% END %]
351 [% IF ( loo.mandatory ) %]Mandatory, [% ELSE %]Not mandatory,[% END %]
352 [% IF ( loo.important ) %]Important, [% ELSE %]Not important,[% END %]
353 [% IF ( loo.seealso ) %] | See Also: [% loo.seealso | html %],[% END %]
354 [% IF ( loo.hidden ) %]hidden,[% END %]
355 [% IF ( loo.isurl ) %]is a URL,[% END %]
356 [% IF ( loo.authorised_value ) %] | Auth value:[% loo.authorised_value | html %],[% END %]
357 [% IF ( loo.authtypecode ) %] | Authority:[% loo.authtypecode | html %],[% END %]
358 [% IF ( loo.value_builder ) %] | Plugin:[% loo.value_builder | html %],[% END %]
359 [% IF ( loo.link ) %] | Link:[% loo.link | html %],[% END %]
363 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=[% loo.tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]#sub[% loo.tagsubfield | uri %]field" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
364 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=delete_confirm&tagfield=[% loo.tagfield | uri %]&tagsubfield=[% loo.tagsubfield | uri %]&frameworkcode=[% frameworkcode | uri %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
369 </table> <!-- /#table_marcsubfieldstructure -->
371 <form action="[% script_name | html %]" method="get">
372 <fieldset class="action"><input type="hidden" name="op" value="add_form" />
373 <input type="hidden" name="tagfield" value="[% edit_tagfield | html %]" />
374 <input type="hidden" name="frameworkcode" value="[% edit_frameworkcode | html %]" />
375 <input type="submit" value="Edit subfields" />
376 <a class="cancel" href="marctagstructure.pl?searchfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | html %]">Cancel</a>
383 </div> <!-- /.col-sm-10.col-sm-push-2 -->
385 <div class="col-sm-2 col-sm-pull-10">
387 [% INCLUDE 'admin-menu.inc' %]
389 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
390 </div> <!-- /.row -->
392 [% MACRO jsinclude BLOCK %]
393 [% INCLUDE 'datatables.inc' %]
394 [% Asset.js("js/admin-menu.js") | $raw %]
395 [% Asset.js("js/marc_subfields_structure.js") | $raw %]
398 [% INCLUDE 'intranet-bottom.inc' %]