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