4 [% INCLUDE 'doc-head-open.inc' %]
6 [%- IF ( add_form ) -%]
7 [%- IF ( use_heading_flags_p ) -%]
8 [%- IF ( heading_edit_subfields_p ) -%]
9 Edit MARC subfields constraints › MARC subfield structure
13 [%- action | html -%] › MARC subfield structure
18 [%- IF ( delete_confirm ) -%]
20 MARC subfield structure › Confirm deletion of subfield [%- mss.tagsubfield | html -%]
22 Confirm deletion of subfield [%- tagsubfield | html -%] › MARC subfield structure
25 [%- IF ( delete_confirmed ) -%]
26 Subfield deleted › MARC subfield structure
31 MARC subfield structure
32 [%- END -%] › Administration › Koha
34 [% INCLUDE 'doc-head-close.inc' %]
35 <style>.constraints::after { content: " "; clear: both; display:block; }</style>
38 <body id="admin_marc_subfields_structure" class="admin">
39 [% INCLUDE 'header.inc' %]
40 [% INCLUDE 'prefs-admin-search.inc' %]
42 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
45 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
48 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
51 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
54 <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode | uri %]&searchfield=[% tagfield | uri %]">
55 [% IF ( frameworkcode ) %]
56 [% frameworkcode | html %]
59 [% END %] <span>framework structure</span>
64 [% IF ( use_heading_flags_p ) %]
65 [% IF ( heading_edit_subfields_p ) %]
67 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] subfield structure</a>
70 <a href="#" aria-current="page">
71 Edit subfields constraints
77 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] Subfield structure</a>
80 <a href="#" aria-current="page">
87 [% IF ( delete_confirm ) %]
89 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% mss.tagfield | uri %]&frameworkcode=[% mss.frameworkcode | uri %]">Tag [% mss.tagfield | html %] Subfield structure</a>
92 <a href="#" aria-current="page">
93 Confirm deletion of subfield [% mss.tagsubfield | html %]i
100 <a href="#" aria-current="page">
101 Tag [% tagfield | html %] Subfield structure
106 </nav> <!-- /#breadcrumbs -->
108 <div class="main container-fluid">
110 <div class="col-sm-10 col-sm-push-2">
113 [% IF ( add_form ) %]
115 [% IF ( use_heading_flags_p ) %]
116 [% IF ( heading_edit_subfields_p ) %]<span>Tag</span> [% tagfield | html %] <span>Subfield constraints</span>[% END %]
122 <form action="[% script_name | html %]" name="Aform" method="post">
123 <input type="hidden" name="op" value="add_validate" />
124 <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
125 <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
127 [% BLOCK outputsubfield %][% FILTER collapse %]
128 [% SWITCH ( subfieldanchor ) %]
134 [% subfieldanchor | html %]
138 <div id="subfieldtabs" class="toptabs numbered">
139 <ul class="nav nav-tabs" role="tablist">
140 [% FOREACH loo IN loop %]
141 <li id="tab_subfield_[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]" class="tab-item" role="presentation">
142 [% IF ( loo.new_subfield ) %]
143 <a href="#sub[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]field" aria-controls="sub[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]field" role="tab" data-toggle="tab" title="[% loo.liblibrarian | html_entity %]">New</a>
145 <a href="#sub[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]field" aria-controls="sub[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]field" role="tab" data-toggle="tab" title="[% loo.liblibrarian | html_entity %]">
146 [% loo.subfieldcode | html %]
153 <div class="tab-content">
155 [% FOREACH loo IN loop %]
156 <div class="constraints tab-pane" role="tabpanel" id="sub[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]field">
157 <input type="hidden" name="tab_id" value="[% loo.row | html %]" />
158 <div id="basic[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]" class="contraints">
159 <fieldset class="rows">
160 <legend>Basic constraints</legend>
162 [% IF ( subfieldcode == 0 || subfieldcode ) %]
164 <span class="label">Subfield code:</span>
165 [% loo.subfieldcode | html %]
166 <input type="hidden" name="tagsubfield" value="[% loo.subfieldcode | html %]" />
170 <label for="tagsubfield[% loo.row | html %]">Subfield code:</label>
171 <input type="text" id="tagsubfield[% loo.row | html %]" name="tagsubfield" value="[% loo.subfieldcode | html %]" />
175 <label for="liblibrarian[% loo.row | html %]">Text for librarian: </label>
176 <input id="liblibrarian[% loo.row | html %]" type="text" name="liblibrarian_[% loo.row | html %]" value="[% loo.liblibrarian | html_entity %]" size="40" maxlength="80" />
179 <label for="libopac[% loo.row | html %]">Text for OPAC: </label>
180 <input type="text" id="libopac[% loo.row | html %]" name="libopac_[% loo.row | html %]" value="[% loo.libopac | html_entity %]" size="40" maxlength="80" />
183 <label for="repeatable[% loo.row | html %]">Repeatable: </label>
184 [% IF loo.repeatable %]
185 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable_[% loo.row | html %]" checked="checked" value="1" />
187 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable_[% loo.row | html %]" value="1" />
191 <label for="mandatory[% loo.row | html %]">Mandatory: </label>
192 [% IF loo.mandatory %]
193 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory_[% loo.row | html %]" checked="checked" value="1" />
195 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory_[% loo.row | html %]" value="1" />
199 <label for="important[% loo.row | html %]">Important: </label>
200 [% IF loo.important %]
201 <input type="checkbox" id="important[% loo.row | html %]" name="important_[% loo.row | html %]" checked="checked" value="1" />
203 <input type="checkbox" id="important[% loo.row | html %]" name="important_[% loo.row | html %]" value="1" />
206 <li><label for="tab[% loo.row | html %]">Managed in tab: </label>
207 <select name="tab_[% loo.row | html %]" tabindex="" id="tab[% loo.row | html %]">
208 [%- IF ( loo.tab == -1 ) -%]
209 <option value="-1" selected="selected">ignore</option>
211 <option value="-1">ignore</option>
213 [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -%]
214 [%- IF ( loo.tab == t ) -%]
215 <option value="[%- t | html -%]" selected="selected">[%- t | html -%]</option>
217 <option value="[%- t | html -%]">[%- t | html -%]</option>
220 [%- IF ( loo.tab == 10 ) -%]
221 <option value="10" selected="selected">items (10)</option>
223 <option value="10">items (10)</option>
226 <div class="hint">Ignore means that the subfield does not display in the record editor</div>
229 </fieldset> <!-- /.rows -->
230 </div> <!-- /#basic[%- PROCESS outputsubfield subfieldanchor = subfieldcode -%] -->
232 <div id="advanced[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]" class="contraints">
233 <fieldset class="rows">
234 <legend>Advanced constraints</legend>
237 <label for="defaultvalue[% loo.row | html %]">Default value:</label>
238 <input type="text" name="defaultvalue_[% loo.row | html %]" id="defaultvalue[% loo.row | html %]" value="[% loo.defaultvalue | html %]" />
241 <label for="maxlength[% loo.row | html %]">Max length:</label>
242 <input type="text" id="maxlength[% loo.row | html %]" name="maxlength_[% loo.row | html %]" value="[% loo.maxlength | html %]" size="4" />
245 [% IF loo.hidden_protected %]
246 <input type="hidden" id="hidden-[% loo.row | html %]" name="hidden_[% loo.row | html %]" value="[% loo.hidden | html %]" data-koha-protected="1" />
248 <input type="hidden" id="hidden-[% loo.row | html %]" name="hidden_[% loo.row | html %]" value="[% loo.hidden | html %]" />
250 <label for="hidden[% loo.row | html %]">Visibility: </label>
251 <input type="checkbox" id="hidden_opac_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_opac_[% loo.row | html %]"/>
252 <label for="hidden_opac_[% loo.row | html %]" style="float: none;">OPAC</label>
253 <input type="checkbox" id="hidden_intranet_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_intranet_[% loo.row | html %]"/>
254 <label for="hidden_intranet_[% loo.row | html %]" style="float: none;">Intranet</label>
255 <input type="checkbox" id="hidden_editor_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_editor_[% loo.row | html %]"/>
256 <label for="hidden_editor_[% loo.row | html %]" style="float: none;">Editor</label>
257 <input type="checkbox" id="hidden_collapsed_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_collapsed_[% loo.row | html %]"/>
258 <label for="hidden_collapsed_[% loo.row | html %]" style="float: none;">Collapsed</label>
259 <input type="checkbox" id="hidden_flagged_[% loo.row | html %]" name="flagged_[% loo.row | html %]"/>
260 <label for="hidden_flagged_[% loo.row | html %]" style="float: none;">Flagged</label>
263 <label for="isurl[% loo.row | html %]">Is a URL:</label>
265 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl_[% loo.row | html %]" checked="checked" value="1" />
267 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl_[% loo.row | html %]" value="1" />
269 <span class="hint">If checked, it means that the subfield is a URL and can be clicked</span>
272 <label for="link[% loo.row | html %]">Link:</label>
273 <input type="text" id="link[% loo.row | html %]" name="link_[% loo.row | html %]" value="[% loo.link | html %]" size="10" maxlength="80" />
274 <div class="hint">An index name, e.g. title or Local-Number</div>
277 <label for="kohafield[% loo.row | html %]">Koha link:</label>
278 <!-- This select should be DISABLED; value is submitted by the following hidden input -->
279 <select name="kohafield_[% loo.row | html %]" id="kohafield[% loo.row | html %]" disabled>
280 [% FOREACH value IN loo.kohafields %]
281 [% IF ( value == loo.kohafield ) %]
282 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
284 <option value="[% value | html %]">[% value | html %]</option>
288 <!-- Do NOT remove this next hidden input! We need it to save kohafield. -->
289 <input type="hidden" name="kohafield_[% loo.row | html %]" value="[% loo.kohafield | html %]"/>
292 </fieldset> <!-- /.rows -->
293 </div> <!-- /#advanced[%- PROCESS outputsubfield subfieldanchor = subfieldcode -%] -->
295 <div id="oth[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%]" class="constraints">
296 <fieldset class="rows">
297 <legend>Other options (choose one)</legend>
300 <label for="authorised_value[% loo.row | html %]">Authorized value:</label>
301 <select name="authorised_value_[% loo.row | html %]" id="authorised_value[% loo.row | html %]">
302 <option value=""></option>
303 [% FOREACH value IN loo.authorised_values %]
304 [% IF ( value == loo.authorised_value ) %]
305 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
307 <option value="[% value | html %]">[% value | html %]</option>
313 <label for="authtypecode[% loo.row | html %]">Thesaurus:</label>
314 <select name="authtypecode_[% loo.row | html %]" id="authtypecode[% loo.row | html %]">
315 [% FOREACH value IN loo.authtypes %]
316 [% IF ( value == loo.authtypecode ) %]
317 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
319 <option value="[% value | html %]">[% value | html %]</option>
325 <label for="value_builder[% loo.row | html %]">Plugin:</label>
326 <select name="value_builder_[% loo.row | html %]" id="value_builder[% loo.row | html %]">
327 [% FOREACH value IN loo.value_builders %]
328 [% IF ( value == loo.value_builder ) %]
329 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
331 <option value="[% value | html %]">[% value | html %]</option>
337 </fieldset> <!-- /.rows -->
338 </div> <!-- /#oth[%- PROCESS outputsubfield subfieldanchor = loo.subfieldcode -%] -->
339 </div><!-- /constraints -->
340 [% END # /FOREACH loo %]
341 </div> <!-- /.tab-content -->
342 </div><!-- /subfieldtabs -->
344 <fieldset class="action">
345 <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>
348 [% END # /IF ( add_form ) %]
350 [% IF ( delete_confirm ) %]
351 <div class="dialog alert">
352 <h1>Confirm deletion of subfield [% mss.tagsubfield | html %]?</h1>
353 <p>Subfield: [% mss.tagsubfield | html %]</p>
354 <p>Description: [% mss.liblibrarian | html_entity %]</p>
356 <form action="[% delete_link | html %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
357 <input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
358 <input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
359 <input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
360 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this subfield</button>
364 <form action="[% script_name | html %]" method="post">
365 <input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
366 <input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
367 <input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
368 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
370 </div> <!-- /.dialog.alert -->
371 [% END # /IF ( delete_confirm ) %]
374 <h1>MARC subfield structure admin for [% tagfield | html %] [% IF ( frameworkcode ) %](framework [% frameworkcode | html %])[% ELSE %](default framework)[% END %]</h1>
376 <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>
377 <p>The column 'Koha field' shows that the subfield is linked with a Koha field.</p>
379 <table id="table_marcsubfieldstructure">
385 <th class="NoSort noExport">Actions</th>
389 [% FOREACH loo IN loop %]
391 <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>
393 [% IF loo.tab == -1 %]
394 <em>[% loo.liblibrarian | html_entity %]</em>
396 [% loo.liblibrarian | html_entity %]
400 [% IF loo.tab == -1 %]
401 <em>subfield ignored</em>
403 <span>Tab:</span>[% loo.tab | html %],
404 [% IF ( loo.kohafield ) %] | <span>Koha field:</span> [% loo.kohafield | html %], [% END %]
405 [% IF ( loo.repeatable ) %]<span>Repeatable</span>, [% ELSE %]<span>Not repeatable</span>,[% END %]
406 [% IF ( loo.mandatory ) %]<span>Mandatory</span>, [% ELSE %]<span>Not mandatory</span>,[% END %]
407 [% IF ( loo.important ) %]<span>Important</span>, [% ELSE %]<span>Not important</span>,[% END %]
408 [% IF ( loo.seealso ) %] | <span>See also:</span> [% loo.seealso | html %],[% END %]
409 [% IF ( loo.hidden ) %]<span>hidden</span>,[% END %]
410 [% IF ( loo.isurl ) %]<span>is a URL</span>,[% END %]
411 [% IF ( loo.authorised_value ) %] | <span>Auth value:</span>[% loo.authorised_value | html %],[% END %]
412 [% IF ( loo.authtypecode ) %] | <span>Authority:</span>[% loo.authtypecode | html %],[% END %]
413 [% IF ( loo.value_builder ) %] | <span>Plugin:</span>[% loo.value_builder | html %],[% END %]
414 [% IF ( loo.link ) %] | <span>Link:</span>[% loo.link | html %],[% END %]
418 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=[% loo.tagfield | uri %]&tagsubfield=[% loo.tagsubfield | uri %]&frameworkcode=[% frameworkcode | uri %]#sub[% loo.tagsubfield | uri %]field" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
419 <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>
424 </table> <!-- /#table_marcsubfieldstructure -->
426 <form action="[% script_name | html %]" method="get">
427 <fieldset class="action"><input type="hidden" name="op" value="add_form" />
428 <input type="hidden" name="tagfield" value="[% edit_tagfield | html %]" />
429 <input type="hidden" name="frameworkcode" value="[% edit_frameworkcode | html %]" />
430 <input type="submit" value="Edit subfields" />
431 <a class="cancel" href="marctagstructure.pl?searchfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | html %]">Cancel</a>
438 </div> <!-- /.col-sm-10.col-sm-push-2 -->
440 <div class="col-sm-2 col-sm-pull-10">
442 [% INCLUDE 'admin-menu.inc' %]
444 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
445 </div> <!-- /.row -->
447 [% MACRO jsinclude BLOCK %]
448 [% INCLUDE 'datatables.inc' %]
449 [% Asset.js("js/admin-menu.js") | $raw %]
451 var tagsubfield = "[% tagsubfield | html %]";
453 [% Asset.js("js/marc_subfields_structure.js") | $raw %]
456 [% INCLUDE 'intranet-bottom.inc' %]