Merge remote-tracking branch 'kc/new/bug_5449' into kcmaster
[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 > ul').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 : transparent; }
29         fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
30 </style>
31 </head>
32 <body>
33 [% INCLUDE 'header.inc' %]
34 [% INCLUDE 'cat-search.inc' %]
35 <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 %]
36            [% IF ( action_add_value ) %]New authorized value[% END %]
37            [% IF ( action_add_category ) %]New category[% END %][% END %]
38 [% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized Values</a> &rsaquo; Confirm Deletion[% END %]
39 [% IF ( else ) %]Authorized values[% END %]</div>
40
41 <div id="doc3" class="yui-t2">
42    
43    <div id="bd">
44         <div id="yui-main">
45         <div class="yui-b">
46
47 [% IF ( add_form ) %]
48         <h1>
49            [% IF ( action_modify ) %]Modify authorized value[% END %]
50            [% IF ( action_add_value ) %]New authorized value[% END %]
51            [% IF ( action_add_category ) %]New category[% END %]
52         </h1>
53         <form action="[% script_name %]" name="Aform" method="post">
54         <input type="hidden" name="op" value="add_validate" />
55     <input type="hidden" name="offset" value="[% offset %]" />
56         <fieldset class="rows"><ol>
57         <li>
58                          [% IF ( action_add_category ) %]<label for="category">Category</label>
59                 <input type="text" name="category"  id="category" size="10" maxlength="10" />
60                          [% ELSE %]<span class="label">Category</span>
61                 <input type="hidden" name="category" value="[% category %]" />   [% category %]
62                          [% END %]
63         </li>
64         <li>
65             <label for="authorised_value">Authorized value</label>
66      [% IF ( action_modify ) %]<input type="hidden" id="id" name="id" value="[% id %]" />[% END %]
67             <input type="text" id="authorised_value" name="authorised_value" value="[% authorised_value %]" maxlength="80" />
68         </li>
69         <li>
70             <label for="lib">Description</label>
71             <input type="text" name="lib" id="lib" value="[% lib %]" maxlength="80" />
72         </li>
73         <li>
74             <label for="lib_opac">Description (OPAC)</label>
75             <input type="text" name="lib_opac" id="lib_opac" value="[% lib_opac %]" maxlength="80" />
76         </li>
77                 </ol>
78                 <div id="icons" class="toptabs">
79                 <h5 style="margin-left:10px;">Choose an Icon:</h5>
80                         <ul>
81                                         <li><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;category=[% category %]#none">None</a></li>
82                                   [% FOREACH imageset IN imagesets %]
83                                         [% IF ( imageset.imagesetactive ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;category=[% imageset.category %]#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a></li>
84                                   [% END %]
85                         </ul>
86                 </div>
87   <div id="none"><ul>
88   <li><label for="noimage">No image: </label><input type="radio" name="imageurl" id="noimage" value="removeImage" /></li>
89   </ul>
90   <br class="clear" /></div>
91   [% FOREACH imageset IN imagesets %]
92   <div id="[% imageset.imagesetname %]"><ul>
93   [% FOREACH image IN imageset.images %]
94                         <li style="float: none; display: inline; clear : none; width: auto;">
95             <label> [% IF ( image.StaffImageUrl ) %]
96               <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
97         [% ELSE %]
98         [% END %]
99     [% IF ( image.checked ) %]
100               <input type="radio" name="imageurl" value="[% image.KohaImage %]" checked="checked" />
101     [% ELSE %]
102               [% IF ( image.KohaImage ) %] <!-- to delete the radio button if there is no image after -->
103               <input type="radio" name="imageurl" value="[% image.KohaImage %]" />
104               [% END %]
105     [% END %]
106             </label>
107                         </li>
108   [% END %]</ul>
109   <br class="clear" />
110   </div>
111   [% END %]
112   
113         </fieldset>
114        <fieldset class="action"> <input type="hidden" name="id" value="[% id %]" />
115         <input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=[% category %]">Cancel</a></fieldset>
116     </form>
117 [% END %]
118
119
120 [% IF ( delete_confirm ) %]
121         <div class="dialog alert">
122 <h3>Confirm Deletion</h3>
123 <table>
124         <tr>
125                 <th>Category</th>
126                 <th>Value</th>
127                 <th>Description</th>
128                 <th>Description (OPAC)</th>
129         </tr>
130         <tr>
131             <td>[% searchfield %]</td>
132             <td>[% Tvalue %]</td>
133             <td>[% Tlib %]</td>
134             <td>[% Tlib_opac %]</td>
135         </tr>
136         </table>
137         <form action="[% script_name %]" method="post">
138                 <input type="hidden" name="op" value="delete_confirmed" />
139                 <input type="hidden" name="id" value="[% id %]" />
140                 <input type="hidden" name="searchfield" value="[% searchfield %]" /><fieldset class="action"><input type="submit" value="Yes, Delete" class="approve" /></form>
141 <form action="[% script_name %]" method="get"><input type="hidden" name="searchfield" value="[% searchfield %]" /><input type="submit" value="No, Do Not Delete" class="deny" /></form>
142 </div>
143 [% END %]
144
145 [% IF ( else ) %]
146
147 <div id="toolbar">
148         <script type="text/javascript">
149         //<![CDATA[
150
151         // prepare DOM for YUI Toolbar
152
153          $(document).ready(function() {
154             yuiToolbar();
155                 $('#category').find("input:submit").hide();
156                 $('#searchfield').change(function() {
157                 $('#category').submit();
158                 });
159          });
160
161         // YUI Toolbar Functions
162
163         function yuiToolbar() {
164             new YAHOO.widget.Button("addauth");
165             new YAHOO.widget.Button("addcat");
166         }
167
168         //]]>
169         </script>
170         <ul class="toolbar">
171          <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>
172     <li><a id="addcat" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form">New Category</a></li>
173 </ul></div>
174
175 <h1>Authorized values</h1>
176 <p>These values can be used in many pull down menus throughout the Koha system. You can define as many categories as you want, and as many authorized values as you want in each category.</p>
177
178 <p>When you define the MARC subfield structure, you can link a subfield to a authorized-value category. When the user ask for adding of modifying a biblio, the subfield is not entered through a free field, but though a list of authorized values</p>
179
180 [% IF ( duplicate_category ) %]
181 <div>
182 <span class="problem">Could not add value &quot;[% duplicate_value %]&quot; for category 
183     &quot;[% duplicate_category %]&quot; &mdash; value already present.
184 </span>
185 </div>
186 [% END %]
187 <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>
188 [% IF ( category == 'Bsort1' ) %]
189     <p>An authorized value attached to patrons, that can be used for stats purposes</p>
190 [% END %]
191 [% IF ( category == 'Bsort2' ) %]
192     <p>An authorized value attached to patrons, that can be used for stats purposes</p>
193 [% END %]
194 [% IF ( category == 'Asort1' ) %]
195     <p>An authorized value attached to acquisitions, that can be used for stats purposes</p>
196 [% END %]
197 [% IF ( category == 'Asort2' ) %]
198     <p>An authorized value attached to acquisitions, that can be used for stats purposes</p>
199 [% END %]
200 [% IF ( category == 'SUGGEST' ) %]
201     <p>Reasons to reject or accept patron suggestions</p>
202 [% END %]
203 [% IF ( category == 'DAMAGED' ) %]
204     <p>Statuses to describe a damaged item</p>
205 [% END %]
206 [% IF ( category == 'LOST' ) %]
207    <p>Statuses to describe a lost item</p>
208 [% END %]
209 [% IF ( category == 'MANUAL_INV' ) %]
210     <p>Additional values for manual invoice types</p>
211 [% END %]
212 [% IF ( category == 'BOR_NOTES' ) %]
213     <p>Values for custom patron notes</p>
214 [% END %]
215 [% IF ( category == 'LOC' ) %]
216     <p>Values for shelving locations</p>
217 [% END %]
218 [% IF ( category == 'CCODE' ) %]
219     <p>Values for collection codes</p>
220  [% END %]
221  [% IF ( category == 'NOT_LOAN' ) %]
222     <p>Statuses to describe why an item is not for loan</p>
223  [% END %]
224 <h3>Authorized values for category [% category %]:</h3>
225
226 [% IF ( loop ) %]<span id="pagertable_authorized_values" class="pager">
227         <form class="formpager">&nbsp;<strong>page(s)</strong>&nbsp;:
228                 <img src="[% interface %]/prog/img/first.png" class="first"/>
229                 <img src="[% interface %]/prog/img/prev.png" class="prev"/>
230                 <input type="text" size="5" class="pagedisplay"/>
231                 <img src="[% interface %]/prog/img/next.png" class="next"/>
232                 <img src="[% interface %]/prog/img/last.png" class="last"/>
233                 , entries/page : 
234                 <select class="pagesize">
235                 <option value="10">10</option>
236                         <option value="20">20</option>
237                         <option value="30">30</option>
238                         <option value="40">40</option>
239                         <option selected="selected" value="50">50</option>
240                         <option value="100">100</option>
241                         <option value="200">200</option>
242                 </select>
243         </form>
244 </span>[% END %]
245
246 [% IF ( loop ) %]<table id="table_authorized_values" class="tablesorter">
247 <thead><tr>
248         <th>Authorized value</th>
249         <th>Description</th>
250         <th>Description (OPAC)</th>
251         <th>Icon</th>
252         <th>Edit</th>
253         <th>Delete</th>
254         </tr>
255 </thead><tbody>
256 [% FOREACH loo IN loop %]
257 [% UNLESS ( loop.odd ) %]
258 <tr>
259 [% ELSE %]
260 <tr>
261 [% END %]
262         <td>[% loo.authorised_value %]</td>
263         <td>[% loo.lib %]</td>
264         <td>[% loo.lib_opac %]</td>
265         <td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl %]" alt=""/>[% ELSE %]&nbsp;[% END %]</td>
266         <td><a href="[% loo.edit %]">Edit</a></td>
267         <td><a href="[% loo.delete %]">Delete</a></td>
268 </tr>
269 [% END %]
270 </tbody></table>[% ELSE %]
271 <div class="dialog message">There are no authorized values defined for [% category %]</div>
272 [% END %]
273
274 [% IF ( isprevpage ) %]
275 <form class="inline" action="[% script_name %]" method="post">
276 <input type="hidden" name="offset" value="[% prevpage %]" /><input type="hidden" name="searchfield" value="[% searchfield %]" />
277         <input type="submit" value="&lt;&lt; Previous" /></form>
278 [% END %] 
279
280 [% END %]
281
282 </div>
283 </div>
284 <div class="yui-b">
285 [% INCLUDE 'admin-menu.inc' %]
286 </div>
287 </div>
288 [% INCLUDE 'intranet-bottom.inc' %]