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