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