Bug 11616: remove jQuery tablesorter plugin
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / authorised_values.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo; Authorized values [% IF ( add_form ) %] &rsaquo; [% IF ( action_modify ) %]Modify authorized value[% END %]
3            [% IF ( action_add_value ) %] &rsaquo;  New authorized value[% END %]
4            [% IF ( action_add_category ) %] &rsaquo; New category[% END %][% END %]
5 [% IF ( delete_confirm ) %] &rsaquo; Confirm deletion[% END %]
6 [% IF ( else ) %]Authorized values[% END %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8
9 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
10 [% INCLUDE 'datatables.inc' %]
11 <script type="text/javascript">
12 //<![CDATA[
13  $(document).ready(function() {
14     $("#table_authorized_values").dataTable($.extend(true, {}, dataTablesDefaults, {
15         "aoColumnDefs": [
16             { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
17         ],
18         "aaSorting": [[ 1, "asc" ]],
19         "iDisplayLength": 20,
20         "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
21         "sPaginationType": "four_button"
22     }));
23
24     if ( $("#branches option:selected").length < 1 ) {
25         $("#branches option:first").attr("selected", "selected");
26     }
27     $('#icons').tabs();
28 });
29 //]]>
30 </script>
31
32 [% IF ( else ) %]
33 <script type="text/javascript">
34 //<![CDATA[
35 $(document).ready(function() {
36     $('#category').find("input:submit").hide();
37     $('#searchfield').change(function() {
38         $('#category').submit();
39     });
40 });
41 //]]>
42 </script>
43 [% END %]
44
45 <style type="text/css">
46         fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
47     fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-selected {background-color : #F4F8F9; }
48         fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
49     fieldset.rows .ui-tabs-nav { margin-left : 10px; }
50 </style>
51 </head>
52 <body id="admin_authorised_values" class="admin">
53 [% INCLUDE 'header.inc' %]
54 [% INCLUDE 'cat-search.inc' %]
55 <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; [% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a> &rsaquo; [% IF ( action_modify ) %]Modify authorized value[% END %]
56            [% IF ( action_add_value ) %]New authorized value[% END %]
57            [% IF ( action_add_category ) %]New category[% END %][% END %]
58 [% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a> &rsaquo; Confirm deletion[% END %]
59 [% IF ( else ) %]Authorized values[% END %]</div>
60
61 <div id="doc3" class="yui-t2">
62    
63    <div id="bd">
64         <div id="yui-main">
65         <div class="yui-b">
66
67 [% IF ( add_form ) %]
68         <h1>
69            [% IF ( action_modify ) %]Modify authorized value[% END %]
70            [% IF ( action_add_value ) %]New authorized value[% END %]
71            [% IF ( action_add_category ) %]New category[% END %]
72         </h1>
73
74     [% IF ( action_modify ) %]<div class="note"><strong>NOTE:</strong> If you change an authorized value, existing records using it won't be updated.</div>[% END %]
75
76         <form action="[% script_name %]" name="Aform" method="post">
77         <input type="hidden" name="op" value="add_validate" />
78     <input type="hidden" name="offset" value="[% offset %]" />
79         <fieldset class="rows"><ol>
80         <li>
81         [% IF ( action_add_category ) %]<label for="category">Category: </label>
82             <input type="text" name="category"  id="category" size="16" maxlength="16" class="focus" />
83                          [% ELSE %]<span class="label">Category</span>
84                 <input type="hidden" name="category" value="[% category %]" />   [% category %]
85                          [% END %]
86         </li>
87         <li>
88             <label for="authorised_value">Authorized value: </label>
89      [% IF ( action_modify ) %]<input type="hidden" id="id" name="id" value="[% id %]" />[% END %]
90             [% IF ( action_add_category ) %]
91             <input type="text" id="authorised_value" name="authorised_value" value="[% authorised_value %]" maxlength="80" />
92             [% ELSE %]
93             <input type="text" id="authorised_value" name="authorised_value" value="[% authorised_value %]" maxlength="80" class="focus" />
94             [% END %]
95         </li>
96         <li>
97             <label for="lib">Description: </label>
98             <input type="text" name="lib" id="lib" value="[% lib %]" maxlength="200" />
99         </li>
100         <li>
101             <label for="lib_opac">Description (OPAC): </label>
102             <input type="text" name="lib_opac" id="lib_opac" value="[% lib_opac %]" maxlength="200" />
103         </li>
104         <li><label for="branches">Libraries limitation: </label>
105             <select id="branches" name="branches" multiple size="10">
106                 <option value="">All libraries</option>
107                 [% FOREACH branch IN branches_loop %]
108                   [% IF ( branch.selected ) %]
109                     <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
110                   [% ELSE %]
111                     <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
112                   [% END %]
113                 [% END %]
114             </select>
115             <span>Select All if this authorized value must to be displayed all the time. Otherwise select libraries you want to associate with this value.
116             </span>
117         </li>
118
119                 </ol>
120         <div id="icons" class="toptabs" style="clear:both">
121         <h5 style="margin-left:10px;">Choose an icon:</h5>
122                         <ul>
123                   <li><a href="#none">None</a></li>
124                                   [% FOREACH imageset IN imagesets %]
125                         [% IF ( imageset.imagesetactive ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a></li>
126                                   [% END %]
127                         </ul>
128   <div id="none"><ul>
129   <li><label for="noimage">No image: </label><input type="radio" name="imageurl" id="noimage" value="removeImage" /></li>
130   </ul>
131   <br class="clear" /></div>
132   [% FOREACH imageset IN imagesets %]
133   <div id="[% imageset.imagesetname %]"><ul>
134   [% FOREACH image IN imageset.images %]
135                         <li style="float: none; display: inline-block; clear : none; width: auto;">
136             <label> [% IF ( image.StaffImageUrl ) %]
137               <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
138         [% ELSE %]
139         [% END %]
140     [% IF ( image.checked ) %]
141               <input type="radio" name="imageurl" value="[% image.KohaImage %]" checked="checked" />
142     [% ELSE %]
143               [% IF ( image.KohaImage ) %] <!-- to delete the radio button if there is no image after -->
144               <input type="radio" name="imageurl" value="[% image.KohaImage %]" />
145               [% END %]
146     [% END %]
147             </label>
148                         </li>
149   [% END %]</ul>
150   <br class="clear" />
151   </div>
152   [% END %]
153   </div>
154         </fieldset>
155        <fieldset class="action"> <input type="hidden" name="id" value="[% id %]" />
156         <input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=[% category %]">Cancel</a></fieldset>
157     </form>
158 [% END %]
159
160
161 [% IF ( delete_confirm ) %]
162         <div class="dialog alert">
163 <h3>Confirm deletion</h3>
164 <table>
165         <tr>
166                 <th>Category</th>
167                 <th>Value</th>
168                 <th>Description</th>
169                 <th>Description (OPAC)</th>
170         </tr>
171         <tr>
172             <td>[% searchfield %]</td>
173             <td>[% Tvalue %]</td>
174             <td>[% Tlib %]</td>
175             <td>[% Tlib_opac %]</td>
176         </tr>
177         </table>
178         <form action="[% script_name %]" method="post">
179                 <input type="hidden" name="op" value="delete_confirmed" />
180                 <input type="hidden" name="id" value="[% id %]" />
181         <input type="hidden" name="searchfield" value="[% searchfield %]" /><fieldset class="action"><input type="submit" value="Yes, delete" class="approve" /></form>
182 <form action="[% script_name %]" method="get"><input type="hidden" name="searchfield" value="[% searchfield %]" /><input type="submit" value="No, do not delete" class="deny" /></form>
183 </div>
184 [% END %]
185
186 [% IF ( else ) %]
187
188 <div id="toolbar" class="btn-toolbar">
189     <a id="addauth" class="btn btn-small" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;category=[% category %]">New authorized value for [% category %]</a>
190     <a id="addcat" class="btn btn-small" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form">New category</a>
191 </div>
192
193 <h1>Authorized values</h1>
194 <div class="note"><strong>NOTE:</strong> If you change an authorized value, existing records using it won't be updated.</div>
195
196 [% IF ( duplicate_category ) %]
197 <div class="dialog alert">Could not add value &quot;[% duplicate_value %]&quot; for category &quot;[% duplicate_category %]&quot; &mdash; value already present.
198 </div>
199 [% END %]
200 <form action="/cgi-bin/koha/admin/authorised_values.pl" method="post" id="category"><label for="searchfield">Show category: </label>[% tab_list %] <input type="submit" value="Submit" /></form>
201 [% IF ( category == 'Bsort1' ) %]
202     <p>An authorized value attached to patrons, that can be used for stats purposes</p>
203 [% END %]
204 [% IF ( category == 'Bsort2' ) %]
205     <p>An authorized value attached to patrons, that can be used for stats purposes</p>
206 [% END %]
207 [% IF ( category == 'Asort1' ) %]
208     <p>An authorized value attached to acquisitions, that can be used for stats purposes</p>
209 [% END %]
210 [% IF ( category == 'Asort2' ) %]
211     <p>An authorized value attached to acquisitions, that can be used for stats purposes</p>
212 [% END %]
213 [% IF ( category == 'SUGGEST' ) %]
214     <p>Reasons to reject or accept patron suggestions</p>
215 [% END %]
216 [% IF ( category == 'DAMAGED' ) %]
217     <p>Statuses to describe a damaged item</p>
218 [% END %]
219 [% IF ( category == 'LOST' ) %]
220    <p>Statuses to describe a lost item</p>
221 [% END %]
222 [% IF ( category == 'MANUAL_INV' ) %]
223     <p>Additional values for manual invoice types</p>
224 [% END %]
225 [% IF ( category == 'BOR_NOTES' ) %]
226     <p>Values for custom patron notes</p>
227 [% END %]
228 [% IF ( category == 'LOC' ) %]
229     <p>Values for shelving locations</p>
230 [% END %]
231 [% IF ( category == 'CCODE' ) %]
232     <p>Values for collection codes</p>
233  [% END %]
234  [% IF ( category == 'NOT_LOAN' ) %]
235     <p>Statuses to describe why an item is not for loan</p>
236  [% END %]
237 <h3>Authorized values for category [% category %]:</h3>
238
239 [% IF ( loop ) %]<div id="pagertable_authorized_values">
240 </div>[% END %]
241
242 [% IF ( loop ) %]<table id="table_authorized_values">
243 <thead><tr>
244         <th>Authorized value</th>
245         <th>Description</th>
246         <th>Description (OPAC)</th>
247         <th>Icon</th>
248     <th>Branches limitations</th>
249         <th>Edit</th>
250         <th>Delete</th>
251         </tr>
252 </thead><tbody>
253 [% FOREACH loo IN loop %]
254 [% UNLESS ( loop.odd ) %]
255 <tr>
256 [% ELSE %]
257 <tr>
258 [% END %]
259         <td>[% loo.authorised_value %]</td>
260         <td>[% loo.lib %]</td>
261         <td>[% loo.lib_opac %]</td>
262         <td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl %]" alt=""/>[% ELSE %]&nbsp;[% END %]</td>
263     <td>
264         [% IF loo.branches.size > 0 %]
265             [% branches_str = "" %]
266             [% FOREACH branch IN loo.branches %]
267                 [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
268             [% END %]
269             <span href="#" title="[% branches_str %]">
270                 [% IF loo.branches.size > 1 %]
271                     [% loo.branches.size %] branches limitations
272                 [% ELSE %]
273                     [% loo.branches.size %] branch limitation
274                 [% END %]
275         [% ELSE %]
276             No limitation
277         [% END %]
278     </td>
279         <td><a href="[% loo.edit %]">Edit</a></td>
280         <td><a href="[% loo.delete %]">Delete</a></td>
281 </tr>
282 [% END %]
283 </tbody></table>[% ELSE %]
284 <div class="dialog message">There are no authorized values defined for [% category %]</div>
285 [% END %]
286
287 [% IF ( isprevpage ) %]
288 <form class="inline" action="[% script_name %]" method="post">
289 <input type="hidden" name="offset" value="[% prevpage %]" /><input type="hidden" name="searchfield" value="[% searchfield %]" />
290         <input type="submit" value="&lt;&lt; Previous" /></form>
291 [% END %] 
292
293 [% END %]
294
295 </div>
296 </div>
297 <div class="yui-b">
298 [% INCLUDE 'admin-menu.inc' %]
299 </div>
300 </div>
301 [% INCLUDE 'intranet-bottom.inc' %]