Bug 17012 - Remove more event attributes from administration templates
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / marctagstructure.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo;
3 [% IF ( add_form ) %]MARC frameworks &rsaquo; [% action %] [% searchfield %][% END %]
4 [% IF ( delete_confirm ) %]MARC frameworks &rsaquo; Confirm deletion of tag '[% searchfield %]'[% END %]
5 [% IF ( delete_confirmed ) %]MARC frameworks &rsaquo;  Data deleted[% END %]
6 [% IF ( else ) %]MARC frameworks[% END %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
9 [% INCLUDE 'datatables.inc' %]
10 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
11
12 <script type="text/javascript">
13 //<![CDATA[
14
15 $(document).ready(function() {
16     $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
17         "aoColumnDefs": [
18             { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
19         ],
20         "sPaginationType": "four_button"
21     }));
22     $("#select_display").on("change",function(){
23         var checked = $(this).prop("checked") ? 1: 0;
24         $.cookie('marctagstructure_selectdisplay', checked);
25         this.form.submit();
26     });
27 });
28
29 //]]>
30 </script>
31 </head>
32 <body id="admin_marctagstructure" class="admin">
33 [% INCLUDE 'header.inc' %]
34 [% INCLUDE 'cat-search.inc' %]
35
36 <div id="breadcrumbs">
37          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
38 &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
39 &rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
40 [% IF ( add_form ) %]
41 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
42 &rsaquo; [% action %] [% searchfield %]
43 [% ELSIF ( else ) %]
44 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
45 [% ELSIF ( delete_confirm ) %]
46 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
47 &rsaquo; Confirm deletion of tag '[% searchfield %]'
48 [% ELSIF ( delete_confirmed ) %]
49 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
50 &rsaquo; Data deleted
51 [% END %]
52 </div>
53
54 <div id="doc3" class="yui-t2">
55   <div id="bd">
56     <div id="yui-main">
57       <div class="yui-b">
58
59 [% IF ( else ) %]
60 <div id="toolbar" class="btn-toolbar">
61     <a class="btn btn-small" id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&amp;frameworkcode=[% frameworkcode %]"><i class="fa fa-plus"></i> New tag</a>
62 </div>[% END %]
63
64 <h1>MARC Framework for [% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]default MARC framework[% END %]</h1>
65
66 [% IF ( add_form ) %]
67
68     <form action="[% script_name %]" name="Aform" method="post" class="validated">
69         
70       <fieldset class="rows"><legend>[% IF ( use_heading_flags_p ) %][% IF ( heading_modify_tag_p ) %]Modify tag <input type="hidden" name="modif" value="1" />[% searchfield %][% END %][% IF ( heading_add_tag_p ) %]Add tag[% END %][% ELSE %][% action %][% END %]</legend>  <input type="hidden" name="op" value="add_validate" />
71         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
72
73         <ol>
74             <li>
75                 [% IF ( heading_modify_tag_p ) %]
76                     <input type="hidden" name="tagfield" value="[% searchfield %]" />
77                     <span class="label">Tag:</span>
78                     [% searchfield %]
79                 [% ELSE %]
80                     <label for="tagfield" class="required">Tag: </label>
81                     <input id="tagfield" type="text" name="tagfield" value="[% searchfield %]" maxlength="3" size="3" required="required" class="required" />
82                     <span class="required">Required</span>
83                 [% END %]
84             </li>
85     <li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
86     <li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
87     <li><label for="repeatable">Repeatable: </label>
88         [% IF ( repeatable ) %]
89             <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
90         [% ELSE %]
91             <input type="checkbox" name="repeatable" id="repeatable" value="1" />
92         [% END %]
93     </li>
94     <li><label for="mandatory">Mandatory: </label>
95         [% IF ( mandatory ) %]
96             <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
97         [% ELSE %]
98             <input type="checkbox" name="mandatory" id="mandatory" value="1" />
99         [% END %]
100     </li>
101     <li><label for="authorised_value">Authorized value: </label>
102         <select name="authorised_value" id="authorised_value" size="1">
103         [% FOREACH value IN authorised_value.values %]
104         [% IF ( value == authorised_value.default ) %]
105             <option value="[% value %]" selected="selected">[% value %]</option>
106         [% ELSE %]
107             <option value="[% value %]">[% value %]</option>
108         [% END %]
109         [% END %]
110         </select>
111         (if you select a value here, the indicators will be limited to the authorized value list)</li>
112 </ol></fieldset> 
113     <fieldset class="action">
114         <input type="submit" value="Save changes" />
115         <a class="cancel" href="[% script_name %]?frameworkcode=[% frameworkcode %]">Cancel</a>
116     </fieldset>
117     </form>
118 [% END %]
119
120
121 [% IF ( delete_confirm ) %]
122     <div class="dialog alert">
123         <h3>Confirm deletion of tag <span class="ex">'[% searchfield %]'</span>?</h3>
124         <p>Tag: [% searchfield %]</p>
125         <p>Description: [% liblibrarian %]</p>
126         <form action="[% script_name %]" method="post">
127             <input type="hidden" name="op" value="delete_confirmed" />
128             <input type="hidden" name="searchfield" value="[% searchfield %]" />
129             <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
130             <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this tag</button>
131         </form>
132         <form action="[% script_name %]" method="get"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
133             <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
134         </form>
135     </div>
136 [% END %]
137
138 [% IF ( delete_confirmed ) %]
139
140     <div class="dialog message"><h3>Tag deleted</h3>
141     <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
142         <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
143     </form></div>
144 [% END %]
145 [% IF ( framework_create ) %]
146
147     <form action="[% script_name %]" method="post">
148         <input type="hidden" name="op" value="framework_create_confirm" />
149         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
150         Create framework for [% frameworkcode %] ([% frameworktext %]) using
151         <select name="existingframeworkcode">
152             <option value="">Default</option>
153         [% FOREACH existingframeworkloo IN existingframeworkloop %]
154             <option value="[% existingframeworkloo.value %]">[% existingframeworkloo.frameworktext %]</option>
155         [% END %]
156         </select>
157         <input type="submit" value="OK" />
158     </form>
159 [% END %]
160
161
162 [% IF ( else ) %]
163 <form name="f" action="[% script_name %]" method="post">
164 <fieldset style="padding:.5em;">
165         <label for="searchfield"><strong>Search for tag:</strong> </label>
166         <input type="text" name="searchfield" id="searchfield" size="4" value="[% searchfield %]" />
167
168 <label for="frameworkcode"><strong>In framework:</strong> </label>
169         <select id="frameworkcode" name="frameworkcode">
170             <option value="">Default</option>
171             [% FOREACH frameworkloo IN frameworkloop %]
172             [% IF ( frameworkloo.selected ) %]
173                 <option value="[% frameworkloo.value %]" selected="selected">[% frameworkloo.frameworktext %]</option>
174                 [% ELSE %]
175                 <option value="[% frameworkloo.value %]">[% frameworkloo.frameworktext %]</option>
176                 [% END %]
177             [% END %]
178         </select>
179     <input type="submit" value="Search" />
180 <p>        <label for="select_display">Display only used tags/subfields</label>
181         [% IF ( select_display ) %]
182             <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked" />
183         [% ELSE %]
184             <input type="checkbox" name="select_display" id="select_display" value="True" />
185         [% END %]</p>
186 </fieldset>
187 </form>
188
189     <table id="table_marctagstructure">
190     <thead>
191         <tr>
192         <th>Tag</th>
193         <th>Lib</th>
194         <th>Repeatable</th>
195         <th>Mandatory</th>
196         <th>Auth value</th>
197         <th>Subfields</th>
198         <th>Edit</th>
199         <th>Delete</th>
200         </tr>
201     </thead>
202     <tbody>
203     [% IF ( select_display ) %]
204         [% FOREACH loo IN loop %]
205         <tr>
206             <td>[% loo.tagfield %]</td>
207             <td>
208                 [% loo.liblibrarian %]
209                 [% FOREACH subfield IN loo.subfields %]
210                     <p>
211                         Tab:[% subfield.tab %] | $[% subfield.tagsubfield %]
212                         [% subfield.liblibrarian %] [% IF ( subfield.kohafield ) %][% subfield.kohafield %][% END %][% IF ( subfield.repeatable ) %], repeatable[% END %][% IF ( subfield.mandatory ) %], Mandatory[% END %][% IF ( subfield.seealso ) %], See [% subfield.seealso %][% END %][% IF ( subfield.authorised_value ) %], [% subfield.authorised_value %][% END %][% IF ( subfield.authtypecode ) %], [% subfield.authtypecode %][% END %][% IF ( subfield.value_builder ) %], [% subfield.value_builder %][% END %]
213                     </p>
214                 [% END %]
215             </td>
216             <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
217             <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
218             <td>[% loo.authorised_value %]</td>
219             <td><a href="[% loo.subfield_link %]">subfields</a></td>
220             <td><a href="[% loo.edit %]">Edit</a></td>
221             <td><a href="[% loo.delete %]">Delete</a></td>
222         </tr>
223         [% END %]
224     [% ELSE %]
225     [% FOREACH loo IN loop %]
226     <tr>
227         <td>[% loo.tagfield %]</td>
228         <td>[% loo.liblibrarian %]</td>
229         <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
230         <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
231         <td>[% loo.authorised_value %]</td>
232         <td><a href="[% loo.subfield_link %]">Subfields</a></td>
233         <td><a href="[% loo.edit %]">Edit</a></td>
234         <td><a href="[% loo.delete %]">Delete</a></td>
235     </tr>
236     [% END %]
237     [% END %]
238     </tbody>
239     </table>
240
241
242
243 [% END %]
244
245
246     </div>
247   </div>
248 <div class="yui-b">
249 [% INCLUDE 'admin-menu.inc' %]
250 </div>
251 </div>
252 [% INCLUDE 'intranet-bottom.inc' %]