Bug 32910: (follow-up) Replace v4 icon names with v6
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / auth_tag_structure.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE AuthorisedValues %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>
7     [% IF ( add_form ) %]
8         [% IF ( use_heading_flags_p ) %]
9             [% IF ( heading_modify_tag_p ) %]
10                 Modify tag &rsaquo; [% IF ( authtypecode ) %]
11                     [% authtypecode | html %] Framework
12                 [% ELSE %]
13                     Default framework
14                 [% END %] &rsaquo; [% END %]
15             [% IF ( heading_add_tag_p ) %]
16                 New tag &rsaquo; [% IF ( authtypecode ) %]
17                     [% authtypecode | html %] Framework
18                 [% ELSE %]
19                     Default framework
20                 [% END %] &rsaquo; [% END %]
21         [% ELSE %]
22            [% action | html %] &rsaquo; [% END %]
23     [% END %]
24     [% IF ( delete_confirm ) %]
25         Confirm deletion &rsaquo; [% IF ( authtypecode ) %]
26             [% authtypecode | html %] Framework
27         [% ELSE %]Default framework
28         [% END %] &rsaquo; [% END %]
29     [% IF ( delete_confirmed ) %]
30         Data deleted &rsaquo; [% IF ( authtypecode ) %]
31             [% authtypecode | html %] Framework
32         [% ELSE %]Default framework
33         [% END %] &rsaquo; [% END %]
34 Authority MARC framework &rsaquo; Administration &rsaquo; Koha
35 </title>
36 [% INCLUDE 'doc-head-close.inc' %]
37
38 </head>
39
40 <body id="admin_auth_tag_structure" class="admin">
41 [% WRAPPER 'header.inc' %]
42     [% INCLUDE 'prefs-admin-search.inc' %]
43 [% END %]
44
45 [% WRAPPER 'sub-header.inc' %]
46     [% WRAPPER breadcrumbs %]
47         [% WRAPPER breadcrumb_item %]
48             <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
49         [% END %]
50         [% WRAPPER breadcrumb_item %]
51             <a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a>
52         [% END %]
53
54         [% IF ( add_form || delete_confirm || delete_confirmed ) %]
55             [% IF ( authtypecode ) %]
56                 [% WRAPPER breadcrumb_item %]
57                     <a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] Framework</a>
58                 [% END %]
59             [% ELSE %]
60                 [% WRAPPER breadcrumb_item %]
61                     <a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
62                 [% END %]
63             [% END %]
64         [% END %]
65
66         [% IF ( add_form ) %]
67             [% IF ( use_heading_flags_p ) %]
68                 [% IF ( heading_modify_tag_p ) %]
69                     [% WRAPPER breadcrumb_item bc_active= 1 %]
70                         <span>Modify tag</span>
71                     [% END %]
72                 [% END %]
73
74                 [% IF ( heading_add_tag_p ) %]
75                     [% WRAPPER breadcrumb_item bc_active= 1 %]
76                         <span>New tag</span>
77                     [% END %]
78                 [% END %]
79
80             [% ELSE %]
81                 [% WRAPPER breadcrumb_item bc_active= 1 %]
82                     [% action | html %]
83                 [% END %]
84             [% END %]
85
86         [% ELSE %]
87             [% IF ( delete_confirm ) %]
88                 [% WRAPPER breadcrumb_item bc_active= 1 %]
89                     <span>Confirm deletion</span>
90                 [% END %]
91             [% ELSE %]
92                 [% IF ( delete_confirmed ) %]
93                     [% WRAPPER breadcrumb_item bc_active= 1 %]
94                         <span>Data deleted</span>
95                     [% END %]
96                 [% ELSE %]
97                     [% IF ( authtypecode ) %]
98                         [% WRAPPER breadcrumb_item bc_active= 1 %]
99                             [% authtypecode | html %] Framework
100                         [% END %]
101                     [% ELSE %]
102                         [% WRAPPER breadcrumb_item bc_active= 1 %]
103                             <span>Default framework</span>
104                         [% END %]
105                     [% END %]
106                 [% END %]
107
108             [% END %]
109         [% END %]
110     [% END #/ WRAPPER breadcrumbs %]
111 [% END #/ WRAPPER sub-header.inc %]
112
113 <div class="main container-fluid">
114     <div class="row">
115         <div class="col-sm-10 col-sm-push-2">
116             <main>
117
118 <h1>Authority MARC framework for [% IF ( authtypecode ) %][% authtypecode | html %][% ELSE %]default framework[% END %]</h1>
119
120
121 [% IF ( add_form ) %]
122
123     <h2>
124         [% IF ( heading_modify_tag_p ) %]
125             <span>Modify tag</span>
126         [% END %]
127         [% IF ( heading_add_tag_p ) %]
128             <span>New tag</span>
129         [% END %]
130     </h2>
131     <form action="[% script_name | html %]" name="Aform" method="post" class="validated">
132         <input type="hidden" name="op" value="add_validate" />
133         [% IF ( heading_modify_tag_p ) %]<input type="hidden" name="modif" value="1" />[% END %]
134         <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
135         <fieldset class="rows">
136             <ol>
137                 [% IF ( heading_modify_tag_p ) %]
138                     <li>
139                         <span class="label">Tag: </span>
140                         <input type="hidden" name="tagfield" value="[% searchfield | html %]" />
141                         [% searchfield | html %]
142                     </li>
143                 [% ELSE %]
144                     <li>
145                         <label for="tagfield" class="required">Tag: </label><input type="text" id="tagfield" name="tagfield" size="5" maxlength="3" required="required" class="required" />
146                         <span class="required">Required</span>
147                     </li>
148                 [% END %]
149
150         <li><label for="liblibrarian">Text for librarians: </label><input type="text" name="liblibrarian" id="liblibrarian" value="[% liblibrarian | html %]" size="40" maxlength="100" /></li>
151         <li><label for="libopac">Text for opac: </label><input type="text" name="libopac" id="libopac" value="[% libopac | html %]" size="40" maxlength="100" /></li>
152         <li><label for="repeatable">Repeatable: </label>
153             [% IF ( repeatable ) %]
154                 <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
155             [% ELSE %]
156                 <input type="checkbox" name="repeatable" id="repeatable" value="1" />
157             [% END %]
158         </li>
159         <li><label for="mandatory">Mandatory: </label>
160             [% IF ( mandatory ) %]
161                 <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
162             [% ELSE %]
163                 <input type="checkbox" name="mandatory" id="mandatory" value="1" />
164             [% END %]
165         </li>
166         <li><label for="authorised_value">Authorized value: </label>
167             <select name="authorised_value" id="authorised_value">
168                 <option value=""></option>
169                 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => authorised_value ) %]
170             </select>
171             <div class="hint">If you select a value here, the indicators will be limited to the authorized value list</div>
172         </li>
173         </ol>
174         </fieldset>
175         <fieldset class="action">
176             <input type="submit" class="btn btn-primary" value="Submit" />
177             <a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]" class="cancel">Cancel</a>
178         </fieldset>
179     </form>
180 [% END %]
181
182
183 [% IF ( delete_confirm ) %]
184     <div class="dialog alert">
185         <h3>Confirm deletion</h3>
186         <form action="[% script_name | html %]" method="post">
187             <table>
188                 <tr><th scope="row">Tag: </th><td>[% searchfield | html %] [% liblibrarian | html %]</td></tr>
189             </table>
190             <input type="hidden" name="op" value="delete_confirmed" />
191             <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
192             <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
193             <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
194         </form>
195         <form action="[% script_name | html %]" method="get">
196             <button type="submit" class="deny"><i class="fa fa-fw fa-times"></i> No, do not delete</button>
197         </form>
198     </div>
199 [% END %]
200
201 [% IF ( delete_confirmed ) %]
202
203   <div class="dialog message">  <h3>Data deleted</h3>
204     <form action="[% script_name | html %]" method="post">
205     <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
206     <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
207     <input type="submit" value="OK" class="btn btn-primary" />
208     </form></div>
209 [% END %]
210 [% IF ( authtype_create ) %]
211
212     <form action="[% script_name | html %]" method="post">
213         <input type="hidden" name="op" value="authtype_create_confirm" />
214         <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
215         Create authority framework for [% authtypecode | html %] using
216         <select name="existingauthtypecode">
217         [% FOREACH existingauthtypeloo IN existingauthtypeloop %]
218             [% IF existingauthtypeloo.value == "" %]
219               <option value="" selected="selected">[% existingauthtypeloo.authtypetext | html %]</option>
220             [% ELSE %]
221               <option value="[% existingauthtypeloo.value | html %]">[% existingauthtypeloo.authtypetext | html %]</option>
222             [% END %]
223         [% END %]
224         </select>
225         <input type="submit" value="OK" class="btn btn-primary" />
226     </form>
227 [% END %]
228
229
230 [% IF ( else ) %]
231
232 <div id="toolbar" class="btn-toolbar">
233     <div class="btn-group"><a class="btn btn-default" id="newtag" href="/cgi-bin/koha/admin/auth_tag_structure.pl?op=add_form&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-plus"></i> New tag</a></div>
234 </div>
235
236 <h2>Select an authority framework</h2>
237 <form action="[% script_name | html %]" method="post">
238     <select name="authtypecode">
239     [% FOREACH authority_type IN authority_types%]
240         [% IF authority_type.authtypecode == authtypecode%]
241         <option value="[% authority_type.authtypecode | html %]" selected="selected">[% authority_type.authtypetext | html %]</option>
242         [% ELSE %]
243         <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option>
244         [% END %]
245     [% END %]
246     </select>
247     <input type="text" name="searchfield" value="[% searchfield | html %]" />
248     <input type="submit" value="OK" class="btn btn-primary" />
249 </form><br />
250 <div id="pagertable_authtagstructure">
251 </div>
252
253 <div class="page-section">
254 <table id="table_authtagstructure">
255     <thead>
256         <tr>
257             <th>Tag</th>
258             <th>Lib</th>
259             <th>Repeatable</th>
260             <th>Mandatory</th>
261             <th>Authorized<br />value</th>
262             <th>&nbsp;</th>
263         </tr>
264     </thead>
265     <tbody>
266         [% FOREACH loo IN loop %]
267         <tr>
268             <td><strong>[% loo.tagfield | html %]</strong></td>
269             <td>[% loo.liblibrarian | html %]</td>
270             <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
271             <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
272             <td>[% loo.authorised_value | html %]</td>
273             <td>
274                 <div class="btn-group dropup">
275                     <a class="btn btn-default btn-xs dropdown-toggle" id="authtagactions[% loo.tagfield | html %]" role="button" data-toggle="dropdown" href="#">
276                         Actions <b class="caret"></b></a>
277                     <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authtagactions[% loo.tagfield | html %]">
278                         <li><a href="auth_subfields_structure.pl?tagfield=[% loo.tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]"><i class="fa-solid fa-eye"></i> Subfields</a></li>
279                         <li><a href="?op=add_form&amp;searchfield=[% loo.tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-pencil-alt"></i> Edit</a></li>
280                         <li><a href="?op=delete_confirm&amp;searchfield=[% loo.tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-trash-can"></i> Delete</a></li>
281                     </ul>
282                 </div>
283             </td>
284         </tr>
285         [% END %]
286     </tbody>
287     </table>
288 </div> <!-- /.page-section -->
289 [% END %]
290
291             </main>
292         </div> <!-- /.col-sm-10.col-sm-push-2 -->
293
294         <div class="col-sm-2 col-sm-pull-10">
295             <aside>
296                 [% INCLUDE 'admin-menu.inc' %]
297             </aside>
298         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
299      </div> <!-- /.row -->
300
301 [% MACRO jsinclude BLOCK %]
302     [% INCLUDE 'datatables.inc' %]
303     [% Asset.js("js/admin-menu.js") | $raw %]
304     <script>
305         $(document).ready(function() {
306             $("#table_authtagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
307                 "aoColumnDefs": [
308                     { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
309                 ],
310                 "sPaginationType": "full"
311             }));
312         });
313     </script>
314 [% END %]
315 [% INCLUDE 'intranet-bottom.inc' %]