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 %] framework structure
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 ) %]Tag [% tagfield | html %] Subfield constraints[% 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 <div id="subfieldtabs" class="toptabs numbered">
129 [% FOREACH loo IN loop %]
130 <li id="tab_subfield_[% loo.urisubfieldcode | html %]">
131 [% IF ( loo.new_subfield ) %]
132 <a href="#sub[% loo.urisubfieldcode | uri %]field" title="[% loo.liblibrarian | html_entity %]">New</a>
134 <a href="#sub[% loo.urisubfieldcode | uri %]field" title="[% loo.liblibrarian | html_entity %]">
135 [% loo.subfieldcode | html %]
142 [% FOREACH loo IN loop %]
143 <div class="constraints" id="sub[% loo.urisubfieldcode | uri %]field">
144 <div id="basic[% loo.urisubfieldcode | html %]" class="contraints">
145 <fieldset class="rows">
146 <legend>Basic constraints</legend>
148 [% IF ( subfieldcode == 0 || subfieldcode ) %]
150 <span class="label">Subfield code:</span>
151 [% loo.subfieldcode | html %] <input type="hidden" name="tagsubfield" value="[% loo.subfieldcode | html %]" />
155 <label for="tagsubfield[% loo.row | html %]">Subfield code:</label>
156 <input type="text" id="tagsubfield[% loo.row | html %]" name="tagsubfield" value="[% loo.subfieldcode | html %]" />
160 <label for="liblibrarian[% loo.row | html %]">Text for librarian: </label>
161 <input id="liblibrarian[% loo.row | html %]" type="text" name="liblibrarian" value="[% loo.liblibrarian | html_entity %]" size="40" maxlength="80" />
164 <label for="libopac[% loo.row | html %]">Text for OPAC: </label>
165 <input type="text" id="libopac[% loo.row | html %]" name="libopac" value="[% loo.libopac | html_entity %]" size="40" maxlength="80" />
168 <label for="repeatable[% loo.row | html %]">Repeatable: </label>
169 [% IF loo.repeatable %]
170 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable[% loo.row | html %]" checked="checked" value="1" />
172 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable[% loo.row | html %]" value="1" />
176 <label for="mandatory[% loo.row | html %]">Mandatory: </label>
177 [% IF loo.mandatory %]
178 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory[% loo.row | html %]" checked="checked" value="1" />
180 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory[% loo.row | html %]" value="1" />
184 <label for="important[% loo.row | html %]">Important: </label>
185 [% IF loo.important %]
186 <input type="checkbox" id="important[% loo.row | html %]" name="important[% loo.row | html %]" checked="checked" value="1" />
188 <input type="checkbox" id="important[% loo.row | html %]" name="important[% loo.row | html %]" value="1" />
191 <li><label for="tab[% loo.row | html %]">Managed in tab: </label>
192 <select name="tab" tabindex="" id="tab[% loo.row | html %]">
193 [%- IF ( loo.tab == -1 ) -%]
194 <option value="-1" selected="selected">ignore</option>
196 <option value="-1">ignore</option>
198 [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -%]
199 [%- IF ( loo.tab == t ) -%]
200 <option value="[%- t | html -%]" selected="selected">[%- t | html -%]</option>
202 <option value="[%- t | html -%]">[%- t | html -%]</option>
205 [%- IF ( loo.tab == 10 ) -%]
206 <option value="10" selected="selected">items (10)</option>
208 <option value="10">items (10)</option>
211 <div class="hint">Ignore means that the subfield does not display in the record editor</div>
214 </fieldset> <!-- /.rows -->
215 </div> <!-- /#basic[% loo.urisubfieldcode | html %] -->
217 <div id="advanced[% loo.urisubfieldcode | html %]" class="contraints">
218 <fieldset class="rows">
219 <legend>Advanced constraints</legend>
222 <label for="defaultvalue[% loo.row | html %]">Default value:</label>
223 <input type="text" name="defaultvalue" id="defaultvalue[% loo.row | html %]" value="[% loo.defaultvalue | html %]" />
226 <label for="maxlength[% loo.row | html %]">Max length:</label>
227 <input type="text" id="maxlength[% loo.row | html %]" name="maxlength" value="[% loo.maxlength | html %]" size="4" />
230 [% IF loo.hidden_protected %]
231 <input type="hidden" id="hidden-[% loo.row | html %]" name="hidden" value="[% loo.hidden | html %]" data-koha-protected="1" />
233 <input type="hidden" id="hidden-[% loo.row | html %]" name="hidden" value="[% loo.hidden | html %]" />
235 <label for="hidden[% loo.row | html %]">Visibility: </label>
236 <input type="checkbox" id="hidden_opac_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_opac_[% loo.row | html %]"/>
237 <label for="hidden_opac_[% loo.row | html %]" style="float: none;">OPAC</label>
238 <input type="checkbox" id="hidden_intranet_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_intranet_[% loo.row | html %]"/>
239 <label for="hidden_intranet_[% loo.row | html %]" style="float: none;">Intranet</label>
240 <input type="checkbox" id="hidden_editor_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_editor_[% loo.row | html %]"/>
241 <label for="hidden_editor_[% loo.row | html %]" style="float: none;">Editor</label>
242 <input type="checkbox" id="hidden_collapsed_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_collapsed_[% loo.row | html %]"/>
243 <label for="hidden_collapsed_[% loo.row | html %]" style="float: none;">Collapsed</label>
244 <input type="checkbox" id="hidden_flagged_[% loo.row | html %]" name="flagged_[% loo.row | html %]"/>
245 <label for="hidden_flagged_[% loo.row | html %]" style="float: none;">Flagged</label>
248 <label for="isurl[% loo.row | html %]">Is a URL:</label>
250 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl[% loo.row | html %]" checked="checked" value="1" />
252 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl[% loo.row | html %]" value="1" />
254 <div class="hint">If checked, it means that the subfield is a URL and can be clicked</div>
257 <label for="link[% loo.row | html %]">Link:</label>
258 <input type="text" id="link[% loo.row | html %]" name="link" value="[% loo.link | html %]" size="10" maxlength="80" />
259 <div class="hint">An index name, e.g. title or Local-Number</div>
262 <label for="kohafield[% loo.row | html %]">Koha link:</label>
263 <!-- This select should be DISABLED; value is submitted by the following hidden input -->
264 <select name="kohafield" id="kohafield[% loo.row | html %]" disabled>
265 [% FOREACH value IN loo.kohafields %]
266 [% IF ( value == loo.kohafield ) %]
267 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
269 <option value="[% value | html %]">[% value | html %]</option>
273 <!-- Do NOT remove this next hidden input! We need it to save kohafield. -->
274 <input type="hidden" name="kohafield" value="[% loo.kohafield | html %]"/>
277 </fieldset> <!-- /.rows -->
278 </div> <!-- /#advanced[% loo.urisubfieldcode | html %] -->
280 <div id="oth[% loo.urisubfieldcode | html %]" class="constraints">
281 <fieldset class="rows">
282 <legend>Other options (choose one)</legend>
285 <label for="authorised_value[% loo.row | html %]">Authorized value:</label>
286 <select name="authorised_value" id="authorised_value[% loo.row | html %]">
287 <option value=""></option>
288 [% FOREACH value IN loo.authorised_values %]
289 [% IF ( value == loo.authorised_value ) %]
290 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
292 <option value="[% value | html %]">[% value | html %]</option>
298 <label for="authtypecode[% loo.row | html %]">Thesaurus:</label>
299 <select name="authtypecode" id="authtypecode[% loo.row | html %]">
300 [% FOREACH value IN loo.authtypes %]
301 [% IF ( value == loo.authtypecode ) %]
302 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
304 <option value="[% value | html %]">[% value | html %]</option>
310 <label for="value_builder[% loo.row | html %]">Plugin:</label>
311 <select name="value_builder" id="value_builder[% loo.row | html %]">
312 [% FOREACH value IN loo.value_builders %]
313 [% IF ( value == loo.value_builder ) %]
314 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
316 <option value="[% value | html %]">[% value | html %]</option>
322 </fieldset> <!-- /.rows -->
323 </div> <!-- /#oth[% loo.urisubfieldcode | html %] -->
324 </div><!-- /constraints -->
325 [% END # /FOREACH loo %]
326 </div><!-- /subfieldtabs -->
328 <fieldset class="action">
329 <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>
332 [% END # /IF ( add_form ) %]
334 [% IF ( delete_confirm ) %]
335 <div class="dialog alert">
336 <h3>Confirm deletion of subfield [% mss.tagsubfield | html %]?</h3>
337 <p>Subfield: [% mss.tagsubfield | html %]</p>
338 <p>Description: [% mss.liblibrarian | html_entity %]</p>
340 <form action="[% delete_link | html %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
341 <input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
342 <input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
343 <input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
344 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this subfield</button>
348 <form action="[% script_name | html %]" method="post">
349 <input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
350 <input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
351 <input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
352 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
354 </div> <!-- /.dialog.alert -->
355 [% END # /IF ( delete_confirm ) %]
358 <h1>MARC subfield structure admin for [% tagfield | html %] [% IF ( frameworkcode ) %](framework [% frameworkcode | html %])[% ELSE %](default framework)[% END %]</h1>
360 <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>
361 <p>The column 'Koha field' shows that the subfield is linked with a Koha field.</p>
363 <table id="table_marcsubfieldstructure">
369 <th class="NoSort noExport">Actions</th>
373 [% FOREACH loo IN loop %]
375 <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>
377 [% IF loo.tab == -1 %]
378 <em>[% loo.liblibrarian | html_entity %]</em>
380 [% loo.liblibrarian | html_entity %]
384 [% IF loo.tab == -1 %]
385 <em>subfield ignored</em>
387 Tab:[% loo.tab | html %],
388 [% IF ( loo.kohafield ) %] | Koha field: [% loo.kohafield | html %], [% END %]
389 [% IF ( loo.repeatable ) %]Repeatable, [% ELSE %]Not repeatable,[% END %]
390 [% IF ( loo.mandatory ) %]Mandatory, [% ELSE %]Not mandatory,[% END %]
391 [% IF ( loo.important ) %]Important, [% ELSE %]Not important,[% END %]
392 [% IF ( loo.seealso ) %] | See Also: [% loo.seealso | html %],[% END %]
393 [% IF ( loo.hidden ) %]hidden,[% END %]
394 [% IF ( loo.isurl ) %]is a URL,[% END %]
395 [% IF ( loo.authorised_value ) %] | Auth value:[% loo.authorised_value | html %],[% END %]
396 [% IF ( loo.authtypecode ) %] | Authority:[% loo.authtypecode | html %],[% END %]
397 [% IF ( loo.value_builder ) %] | Plugin:[% loo.value_builder | html %],[% END %]
398 [% IF ( loo.link ) %] | Link:[% loo.link | html %],[% END %]
402 <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>
403 <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>
408 </table> <!-- /#table_marcsubfieldstructure -->
410 <form action="[% script_name | html %]" method="get">
411 <fieldset class="action"><input type="hidden" name="op" value="add_form" />
412 <input type="hidden" name="tagfield" value="[% edit_tagfield | html %]" />
413 <input type="hidden" name="frameworkcode" value="[% edit_frameworkcode | html %]" />
414 <input type="submit" value="Edit subfields" />
415 <a class="cancel" href="marctagstructure.pl?searchfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | html %]">Cancel</a>
422 </div> <!-- /.col-sm-10.col-sm-push-2 -->
424 <div class="col-sm-2 col-sm-pull-10">
426 [% INCLUDE 'admin-menu.inc' %]
428 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
429 </div> <!-- /.row -->
431 [% MACRO jsinclude BLOCK %]
432 [% INCLUDE 'datatables.inc' %]
433 [% Asset.js("js/admin-menu.js") | $raw %]
434 [% Asset.js("js/marc_subfields_structure.js") | $raw %]
437 [% INCLUDE 'intranet-bottom.inc' %]