Bug 23271: Remove 'selecteds' from Branches
[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 [% INCLUDE 'header.inc' %]
42 [% INCLUDE 'prefs-admin-search.inc' %]
43
44 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
45     <ol>
46         <li>
47             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
48         </li>
49         <li>
50             <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
51         </li>
52         <li>
53             <a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a>
54         </li>
55
56         [% IF ( add_form ) %]
57             [% IF ( use_heading_flags_p ) %]
58
59                 [% IF ( heading_modify_tag_p ) %]
60                     [% IF ( authtypecode ) %]
61                         <li>
62                             <a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] Framework</a>
63                         </li>
64                     [% ELSE %]
65                         <li>
66                             <a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
67                         </li>
68                     [% END %]
69                     <li>
70                         <a href="#" aria-current="page">
71                             Modify tag
72                         </a>
73                     </li>
74                 [% END %]
75
76                 [% IF ( heading_add_tag_p ) %]
77                     [% IF ( authtypecode ) %]
78                         <li>
79                             <a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] framework</a>
80                         </li>
81                     [% ELSE %]
82                         <li>
83                             <a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
84                         </li>
85                     [% END %]
86                     <li>
87                         <a href="#" aria-current="page">
88                             New tag
89                         </a>
90                     </li>
91                 [% END %]
92
93             [% ELSE %]
94                 [% IF ( authtypecode ) %]
95                     <li>
96                         <a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] Framework</a>
97                     </li>
98                 [% ELSE %]
99                     <li>
100                         <a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
101                     </li>
102                 [% END %]
103                 <li>
104                     <a href="#" aria-current="page">
105                         [% action | html %]
106                     </a>
107                 </li>
108             [% END %]
109
110         [% ELSE %]
111             [% IF ( delete_confirm ) %]
112                 [% IF ( authtypecode ) %]
113                     <li>
114                         <a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] framework</a>
115                     </li>
116                 [% ELSE %]
117                     <li>
118                         <a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
119                     </li>
120                 [% END %]
121                 <li>
122                     <a href="#" aria-current="page">
123                         Confirm deletion
124                     </a>
125                 </li>
126             [% ELSE %]
127                 [% IF ( delete_confirmed ) %]
128                     [% IF ( authtypecode ) %]
129                         <li>
130                             <a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] framework</a>
131                         </li>
132                     [% ELSE %]
133                         <li>
134                             <a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
135                         </li>
136                     [% END %]
137                     <li>
138                         <a href="#" aria-current="page">
139                             Data deleted
140                         </a>
141                     </li>
142                 [% ELSE %]
143                     [% IF ( authtypecode ) %]
144                         <li>
145                             <a href="#" aria-current="page">
146                                 [% authtypecode | html %] Framework
147                             </a>
148                         </li>
149                     [% ELSE %]
150                         <li>
151                             <a href="#" aria-current="page">
152                                 Default framework
153                             </a>
154                         </li>
155                     [% END %]
156                 [% END %]
157
158             [% END %]
159         [% END %]
160     </ol>
161 </nav>
162
163 <div class="main container-fluid">
164     <div class="row">
165         <div class="col-sm-10 col-sm-push-2">
166             <main>
167
168 <h1>Authority MARC framework for [% IF ( authtypecode ) %][% authtypecode | html %][% ELSE %]default framework[% END %]</h1>
169
170
171 [% IF ( add_form ) %]
172
173     <h2>
174     [% IF ( heading_modify_tag_p ) %]Modify tag[% END %]
175     [% IF ( heading_add_tag_p ) %]New tag[% END %]
176     </h2>
177     <form action="[% script_name | html %]" name="Aform" method="post" class="validated">
178         <input type="hidden" name="op" value="add_validate" />
179         [% IF ( heading_modify_tag_p ) %]<input type="hidden" name="modif" value="1" />[% END %]
180         <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
181         <fieldset class="rows">
182             <ol>
183                 [% IF ( heading_modify_tag_p ) %]
184                     <li>
185                         <span class="label">Tag: </span>
186                         <input type="hidden" name="tagfield" value="[% searchfield | html %]" />
187                         [% searchfield | html %]
188                     </li>
189                 [% ELSE %]
190                     <li>
191                         <label for="tagfield" class="required">Tag: </label><input type="text" id="tagfield" name="tagfield" size="5" maxlength="3" required="required" class="required" />
192                         <span class="required">Required</span>
193                     </li>
194                 [% END %]
195
196         <li><label for="liblibrarian">Text for librarians: </label><input type="text" name="liblibrarian" id="liblibrarian" value="[% liblibrarian | html %]" size="40" maxlength="100" /></li>
197         <li><label for="libopac">Text for opac: </label><input type="text" name="libopac" id="libopac" value="[% libopac | html %]" size="40" maxlength="100" /></li>
198         <li><label for="repeatable">Repeatable: </label>
199             [% IF ( repeatable ) %]
200                 <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
201             [% ELSE %]
202                 <input type="checkbox" name="repeatable" id="repeatable" value="1" />
203             [% END %]
204         </li>
205         <li><label for="mandatory">Mandatory: </label>
206             [% IF ( mandatory ) %]
207                 <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
208             [% ELSE %]
209                 <input type="checkbox" name="mandatory" id="mandatory" value="1" />
210             [% END %]
211         </li>
212         <li><label for="authorised_value">Authorized value: </label>
213             <select name="authorised_value" id="authorised_value">
214                 <option value=""></option>
215                 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => authorised_value ) %]
216             </select>
217             (if you select a value here, the indicators will be limited to the authorized value list)
218         </li>
219         </ol>
220         </fieldset>
221         <fieldset class="action">
222             <input type="submit" value="Submit" />
223             <a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]" class="cancel">Cancel</a>
224         </fieldset>
225     </form>
226 [% END %]
227
228
229 [% IF ( delete_confirm ) %]
230     <div class="dialog alert">
231         <h3>Confirm deletion</h3>
232         <form action="[% script_name | html %]" method="post">
233             <table>
234                 <tr><th scope="row">Tag: </th><td>[% searchfield | html %] [% liblibrarian | html %]</td></tr>
235             </table>
236             <input type="hidden" name="op" value="delete_confirmed" />
237             <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
238             <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
239             <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
240         </form>
241         <form action="[% script_name | html %]" method="get">
242             <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
243         </form>
244     </div>
245 [% END %]
246
247 [% IF ( delete_confirmed ) %]
248
249   <div class="dialog message">  <h3>Data deleted</h3>
250     <form action="[% script_name | html %]" method="post">
251     <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
252     <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
253     <input type="submit" value="OK" class="submit" />
254     </form></div>
255 [% END %]
256 [% IF ( authtype_create ) %]
257
258     <form action="[% script_name | html %]" method="post">
259         <input type="hidden" name="op" value="authtype_create_confirm" />
260         <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
261         Create authority framework for [% authtypecode | html %] using
262         <select name="existingauthtypecode">
263         [% FOREACH existingauthtypeloo IN existingauthtypeloop %]
264             [% IF existingauthtypeloo.value == "" %]
265               <option value="" selected="selected">[% existingauthtypeloo.authtypetext | html %]</option>
266             [% ELSE %]
267               <option value="[% existingauthtypeloo.value | html %]">[% existingauthtypeloo.authtypetext | html %]</option>
268             [% END %]
269         [% END %]
270         </select>
271         <input type="submit" value="OK" class="submit" />
272     </form>
273 [% END %]
274
275
276 [% IF ( else ) %]
277
278 <div id="toolbar" class="btn-toolbar">
279     <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>
280 </div>
281
282 <h2>Select an authority framework</h2>
283 <form action="[% script_name | html %]" method="post">
284     <select name="authtypecode">
285     [% FOREACH authority_type IN authority_types%]
286         [% IF authority_type.authtypecode == authtypecode%]
287         <option value="[% authority_type.authtypecode | html %]" selected="selected">[% authority_type.authtypetext | html %]</option>
288         [% ELSE %]
289         <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option>
290         [% END %]
291     [% END %]
292     </select>
293     <input type="text" name="searchfield" value="[% searchfield | html %]" />
294     <input type="submit" value="OK" class="submit" />
295 </form><br />
296 <div id="pagertable_authtagstructure">
297 </div>
298 <table id="table_authtagstructure">
299     <thead>
300         <tr>
301             <th>Tag</th>
302             <th>Lib</th>
303             <th>Repeatable</th>
304             <th>Mandatory</th>
305             <th>Authorized<br />value</th>
306             <th>&nbsp;</th>
307         </tr>
308     </thead>
309     <tbody>
310         [% FOREACH loo IN loop %]
311         <tr>
312             <td><strong>[% loo.tagfield | html %]</strong></td>
313             <td>[% loo.liblibrarian | html %]</td>
314             <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
315             <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
316             <td>[% loo.authorised_value | html %]</td>
317             <td>
318                 <div class="btn-group dropup">
319                     <a class="btn btn-default btn-xs dropdown-toggle" id="authtagactions[% loo.tagfield | html %]" role="button" data-toggle="dropdown" href="#">
320                         Actions <b class="caret"></b></a>
321                     <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authtagactions[% loo.tagfield | html %]">
322                         <li><a href="auth_subfields_structure.pl?tagfield=[% loo.tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-eye"></i> Subfields</a></li>
323                         <li><a href="?op=add_form&amp;searchfield=[% loo.tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-pencil"></i> Edit</a></li>
324                         <li><a href="?op=delete_confirm&amp;searchfield=[% loo.tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-trash"></i> Delete</a></li>
325                     </ul>
326                 </div>
327             </td>
328         </tr>
329         [% END %]
330     </tbody>
331     </table>
332
333 [% END %]
334
335             </main>
336         </div> <!-- /.col-sm-10.col-sm-push-2 -->
337
338         <div class="col-sm-2 col-sm-pull-10">
339             <aside>
340                 [% INCLUDE 'admin-menu.inc' %]
341             </aside>
342         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
343      </div> <!-- /.row -->
344
345 [% MACRO jsinclude BLOCK %]
346     [% INCLUDE 'datatables.inc' %]
347     [% Asset.js("js/admin-menu.js") | $raw %]
348     <script>
349         $(document).ready(function() {
350             $("#table_authtagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
351                 "aoColumnDefs": [
352                     { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
353                 ],
354                 "sPaginationType": "full"
355             }));
356         });
357     </script>
358 [% END %]
359 [% INCLUDE 'intranet-bottom.inc' %]