3 [% USE AuthorisedValues %]
5 [% INCLUDE 'doc-head-open.inc' %]
8 [% IF heading_add_tag_p %]
9 Add tag [% searchfield | html %]
11 Modify tag [% searchfield | html %]
12 [% END %] › [% END %]
14 [% IF ( delete_confirm ) %]
15 Confirm deletion of tag '[% searchfield | html %]' › [% END %]
17 [% IF ( delete_confirmed ) %]
18 Data deleted › [% END %]
19 MARC frameworks › Administration › Koha
21 [% INCLUDE 'doc-head-close.inc' %]
24 <body id="admin_marctagstructure" class="admin">
25 [% WRAPPER 'header.inc' %]
26 [% INCLUDE 'prefs-admin-search.inc' %]
29 [% WRAPPER 'sub-header.inc' %]
30 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
33 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
36 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
39 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
44 <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">
46 <span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span>
48 <span>Default MARC framework</span>
53 <a href="#" aria-current="page">
54 [% IF heading_add_tag_p %]
55 <span>Add tag [% searchfield | html %]</span>
57 <span>Modify tag [% searchfield | html %]</span>
64 <a href="#" aria-current="page">
66 <span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span>
68 <span>Default MARC framework</span>
73 [% ELSIF ( delete_confirm ) %]
75 <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">
77 <span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span>
79 <span>Default MARC framework</span>
84 <a href="#" aria-current="page">
85 Confirm deletion of tag [% searchfield | html %]
89 [% ELSIF ( delete_confirmed ) %]
91 <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">
93 <span>[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span>
95 <span>Default MARC framework</span>
100 <a href="#" aria-current="page">
109 <div class="main container-fluid">
111 <div class="col-sm-10 col-sm-push-2">
115 <div id="toolbar" class="btn-toolbar">
116 <a class="btn btn-default" id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-plus"></i> New tag</a>
120 <h1>MARC Framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</h1>
122 <h1>MARC Framework for default MARC framework</h1>
125 [% IF ( add_form ) %]
127 <form action="[% script_name | html %]" name="Aform" method="post" class="validated">
129 <fieldset class="rows">
131 [% IF heading_add_tag_p %]
134 <span>Modify tag</span> <input type="hidden" name="modif" value="1" />[% searchfield | html %]
137 <input type="hidden" name="op" value="add_validate" />
138 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
141 [% IF ( heading_modify_tag_p ) %]
142 <input type="hidden" name="tagfield" value="[% searchfield | html %]" />
143 <span class="label">Tag:</span>
144 [% searchfield | html %]
146 <label for="tagfield" class="required">Tag: </label>
147 <input id="tagfield" type="text" name="tagfield" value="[% searchfield | html %]" maxlength="3" size="3" required="required" class="required" />
148 <span class="required">Required</span>
151 <li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian | html %]" size="40" maxlength="100" /></li>
152 <li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac | html %]" size="40" maxlength="100" /></li>
153 <li><label for="repeatable">Repeatable: </label>
154 [% IF ( repeatable ) %]
155 <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
157 <input type="checkbox" name="repeatable" id="repeatable" value="1" />
160 <li><label for="mandatory">Mandatory: </label>
161 [% IF ( mandatory ) %]
162 <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
164 <input type="checkbox" name="mandatory" id="mandatory" value="1" />
167 <li><label for="important">Important: </label>
168 [% IF ( important ) %]
169 <input type="checkbox" name="important" id="important" value="1" checked="checked" />
171 <input type="checkbox" name="important" id="important" value="1" />
174 <li><label for="ind1_defaultvalue">First indicator default value: </label>
175 <input id="ind1_defaultvalue" type="text" name="ind1_defaultvalue" value="[% ind1_defaultvalue | html %]" maxlength="1" size="1" />
177 <li><label for="ind2_defaultvalue">Second indicator default value: </label>
178 <input id="ind2_defaultvalue" type="text" name="ind2_defaultvalue" value="[% ind2_defaultvalue | html %]" maxlength="1" size="1" />
180 <li><label for="authorised_value">Authorized value: </label>
181 <select name="authorised_value" id="authorised_value">
182 <option value=""></option>
183 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => authorised_value ) %]
185 (if you select a value here, the indicators will be limited to the authorized value list)</li>
187 <fieldset class="action">
188 <input type="submit" class="btn btn-primary" value="Save changes" />
189 <a class="cancel" href="[% script_name | url %]?frameworkcode=[% framework.frameworkcode | uri %]">Cancel</a>
195 [% IF ( delete_confirm ) %]
196 <div class="dialog alert">
197 <h3>Confirm deletion of tag <span class="ex">'[% searchfield | html %]'</span>?</h3>
198 <p>Tag: [% searchfield | html %]</p>
199 <p>Description: [% liblibrarian | html %]</p>
200 <form action="[% script_name | html %]" method="post">
201 <input type="hidden" name="op" value="delete_confirmed" />
202 <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
203 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
204 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this tag</button>
206 <form action="[% script_name | html %]" method="get"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
207 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
212 [% IF ( delete_confirmed ) %]
214 <div class="dialog message"><h3>Tag deleted</h3>
215 <form action="[% script_name | html %]" method="post"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
216 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
219 [% IF ( framework_create ) %]
221 <form action="[% script_name | html %]" method="post">
222 <input type="hidden" name="op" value="framework_create_confirm" />
223 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
224 Create framework for [% framework.frameworkcode | html %] ([% framework.frameworktext | html %]) using
225 <select name="existingframeworkcode">
226 <option value="">Default</option>
227 [% FOREACH fw IN existing_frameworks%]
228 <option value="[% fw.frameworkcode | html %]">[% fw.frameworktext | html %]</option>
231 <input type="submit" class="btn btn-primary" value="OK" />
237 <form name="f" action="[% script_name | html %]" method="post">
238 <fieldset style="padding:.5em;">
239 <label for="tag_search"><strong>Search for tag:</strong> </label>
240 <input type="text" name="searchfield" id="tag_search" size="4" value="[% searchfield | html %]" />
242 <label for="frameworkcode"><strong>In framework:</strong> </label>
243 <select id="frameworkcode" name="frameworkcode">
244 <option value="">Default</option>
245 [% FOREACH f IN frameworks %]
246 [% IF f.frameworkcode == framework.frameworkcode %]
247 <option value="[% f.frameworkcode | html %]" selected="selected">[% f.frameworktext | html %]</option>
249 <option value="[% f.frameworkcode | html %]">[% f.frameworktext | html %]</option>
253 <input type="submit" class="btn btn-primary" value="Search" />
254 <p> <label for="select_display">Display only used tags/subfields</label>
255 [% IF ( select_display ) %]
256 <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked" />
258 <input type="checkbox" name="select_display" id="select_display" value="True" />
263 <div class="page-section">
264 <table id="table_marctagstructure">
279 [% FOREACH loo IN loop %]
281 <td>[% loo.tagfield | html %]</td>
283 [% loo.liblibrarian | html %]
284 [% IF ( select_display ) %]
285 [% FOREACH subfield IN loo.subfields %]
287 <span>Tab:[% subfield.tab | html %]</span> | $[% subfield.tagsubfield | html %]
288 [% subfield.liblibrarian | html %] [% IF ( subfield.kohafield ) %][% subfield.kohafield | html %][% END %][% IF ( subfield.repeatable ) %], <span>repeatable</span>[% END %][% IF ( subfield.mandatory ) %], <span>Mandatory</span>[% END %][% IF ( subfield.seealso ) %], <span>See [% subfield.seealso | html %]</span>[% END %][% IF ( subfield.authorised_value ) %], [% subfield.authorised_value | html %][% END %][% IF ( subfield.authtypecode ) %], [% subfield.authtypecode | html %][% END %][% IF ( subfield.value_builder ) %], [% subfield.value_builder | html %][% END %]
293 <td>[% IF ( loo.repeatable ) %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]</td>
294 <td>[% IF ( loo.mandatory ) %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]</td>
295 <td>[% IF ( loo.important ) %]<span>Yes</span>[% ELSE %]<span>No</span>[% END %]</td>
296 <td>[% loo.authorised_value | html %]</td>
297 <td>[% loo.ind1_defaultvalue | html %]</td>
298 <td>[% loo.ind2_defaultvalue | html %]</td>
300 <div class="btn-group dropup">
301 <a class="btn btn-default btn-xs dropdown-toggle" id="marctagactions[% loo.tagfield | html %]" role="button" data-toggle="dropdown" href="#">
302 Actions <b class="caret"></b></a>
303 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="marctagactions[% loo.tagfield | html %]">
304 <li><a href="?op=add_form&searchfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-pencil"></i> Edit tag</a></li>
305 <li><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-eye"></i> View subfields</a></li>
306 <li><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-pencil"></i> Edit subfields</a></li>
307 <li><a href="?op=delete_confirm&searchfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-trash"></i> Delete</a></li>
315 </div> <!-- /.page-section -->
319 </div> <!-- /.col-sm-10.col-sm-push-2 -->
321 <div class="col-sm-2 col-sm-pull-10">
323 [% INCLUDE 'admin-menu.inc' %]
325 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
326 </div> <!-- /.row -->
328 [% MACRO jsinclude BLOCK %]
329 [% INCLUDE 'datatables.inc' %]
330 [% Asset.js("js/admin-menu.js") | $raw %]
332 $(document).ready(function() {
333 $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
335 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
337 "sPaginationType": "full"
339 $("#select_display").on("change",function(){
340 var checked = $(this).prop("checked") ? 1: 0;
341 Cookies.set("marctagstructure_selectdisplay", checked, { sameSite: 'Lax' });
347 [% INCLUDE 'intranet-bottom.inc' %]