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 <div id="breadcrumbs">
32 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
33 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
34 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a> ›
35 <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode | uri %]&searchfield=[% tagfield | uri %]">
36 [% IF ( frameworkcode ) %][% frameworkcode | html %][% ELSE %]Default[% END %] framework structure
39 [% IF ( use_heading_flags_p ) %]
40 [% IF ( heading_edit_subfields_p ) %]
41 <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
44 <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] Subfield structure</a> › [% action | html %]
47 [% IF ( delete_confirm ) %]
48 <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> › Confirm deletion of subfield [% mss.tagsubfield | html %]
51 Tag [% tagfield | html %] Subfield structure
53 </div> <!-- /#breadcrumbs -->
55 <div class="main container-fluid">
57 <div class="col-sm-10 col-sm-push-2">
62 [% IF ( use_heading_flags_p ) %]
63 [% IF ( heading_edit_subfields_p ) %]Tag [% tagfield | html %] Subfield constraints[% END %]
69 <form action="[% script_name | html %]" name="Aform" method="post">
70 <input type="hidden" name="op" value="add_validate" />
71 <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
72 <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
74 <div id="subfieldtabs" class="toptabs numbered">
76 [% FOREACH loo IN loop %]
77 <li id="tab_subfield_[% loo.urisubfieldcode | html %]">
78 [% IF ( loo.new_subfield ) %]
79 <a href="#sub[% loo.urisubfieldcode | uri %]field" title="[% loo.liblibrarian | html_entity %]">New</a>
81 <a href="#sub[% loo.urisubfieldcode | uri %]field" title="[% loo.liblibrarian | html_entity %]">
82 [% loo.subfieldcode | html %]
89 [% FOREACH loo IN loop %]
90 <div class="constraints" id="sub[% loo.urisubfieldcode | uri %]field">
91 <div id="basic[% loo.urisubfieldcode | html %]" class="contraints">
92 <fieldset class="rows">
93 <legend>Basic constraints</legend>
95 [% IF ( subfieldcode == 0 || subfieldcode ) %]
97 <span class="label">Subfield code:</span>
98 [% loo.subfieldcode | html %] <input type="hidden" name="tagsubfield" value="[% loo.subfieldcode | html %]" />
102 <label for="tagsubfield[% loo.row | html %]">Subfield code:</label>
103 <input type="text" id="tagsubfield[% loo.row | html %]" name="tagsubfield" value="[% loo.subfieldcode | html %]" />
107 <label for="liblibrarian[% loo.row | html %]">Text for librarian: </label>
108 <input id="liblibrarian[% loo.row | html %]" type="text" name="liblibrarian" value="[% loo.liblibrarian | html_entity %]" size="40" maxlength="80" />
111 <label for="libopac[% loo.row | html %]">Text for OPAC: </label>
112 <input type="text" id="libopac[% loo.row | html %]" name="libopac" value="[% loo.libopac | html_entity %]" size="40" maxlength="80" />
115 <label for="repeatable[% loo.row | html %]">Repeatable: </label>
116 [% IF loo.repeatable %]
117 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable[% loo.row | html %]" checked="checked" value="1" />
119 <input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable[% loo.row | html %]" value="1" />
123 <label for="mandatory[% loo.row | html %]">Mandatory: </label>
124 [% IF loo.mandatory %]
125 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory[% loo.row | html %]" checked="checked" value="1" />
127 <input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory[% loo.row | html %]" value="1" />
131 <label for="important[% loo.row | html %]">Important: </label>
132 [% IF loo.important %]
133 <input type="checkbox" id="important[% loo.row | html %]" name="important[% loo.row | html %]" checked="checked" value="1" />
135 <input type="checkbox" id="important[% loo.row | html %]" name="important[% loo.row | html %]" value="1" />
138 <li><label for="tab[% loo.row | html %]">Managed in tab: </label>
139 <select name="tab" tabindex="" size="1" id="tab[% loo.row | html %]">
140 [%- IF ( loo.tab == -1 ) -%]
141 <option value="-1" selected="selected">ignore</option>
143 <option value="-1">ignore</option>
145 [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -%]
146 [%- IF ( loo.tab == t ) -%]
147 <option value="[%- t | html -%]" selected="selected">[%- t | html -%]</option>
149 <option value="[%- t | html -%]">[%- t | html -%]</option>
152 [%- IF ( loo.tab == 10 ) -%]
153 <option value="10" selected="selected">items (10)</option>
155 <option value="10">items (10)</option>
158 <div class="hint">Ignore means that the subfield does not display in the record editor</div>
161 </fieldset> <!-- /.rows -->
162 </div> <!-- /#basic[% loo.urisubfieldcode | html %] -->
164 <div id="advanced[% loo.urisubfieldcode | html %]" class="contraints">
165 <fieldset class="rows">
166 <legend>Advanced constraints</legend>
169 <label for="defaultvalue[% loo.row | html %]">Default value:</label>
170 <input type="text" name="defaultvalue" id="defaultvalue[% loo.row | html %]" value="[% loo.defaultvalue | html %]" />
173 <label for="maxlength[% loo.row | html %]">Max length:</label>
174 <input type="text" id="maxlength[% loo.row | html %]" name="maxlength" value="[% loo.maxlength | html %]" size="4" />
177 [% IF loo.hidden_protected %]
178 <input type="hidden" id="hidden-[% loo.row | html %]" name="hidden" value="[% loo.hidden | html %]" data-koha-protected="1" />
180 <input type="hidden" id="hidden-[% loo.row | html %]" name="hidden" value="[% loo.hidden | html %]" />
182 <label for="hidden[% loo.row | html %]">Visibility: </label>
183 <input type="checkbox" id="hidden_opac_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_opac_[% loo.row | html %]"/>
184 <label for="hidden_opac_[% loo.row | html %]" style="float: none;">OPAC</label>
185 <input type="checkbox" id="hidden_intranet_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_intranet_[% loo.row | html %]"/>
186 <label for="hidden_intranet_[% loo.row | html %]" style="float: none;">Intranet</label>
187 <input type="checkbox" id="hidden_editor_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_editor_[% loo.row | html %]"/>
188 <label for="hidden_editor_[% loo.row | html %]" style="float: none;">Editor</label>
189 <input type="checkbox" id="hidden_collapsed_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_collapsed_[% loo.row | html %]"/>
190 <label for="hidden_collapsed_[% loo.row | html %]" style="float: none;">Collapsed</label>
191 <input type="checkbox" id="hidden_flagged_[% loo.row | html %]" name="flagged_[% loo.row | html %]"/>
192 <label for="hidden_flagged_[% loo.row | html %]" style="float: none;">Flagged</label>
195 <label for="isurl[% loo.row | html %]">Is a URL:</label>
197 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl[% loo.row | html %]" checked="checked" value="1" />
199 <input type="checkbox" id="isurl[% loo.row | html %]" name="isurl[% loo.row | html %]" value="1" />
201 <div class="hint">If checked, it means that the subfield is a URL and can be clicked</div>
204 <label for="link[% loo.row | html %]">Link:</label>
205 <input type="text" id="link[% loo.row | html %]" name="link" value="[% loo.link | html %]" size="10" maxlength="80" />
206 <div class="hint">An index name, e.g. title or Local-Number</div>
209 <label for="kohafield[% loo.row | html %]">Koha link:</label>
210 <!-- This select should be DISABLED; value is submitted by the following hidden input -->
211 <select name="kohafield" id="kohafield[% loo.row | html %]" size="1" disabled>
212 [% FOREACH value IN loo.kohafields %]
213 [% IF ( value == loo.kohafield ) %]
214 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
216 <option value="[% value | html %]">[% value | html %]</option>
220 <!-- Do NOT remove this next hidden input! We need it to save kohafield. -->
221 <input type="hidden" name="kohafield" value="[% loo.kohafield | html %]"/>
224 </fieldset> <!-- /.rows -->
225 </div> <!-- /#advanced[% loo.urisubfieldcode | html %] -->
227 <div id="oth[% loo.urisubfieldcode | html %]" class="constraints">
228 <fieldset class="rows">
229 <legend>Other options (choose one)</legend>
232 <label for="authorised_value[% loo.row | html %]">Authorized value:</label>
233 <select name="authorised_value" id="authorised_value[% loo.row | html %]" size="1">
234 <option value=""></option>
235 [% FOREACH value IN loo.authorised_values %]
236 [% IF ( value == loo.authorised_value ) %]
237 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
239 <option value="[% value | html %]">[% value | html %]</option>
245 <label for="authtypecode[% loo.row | html %]">Thesaurus:</label>
246 <select name="authtypecode" id="authtypecode[% loo.row | html %]" size="1">
247 [% FOREACH value IN loo.authtypes %]
248 [% IF ( value == loo.authtypecode ) %]
249 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
251 <option value="[% value | html %]">[% value | html %]</option>
257 <label for="value_builder[% loo.row | html %]">Plugin:</label>
258 <select name="value_builder" id="value_builder[% loo.row | html %]" size="1">
259 [% FOREACH value IN loo.value_builders %]
260 [% IF ( value == loo.value_builder ) %]
261 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
263 <option value="[% value | html %]">[% value | html %]</option>
269 </fieldset> <!-- /.rows -->
270 </div> <!-- /#oth[% loo.urisubfieldcode | html %] -->
271 </div><!-- /constraints -->
272 [% END # /FOREACH loo %]
273 </div><!-- /subfieldtabs -->
275 <fieldset class="action">
276 <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>
279 [% END # /IF ( add_form ) %]
281 [% IF ( delete_confirm ) %]
282 <div class="dialog alert">
283 <h3>Confirm deletion of subfield [% mss.tagsubfield | html %]?</h3>
284 <p>Subfield: [% mss.tagsubfield | html %]</p>
285 <p>Description: [% mss.liblibrarian | html_entity %]</p>
287 <form action="[% delete_link | html %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
288 <input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
289 <input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
290 <input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
291 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this subfield</button>
295 <form action="[% script_name | html %]" method="post">
296 <input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
297 <input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
298 <input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
299 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
301 </div> <!-- /.dialog.alert -->
302 [% END # /IF ( delete_confirm ) %]
305 <h1>MARC subfield structure admin for [% tagfield | html %] [% IF ( frameworkcode ) %](framework [% frameworkcode | html %])[% ELSE %](default framework)[% END %]</h1>
307 <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>
308 <p>The column 'Koha field' shows that the subfield is linked with a Koha field.</p>
310 <table id="table_marcsubfieldstructure">
316 <th class="NoSort noExport">Actions</th>
320 [% FOREACH loo IN loop %]
322 <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>
324 [% IF loo.tab == -1 %]
325 <em>[% loo.liblibrarian | html_entity %]</em>
327 [% loo.liblibrarian | html_entity %]
331 [% IF loo.tab == -1 %]
332 <em>subfield ignored</em>
334 Tab:[% loo.tab | html %],
335 [% IF ( loo.kohafield ) %] | Koha field: [% loo.kohafield | html %], [% END %]
336 [% IF ( loo.repeatable ) %]Repeatable, [% ELSE %]Not repeatable,[% END %]
337 [% IF ( loo.mandatory ) %]Mandatory, [% ELSE %]Not mandatory,[% END %]
338 [% IF ( loo.important ) %]Important, [% ELSE %]Not important,[% END %]
339 [% IF ( loo.seealso ) %] | See Also: [% loo.seealso | html %],[% END %]
340 [% IF ( loo.hidden ) %]hidden,[% END %]
341 [% IF ( loo.isurl ) %]is a URL,[% END %]
342 [% IF ( loo.authorised_value ) %] | Auth value:[% loo.authorised_value | html %],[% END %]
343 [% IF ( loo.authtypecode ) %] | Authority:[% loo.authtypecode | html %],[% END %]
344 [% IF ( loo.value_builder ) %] | Plugin:[% loo.value_builder | html %],[% END %]
345 [% IF ( loo.link ) %] | Link:[% loo.link | html %],[% END %]
349 <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>
350 <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>
355 </table> <!-- /#table_marcsubfieldstructure -->
357 <form action="[% script_name | html %]" method="get">
358 <fieldset class="action"><input type="hidden" name="op" value="add_form" />
359 <input type="hidden" name="tagfield" value="[% edit_tagfield | html %]" />
360 <input type="hidden" name="frameworkcode" value="[% edit_frameworkcode | html %]" />
361 <input type="submit" value="Edit subfields" />
362 <a class="cancel" href="marctagstructure.pl?searchfield=[% tagfield | uri %]&frameworkcode=[% frameworkcode | html %]">Cancel</a>
369 </div> <!-- /.col-sm-10.col-sm-push-2 -->
371 <div class="col-sm-2 col-sm-pull-10">
373 [% INCLUDE 'admin-menu.inc' %]
375 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
376 </div> <!-- /.row -->
378 [% MACRO jsinclude BLOCK %]
379 [% INCLUDE 'datatables.inc' %]
380 [% Asset.js("js/admin-menu.js") | $raw %]
381 [% Asset.js("js/marc_subfields_structure.js") | $raw %]
384 [% INCLUDE 'intranet-bottom.inc' %]