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 [%- mss.tagsubfield | html -%]
20 MARC subfield structure
23 [% INCLUDE 'doc-head-close.inc' %]
24 <style>.constraints::after { content: " "; clear: both; display:block; }</style>
27 <body id="admin_marc_subfields_structure" class="admin">
28 [% INCLUDE 'header.inc' %]
29 [% INCLUDE 'prefs-admin-search.inc' %]
31 <nav aria-label="Breadcrumb" class="breadcrumb">
34 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
37 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
40 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
43 <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode | uri %]&searchfield=[% tagfield | uri %]">
44 [% IF ( frameworkcode ) %]
45 [% frameworkcode | html %]
48 [% END %] framework structure
53 [% IF ( use_heading_flags_p ) %]
54 [% IF ( heading_edit_subfields_p ) %]
56 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] subfield structure</a>
59 <a href="#" aria-current="page">
60 Edit subfields constraints
66 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] Subfield structure</a>
69 <a href="#" aria-current="page">
76 [% IF ( delete_confirm ) %]
78 <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>
81 <a href="#" aria-current="page">
82 Confirm deletion of subfield [% mss.tagsubfield | html %]i
89 <a href="#" aria-current="page">
90 Tag [% tagfield | html %] Subfield structure
95 </nav> <!-- /#breadcrumbs -->
97 <div class="main container-fluid">
99 <div class="col-sm-10 col-sm-push-2">
102 [% IF ( add_form ) %]
104 [% IF ( use_heading_flags_p ) %]
105 [% IF ( heading_edit_subfields_p ) %]Tag [% tagfield | html %] Subfield constraints[% END %]
111 <form action="[% script_name | html %]" name="Aform" method="post">
112 <input type="hidden" name="op" value="add_validate" />
113 <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
114 <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
116 <div id="subfieldtabs" class="toptabs numbered">
118 [% FOREACH loo IN loop %]
119 <li id="tab_subfield_[% loo.urisubfieldcode | html %]">
120 [% IF ( loo.new_subfield ) %]
121 <a href="#sub[% loo.urisubfieldcode | uri %]field" title="[% loo.liblibrarian | html_entity %]">New</a>
123 <a href="#sub[% loo.urisubfieldcode | uri %]field" title="[% loo.liblibrarian | html_entity %]">
124 [% loo.subfieldcode | html %]
131 [% FOREACH loo IN loop %]
132 <div class="constraints" id="sub[% loo.urisubfieldcode | uri %]field">
133 <div id="basic[% loo.urisubfieldcode | html %]" class="contraints">
134 <fieldset class="rows">
135 <legend>Basic constraints</legend>
137 [% IF ( subfieldcode == 0 || subfieldcode ) %]
139 <span class="label">Subfield code:</span>
140 [% loo.subfieldcode | html %] <input type="hidden" name="tagsubfield" value="[% loo.subfieldcode | html %]" />
144 <label for="tagsubfield[% loo.row | html %]">Subfield code:</label>
145 <input type="text" id="tagsubfield[% loo.row | html %]" name="tagsubfield" value="[% loo.subfieldcode | html %]" />
149 <label for="liblibrarian[% loo.row | html %]">Text for librarian: </label>
150 <input id="liblibrarian[% loo.row | html %]" type="text" name="liblibrarian" value="[% loo.liblibrarian | html_entity %]" size="40" maxlength="80" />
153 <label for="libopac[% loo.row | html %]">Text for OPAC: </label>
154 <input type="text" id="libopac[% loo.row | html %]" name="libopac" value="[% loo.libopac | html_entity %]" size="40" maxlength="80" />
157 <label for="repeatable[% loo.row | html %]">Repeatable: </label>
158 [% IF loo.repeatable %]
159 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable[% loo.row | html %]" checked="checked" value="1" />
161 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable[% loo.row | html %]" value="1" />
165 <label for="mandatory[% loo.row | html %]">Mandatory: </label>
166 [% IF loo.mandatory %]
167 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory[% loo.row | html %]" checked="checked" value="1" />
169 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory[% loo.row | html %]" value="1" />
173 <label for="important[% loo.row | html %]">Important: </label>
174 [% IF loo.important %]
175 <input type="checkbox" id="important[% loo.row | html %]" name="important[% loo.row | html %]" checked="checked" value="1" />
177 <input type="checkbox" id="important[% loo.row | html %]" name="important[% loo.row | html %]" value="1" />
180 <li><label for="tab[% loo.row | html %]">Managed in tab: </label>
181 <select name="tab" tabindex="" size="1" id="tab[% loo.row | html %]">
182 [%- IF ( loo.tab == -1 ) -%]
183 <option value="-1" selected="selected">ignore</option>
185 <option value="-1">ignore</option>
187 [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -%]
188 [%- IF ( loo.tab == t ) -%]
189 <option value="[%- t | html -%]" selected="selected">[%- t | html -%]</option>
191 <option value="[%- t | html -%]">[%- t | html -%]</option>
194 [%- IF ( loo.tab == 10 ) -%]
195 <option value="10" selected="selected">items (10)</option>
197 <option value="10">items (10)</option>
200 <div class="hint">Ignore means that the subfield does not display in the record editor</div>
203 </fieldset> <!-- /.rows -->
204 </div> <!-- /#basic[% loo.urisubfieldcode | html %] -->
206 <div id="advanced[% loo.urisubfieldcode | html %]" class="contraints">
207 <fieldset class="rows">
208 <legend>Advanced constraints</legend>
211 <label for="defaultvalue[% loo.row | html %]">Default value:</label>
212 <input type="text" name="defaultvalue" id="defaultvalue[% loo.row | html %]" value="[% loo.defaultvalue | html %]" />
215 <label for="maxlength[% loo.row | html %]">Max length:</label>
216 <input type="text" id="maxlength[% loo.row | html %]" name="maxlength" value="[% loo.maxlength | html %]" size="4" />
219 [% IF loo.hidden_protected %]
220 <input type="hidden" id="hidden-[% loo.row | html %]" name="hidden" value="[% loo.hidden | html %]" data-koha-protected="1" />
222 <input type="hidden" id="hidden-[% loo.row | html %]" name="hidden" value="[% loo.hidden | html %]" />
224 <label for="hidden[% loo.row | html %]">Visibility: </label>
225 <input type="checkbox" id="hidden_opac_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_opac_[% loo.row | html %]"/>
226 <label for="hidden_opac_[% loo.row | html %]" style="float: none;">OPAC</label>
227 <input type="checkbox" id="hidden_intranet_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_intranet_[% loo.row | html %]"/>
228 <label for="hidden_intranet_[% loo.row | html %]" style="float: none;">Intranet</label>
229 <input type="checkbox" id="hidden_editor_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_editor_[% loo.row | html %]"/>
230 <label for="hidden_editor_[% loo.row | html %]" style="float: none;">Editor</label>
231 <input type="checkbox" id="hidden_collapsed_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_collapsed_[% loo.row | html %]"/>
232 <label for="hidden_collapsed_[% loo.row | html %]" style="float: none;">Collapsed</label>
233 <input type="checkbox" id="hidden_flagged_[% loo.row | html %]" name="flagged_[% loo.row | html %]"/>
234 <label for="hidden_flagged_[% loo.row | html %]" style="float: none;">Flagged</label>
237 <label for="isurl[% loo.row | html %]">Is a URL:</label>
239 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl[% loo.row | html %]" checked="checked" value="1" />
241 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl[% loo.row | html %]" value="1" />
243 <div class="hint">If checked, it means that the subfield is a URL and can be clicked</div>
246 <label for="link[% loo.row | html %]">Link:</label>
247 <input type="text" id="link[% loo.row | html %]" name="link" value="[% loo.link | html %]" size="10" maxlength="80" />
248 <div class="hint">An index name, e.g. title or Local-Number</div>
251 <label for="kohafield[% loo.row | html %]">Koha link:</label>
252 <!-- This select should be DISABLED; value is submitted by the following hidden input -->
253 <select name="kohafield" id="kohafield[% loo.row | html %]" size="1" disabled>
254 [% FOREACH value IN loo.kohafields %]
255 [% IF ( value == loo.kohafield ) %]
256 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
258 <option value="[% value | html %]">[% value | html %]</option>
262 <!-- Do NOT remove this next hidden input! We need it to save kohafield. -->
263 <input type="hidden" name="kohafield" value="[% loo.kohafield | html %]"/>
266 </fieldset> <!-- /.rows -->
267 </div> <!-- /#advanced[% loo.urisubfieldcode | html %] -->
269 <div id="oth[% loo.urisubfieldcode | html %]" class="constraints">
270 <fieldset class="rows">
271 <legend>Other options (choose one)</legend>
274 <label for="authorised_value[% loo.row | html %]">Authorized value:</label>
275 <select name="authorised_value" id="authorised_value[% loo.row | html %]" size="1">
276 <option value=""></option>
277 [% FOREACH value IN loo.authorised_values %]
278 [% IF ( value == loo.authorised_value ) %]
279 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
281 <option value="[% value | html %]">[% value | html %]</option>
287 <label for="authtypecode[% loo.row | html %]">Thesaurus:</label>
288 <select name="authtypecode" id="authtypecode[% loo.row | html %]" size="1">
289 [% FOREACH value IN loo.authtypes %]
290 [% IF ( value == loo.authtypecode ) %]
291 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
293 <option value="[% value | html %]">[% value | html %]</option>
299 <label for="value_builder[% loo.row | html %]">Plugin:</label>
300 <select name="value_builder" id="value_builder[% loo.row | html %]" size="1">
301 [% FOREACH value IN loo.value_builders %]
302 [% IF ( value == loo.value_builder ) %]
303 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
305 <option value="[% value | html %]">[% value | html %]</option>
311 </fieldset> <!-- /.rows -->
312 </div> <!-- /#oth[% loo.urisubfieldcode | html %] -->
313 </div><!-- /constraints -->
314 [% END # /FOREACH loo %]
315 </div><!-- /subfieldtabs -->
317 <fieldset class="action">
318 <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>
321 [% END # /IF ( add_form ) %]
323 [% IF ( delete_confirm ) %]
324 <div class="dialog alert">
325 <h3>Confirm deletion of subfield [% mss.tagsubfield | html %]?</h3>
326 <p>Subfield: [% mss.tagsubfield | html %]</p>
327 <p>Description: [% mss.liblibrarian | html_entity %]</p>
329 <form action="[% delete_link | html %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
330 <input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
331 <input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
332 <input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
333 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this subfield</button>
337 <form action="[% script_name | html %]" method="post">
338 <input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
339 <input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
340 <input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
341 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
343 </div> <!-- /.dialog.alert -->
344 [% END # /IF ( delete_confirm ) %]
347 <h1>MARC subfield structure admin for [% tagfield | html %] [% IF ( frameworkcode ) %](framework [% frameworkcode | html %])[% ELSE %](default framework)[% END %]</h1>
349 <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>
350 <p>The column 'Koha field' shows that the subfield is linked with a Koha field.</p>
352 <table id="table_marcsubfieldstructure">
358 <th class="NoSort noExport">Actions</th>
362 [% FOREACH loo IN loop %]
364 <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>
366 [% IF loo.tab == -1 %]
367 <em>[% loo.liblibrarian | html_entity %]</em>
369 [% loo.liblibrarian | html_entity %]
373 [% IF loo.tab == -1 %]
374 <em>subfield ignored</em>
376 Tab:[% loo.tab | html %],
377 [% IF ( loo.kohafield ) %] | Koha field: [% loo.kohafield | html %], [% END %]
378 [% IF ( loo.repeatable ) %]Repeatable, [% ELSE %]Not repeatable,[% END %]
379 [% IF ( loo.mandatory ) %]Mandatory, [% ELSE %]Not mandatory,[% END %]
380 [% IF ( loo.important ) %]Important, [% ELSE %]Not important,[% END %]
381 [% IF ( loo.seealso ) %] | See Also: [% loo.seealso | html %],[% END %]
382 [% IF ( loo.hidden ) %]hidden,[% END %]
383 [% IF ( loo.isurl ) %]is a URL,[% END %]
384 [% IF ( loo.authorised_value ) %] | Auth value:[% loo.authorised_value | html %],[% END %]
385 [% IF ( loo.authtypecode ) %] | Authority:[% loo.authtypecode | html %],[% END %]
386 [% IF ( loo.value_builder ) %] | Plugin:[% loo.value_builder | html %],[% END %]
387 [% IF ( loo.link ) %] | Link:[% loo.link | html %],[% END %]
391 <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>
392 <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>
397 </table> <!-- /#table_marcsubfieldstructure -->
399 <form action="[% script_name | html %]" method="get">
400 <fieldset class="action"><input type="hidden" name="op" value="add_form" />
401 <input type="hidden" name="tagfield" value="[% edit_tagfield | html %]" />
402 <input type="hidden" name="frameworkcode" value="[% edit_frameworkcode | html %]" />
403 <input type="submit" value="Edit subfields" />
404 <a class="cancel" href="marctagstructure.pl?searchfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | html %]">Cancel</a>
411 </div> <!-- /.col-sm-10.col-sm-push-2 -->
413 <div class="col-sm-2 col-sm-pull-10">
415 [% INCLUDE 'admin-menu.inc' %]
417 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
418 </div> <!-- /.row -->
420 [% MACRO jsinclude BLOCK %]
421 [% INCLUDE 'datatables.inc' %]
422 [% Asset.js("js/admin-menu.js") | $raw %]
423 [% Asset.js("js/marc_subfields_structure.js") | $raw %]
426 [% INCLUDE 'intranet-bottom.inc' %]