3 [% USE AuthorisedValues %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Administration ›
7 [% IF ( add_form ) %]MARC frameworks › [% IF heading_add_tag_p %]Add tag[% ELSE %]Modify tag[% END %] [% searchfield | html %][% END %]
8 [% IF ( delete_confirm ) %]MARC frameworks › Confirm deletion of tag '[% searchfield | html %]'[% END %]
9 [% IF ( delete_confirmed ) %]MARC frameworks › Data deleted[% END %]
10 [% IF ( else ) %]MARC frameworks[% END %]</title>
11 [% INCLUDE 'doc-head-close.inc' %]
14 <body id="admin_marctagstructure" class="admin">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'prefs-admin-search.inc' %]
18 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
21 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
24 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
27 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
32 <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">
34 [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])
36 Default MARC framework
41 <a href="#" aria-current="page">
42 [% IF heading_add_tag_p %]
46 [% END %] [% searchfield | html %]
52 <a href="#" aria-current="page">
54 [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])
56 Default MARC framework
61 [% ELSIF ( delete_confirm ) %]
63 <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">
65 [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])
67 Default MARC framework
72 <a href="#" aria-current="page">
73 Confirm deletion of tag '[% searchfield | html %]'
77 [% ELSIF ( delete_confirmed ) %]
79 <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">
81 [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])
83 Default MARC framework
88 <a href="#" aria-current="page">
96 <div class="main container-fluid">
98 <div class="col-sm-10 col-sm-push-2">
102 <div id="toolbar" class="btn-toolbar">
103 <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>
106 <h1>MARC Framework for [% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]default MARC framework[% END %]</h1>
108 [% IF ( add_form ) %]
110 <form action="[% script_name | html %]" name="Aform" method="post" class="validated">
112 <fieldset class="rows">
114 [% IF heading_add_tag_p %]
117 Modify tag <input type="hidden" name="modif" value="1" />[% searchfield | html %]
120 <input type="hidden" name="op" value="add_validate" />
121 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
124 [% IF ( heading_modify_tag_p ) %]
125 <input type="hidden" name="tagfield" value="[% searchfield | html %]" />
126 <span class="label">Tag:</span>
127 [% searchfield | html %]
129 <label for="tagfield" class="required">Tag: </label>
130 <input id="tagfield" type="text" name="tagfield" value="[% searchfield | html %]" maxlength="3" size="3" required="required" class="required" />
131 <span class="required">Required</span>
134 <li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian | html %]" size="40" maxlength="100" /></li>
135 <li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac | html %]" size="40" maxlength="100" /></li>
136 <li><label for="repeatable">Repeatable: </label>
137 [% IF ( repeatable ) %]
138 <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
140 <input type="checkbox" name="repeatable" id="repeatable" value="1" />
143 <li><label for="mandatory">Mandatory: </label>
144 [% IF ( mandatory ) %]
145 <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
147 <input type="checkbox" name="mandatory" id="mandatory" value="1" />
150 <li><label for="important">Important: </label>
151 [% IF ( important ) %]
152 <input type="checkbox" name="important" id="important" value="1" checked="checked" />
154 <input type="checkbox" name="important" id="important" value="1" />
157 <li><label for="ind1_defaultvalue">First indicator default value: </label>
158 <input id="ind1_defaultvalue" type="text" name="ind1_defaultvalue" value="[% ind1_defaultvalue | html %]" maxlength="1" size="1" />
160 <li><label for="ind2_defaultvalue">Second indicator default value: </label>
161 <input id="ind2_defaultvalue" type="text" name="ind2_defaultvalue" value="[% ind2_defaultvalue | html %]" maxlength="1" size="1" />
163 <li><label for="authorised_value">Authorized value: </label>
164 <select name="authorised_value" id="authorised_value">
165 <option value=""></option>
166 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => authorised_value ) %]
168 (if you select a value here, the indicators will be limited to the authorized value list)</li>
170 <fieldset class="action">
171 <input type="submit" value="Save changes" />
172 <a class="cancel" href="[% script_name | url %]?frameworkcode=[% framework.frameworkcode | uri %]">Cancel</a>
178 [% IF ( delete_confirm ) %]
179 <div class="dialog alert">
180 <h3>Confirm deletion of tag <span class="ex">'[% searchfield | html %]'</span>?</h3>
181 <p>Tag: [% searchfield | html %]</p>
182 <p>Description: [% liblibrarian | html %]</p>
183 <form action="[% script_name | html %]" method="post">
184 <input type="hidden" name="op" value="delete_confirmed" />
185 <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
186 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
187 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this tag</button>
189 <form action="[% script_name | html %]" method="get"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
190 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
195 [% IF ( delete_confirmed ) %]
197 <div class="dialog message"><h3>Tag deleted</h3>
198 <form action="[% script_name | html %]" method="post"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
199 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
202 [% IF ( framework_create ) %]
204 <form action="[% script_name | html %]" method="post">
205 <input type="hidden" name="op" value="framework_create_confirm" />
206 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
207 Create framework for [% framework.frameworkcode | html %] ([% framework.frameworktext | html %]) using
208 <select name="existingframeworkcode">
209 <option value="">Default</option>
210 [% FOREACH existingframeworkloo IN existingframeworkloop %]
211 <option value="[% existingframeworkloo.value | html %]">[% existingframeworkloo.frameworktext | html %]</option>
214 <input type="submit" value="OK" />
220 <form name="f" action="[% script_name | html %]" method="post">
221 <fieldset style="padding:.5em;">
222 <label for="tag_search"><strong>Search for tag:</strong> </label>
223 <input type="text" name="searchfield" id="tag_search" size="4" value="[% searchfield | html %]" />
225 <label for="frameworkcode"><strong>In framework:</strong> </label>
226 <select id="frameworkcode" name="frameworkcode">
227 <option value="">Default</option>
228 [% FOREACH f IN frameworks %]
229 [% IF f.frameworkcode == framework.frameworkcode %]
230 <option value="[% f.frameworkcode | html %]" selected="selected">[% f.frameworktext | html %]</option>
232 <option value="[% f.frameworkcode | html %]">[% f.frameworktext | html %]</option>
236 <input type="submit" value="Search" />
237 <p> <label for="select_display">Display only used tags/subfields</label>
238 [% IF ( select_display ) %]
239 <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked" />
241 <input type="checkbox" name="select_display" id="select_display" value="True" />
246 <table id="table_marctagstructure">
261 [% FOREACH loo IN loop %]
263 <td>[% loo.tagfield | html %]</td>
265 [% loo.liblibrarian | html %]
266 [% IF ( select_display ) %]
267 [% FOREACH subfield IN loo.subfields %]
269 Tab:[% subfield.tab | html %] | $[% subfield.tagsubfield | html %]
270 [% subfield.liblibrarian | html %] [% IF ( subfield.kohafield ) %][% subfield.kohafield | html %][% END %][% IF ( subfield.repeatable ) %], repeatable[% END %][% IF ( subfield.mandatory ) %], Mandatory[% END %][% IF ( subfield.seealso ) %], See [% subfield.seealso | html %][% 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 %]
275 <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
276 <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
277 <td>[% IF ( loo.important ) %]Yes[% ELSE %]No[% END %]</td>
278 <td>[% loo.authorised_value | html %]</td>
279 <td>[% loo.ind1_defaultvalue | html %]</td>
280 <td>[% loo.ind2_defaultvalue | html %]</td>
282 <div class="btn-group dropup">
283 <a class="btn btn-default btn-xs dropdown-toggle" id="marctagactions[% loo.tagfield | html %]" role="button" data-toggle="dropdown" href="#">
284 Actions <b class="caret"></b></a>
285 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="marctagactions[% loo.tagfield | html %]">
286 <li><a href="?op=add_form&searchfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-pencil"></i> Edit tag</a></li>
287 <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>
288 <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>
289 <li><a href="?op=delete_confirm&searchfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-trash"></i> Delete</a></li>
300 </div> <!-- /.col-sm-10.col-sm-push-2 -->
302 <div class="col-sm-2 col-sm-pull-10">
304 [% INCLUDE 'admin-menu.inc' %]
306 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
307 </div> <!-- /.row -->
309 [% MACRO jsinclude BLOCK %]
310 [% INCLUDE 'datatables.inc' %]
311 [% Asset.js("js/admin-menu.js") | $raw %]
313 $(document).ready(function() {
314 $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
316 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
318 "sPaginationType": "full"
320 $("#select_display").on("change",function(){
321 var checked = $(this).prop("checked") ? 1: 0;
322 Cookies.set("marctagstructure_selectdisplay", checked);
328 [% INCLUDE 'intranet-bottom.inc' %]