3 [% USE AuthorisedValues %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Administration ›
7 [% IF ( add_form ) %]MARC frameworks › [% action | html %] [% 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' %]
12 [% Asset.css("css/datatables.css") | $raw %]
15 <body id="admin_marctagstructure" class="admin">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'prefs-admin-search.inc' %]
19 <div id="breadcrumbs">
20 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
22 › <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
24 › <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | html %]">[% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]Default MARC framework[% END%]</a>
25 › [% action | html %] [% searchfield | html %]
27 › <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | html %]">[% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]Default MARC framework[% END %]</a>
28 [% ELSIF ( delete_confirm ) %]
29 › <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | html %]">[% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]Default MARC framework[% END %]</a>
30 › Confirm deletion of tag '[% searchfield | html %]'
31 [% ELSIF ( delete_confirmed ) %]
32 › <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | html %]">[% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]Default MARC framework[% END %]</a>
37 <div id="doc3" class="yui-t2">
43 <div id="toolbar" class="btn-toolbar">
44 <a class="btn btn-default btn-sm" id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&frameworkcode=[% framework.frameworkcode | html %]"><i class="fa fa-plus"></i> New tag</a>
47 <h1>MARC Framework for [% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]default MARC framework[% END %]</h1>
51 <form action="[% script_name | html %]" name="Aform" method="post" class="validated">
53 <fieldset class="rows"><legend>[% IF ( use_heading_flags_p ) %][% IF ( heading_modify_tag_p ) %]Modify tag <input type="hidden" name="modif" value="1" />[% searchfield | html %][% END %][% IF ( heading_add_tag_p ) %]Add tag[% END %][% ELSE %][% action | html %][% END %]</legend> <input type="hidden" name="op" value="add_validate" />
54 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
58 [% IF ( heading_modify_tag_p ) %]
59 <input type="hidden" name="tagfield" value="[% searchfield | html %]" />
60 <span class="label">Tag:</span>
61 [% searchfield | html %]
63 <label for="tagfield" class="required">Tag: </label>
64 <input id="tagfield" type="text" name="tagfield" value="[% searchfield | html %]" maxlength="3" size="3" required="required" class="required" />
65 <span class="required">Required</span>
68 <li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian | html %]" size="40" maxlength="100" /></li>
69 <li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac | html %]" size="40" maxlength="100" /></li>
70 <li><label for="repeatable">Repeatable: </label>
71 [% IF ( repeatable ) %]
72 <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
74 <input type="checkbox" name="repeatable" id="repeatable" value="1" />
77 <li><label for="mandatory">Mandatory: </label>
78 [% IF ( mandatory ) %]
79 <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
81 <input type="checkbox" name="mandatory" id="mandatory" value="1" />
84 <li><label for="ind1_defaultvalue">First indicator default value: </label>
85 <input id="ind1_defaultvalue" type="text" name="ind1_defaultvalue" value="[% ind1_defaultvalue | html %]" maxlength="1" size="1" />
87 <li><label for="ind2_defaultvalue">Second indicator default value: </label>
88 <input id="ind2_defaultvalue" type="text" name="ind2_defaultvalue" value="[% ind2_defaultvalue | html %]" maxlength="1" size="1" />
90 <li><label for="authorised_value">Authorized value: </label>
91 <select name="authorised_value" id="authorised_value" size="1">
92 <option value=""></option>
93 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => authorised_value ) %]
95 (if you select a value here, the indicators will be limited to the authorized value list)</li>
97 <fieldset class="action">
98 <input type="submit" value="Save changes" />
99 <a class="cancel" href="[% script_name | html %]?frameworkcode=[% framework.frameworkcode | html %]">Cancel</a>
105 [% IF ( delete_confirm ) %]
106 <div class="dialog alert">
107 <h3>Confirm deletion of tag <span class="ex">'[% searchfield | html %]'</span>?</h3>
108 <p>Tag: [% searchfield | html %]</p>
109 <p>Description: [% liblibrarian | html %]</p>
110 <form action="[% script_name | html %]" method="post">
111 <input type="hidden" name="op" value="delete_confirmed" />
112 <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
113 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
114 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this tag</button>
116 <form action="[% script_name | html %]" method="get"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
117 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
122 [% IF ( delete_confirmed ) %]
124 <div class="dialog message"><h3>Tag deleted</h3>
125 <form action="[% script_name | html %]" method="post"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
126 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
129 [% IF ( framework_create ) %]
131 <form action="[% script_name | html %]" method="post">
132 <input type="hidden" name="op" value="framework_create_confirm" />
133 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
134 Create framework for [% frameworkcode | html %] ([% framework.frameworktext | html %]) using
135 <select name="existingframeworkcode">
136 <option value="">Default</option>
137 [% FOREACH existingframeworkloo IN existingframeworkloop %]
138 <option value="[% existingframeworkloo.value | html %]">[% existingframeworkloo.frameworktext | html %]</option>
141 <input type="submit" value="OK" />
147 <form name="f" action="[% script_name | html %]" method="post">
148 <fieldset style="padding:.5em;">
149 <label for="searchfield"><strong>Search for tag:</strong> </label>
150 <input type="text" name="searchfield" id="searchfield" size="4" value="[% searchfield | html %]" />
152 <label for="frameworkcode"><strong>In framework:</strong> </label>
153 <select id="frameworkcode" name="frameworkcode">
154 <option value="">Default</option>
155 [% FOREACH f IN frameworks %]
156 [% IF f.frameworkcode == framework.frameworkcode %]
157 <option value="[% f.frameworkcode | html %]" selected="selected">[% f.frameworktext | html %]</option>
159 <option value="[% f.frameworkcode | html %]">[% f.frameworktext | html %]</option>
163 <input type="submit" value="Search" />
164 <p> <label for="select_display">Display only used tags/subfields</label>
165 [% IF ( select_display ) %]
166 <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked" />
168 <input type="checkbox" name="select_display" id="select_display" value="True" />
173 <table id="table_marctagstructure">
187 [% IF ( select_display ) %]
188 [% FOREACH loo IN loop %]
190 <td>[% loo.tagfield | html %]</td>
192 [% loo.liblibrarian | html %]
193 [% FOREACH subfield IN loo.subfields %]
195 Tab:[% subfield.tab | html %] | $[% subfield.tagsubfield | html %]
196 [% 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 %]
200 <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
201 <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
202 <td>[% loo.authorised_value | html %]</td>
203 <td>[% loo.ind1_defaultvalue | html %]</td>
204 <td>[% loo.ind2_defaultvalue | html %]</td>
206 <div class="dropdown">
207 <a class="btn btn-default btn-xs dropdown-toggle" id="marctagactions[% loo.tagfield | html %]" role="button" data-toggle="dropdown" href="#">
208 Actions <b class="caret"></b></a>
209 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="marctagactions[% loo.tagfield | html %]">
210 <li><a href="[% loo.subfield_link | html %]"><i class="fa fa-eye"></i> Subfields</a></li>
211 <li><a href="[% loo.edit | html %]"><i class="fa fa-pencil"></i> Edit</a></li>
212 <li><a href="[% loo.delete | html %]"><i class="fa fa-trash"></i> Delete</a></li>
219 [% FOREACH loo IN loop %]
221 <td>[% loo.tagfield | html %]</td>
222 <td>[% loo.liblibrarian | html %]</td>
223 <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
224 <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
225 <td>[% loo.authorised_value | html %]</td>
226 <td>[% loo.ind1_defaultvalue | html %]</td>
227 <td>[% loo.ind2_defaultvalue | html %]</td>
229 <div class="dropdown">
230 <a class="btn btn-default btn-xs dropdown-toggle" id="marctagactions[% loo.tagfield | html %]" role="button" data-toggle="dropdown" href="#">
231 Actions <b class="caret"></b></a>
232 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="marctagactions[% loo.tagfield | html %]">
233 <li><a href="[% loo.subfield_link | html %]"><i class="fa fa-eye"></i> Subfields</a></li>
234 <li><a href="[% loo.edit | html %]"><i class="fa fa-pencil"></i> Edit</a></li>
235 <li><a href="[% loo.delete | html %]"><i class="fa fa-trash"></i> Delete</a></li>
253 [% INCLUDE 'admin-menu.inc' %]
257 [% MACRO jsinclude BLOCK %]
258 [% INCLUDE 'datatables.inc' %]
259 [% Asset.js("js/admin-menu.js") | $raw %]
260 [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") | $raw %]
261 <script type="text/javascript">
262 $(document).ready(function() {
263 $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
265 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
267 "sPaginationType": "four_button"
269 $("#select_display").on("change",function(){
270 var checked = $(this).prop("checked") ? 1: 0;
271 $.cookie('marctagstructure_selectdisplay', checked);
277 [% INCLUDE 'intranet-bottom.inc' %]