Merge remote branch 'kc/new/bug_4935' into kcmaster
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / smart-rules.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; Issuing Rules</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4
5 <script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.uitablefilter.js"></script>
6 <script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/ui.tabs.js"></script>
7 <link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/lib/jquery/plugins/ui.tabs.css" />
8 <script type="text/javascript">
9 //<![CDATA[
10 $(document).ready(function() {
11         $('#selectlibrary').find("input:submit").hide();
12         $('#branch').change(function() {
13                 $('#selectlibrary').submit();
14         });
15         $('#filter').keyup(function() {
16                 $.uiTableFilter( $('#smartrules'), this.value );
17         });
18         $('#nofilter').click(function() {
19             $('.issues').show();
20             $('.fines').show();
21             $('.reserves').show();
22             $(this).parent().attr('class','ui-tabs-selected');
23             $('#issuesfilter').parent().attr('class',null);
24             $('#finesfilter').parent().attr('class',null);
25             $('#reservesfilter').parent().attr('class',null);
26         });
27         $('#issuesfilter').click(function() {
28             $('.issues').show();
29             $('.fines').hide();
30             $('.reserves').hide();
31             $(this).parent().attr('class','ui-tabs-selected');
32             $('#nofilter').parent().attr('class',null);
33             $('#finesfilter').parent().attr('class',null);
34             $('#reservesfilter').parent().attr('class',null);
35         });
36         $('#finesfilter').click(function() {
37             $('.issues').hide();
38             $('.fines').show();
39             $('.reserves').hide();
40             $(this).parent().attr('class','ui-tabs-selected');
41             $('#issuesfilter').parent().attr('class',null);
42             $('#nofilter').parent().attr('class',null);
43             $('#reservesfilter').parent().attr('class',null);
44         });
45         $('#reservesfilter').click(function() {
46             $('.issues').hide();
47             $('.fines').hide();
48             $('.reserves').show();
49             $(this).parent().attr('class','ui-tabs-selected');
50             $('#issuesfilter').parent().attr('class',null);
51             $('#finesfilter').parent().attr('class',null);
52             $('#nofilter').parent().attr('class',null);
53         });
54 });
55 //]]>
56 </script>
57
58 </head>
59 <body>
60 <!-- TMPL_INCLUDE NAME="header.inc" -->
61 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
62
63 <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; Issuing Rules</div>
64
65 <div id="doc3" class="yui-t1">
66
67 <div id="bd">
68     <div id="yui-main">
69     <div class="yui-b">
70     <h1 class="parameters">
71         <!-- TMPL_IF NAME="humanbranch" -->
72             Defining issuing rules for "<!-- TMPL_VAR NAME="humanbranch" -->"
73         <!-- TMPL_ELSE -->
74             Defining default issuing rules
75         <!-- /TMPL_IF -->
76     </h1>
77     <div class="help">
78         <p>The rules are applied from most specific to less specific, using the first found in this order:</p>
79         <ul>
80             <li>same library, same patron type, same item type</li>
81             <li>same library, same patron type, default item type</li>
82             <li>same library, default patron type, same item type</li>
83             <li>same library, default patron type, default item type</li>
84             <li>default library, same patron type, same item type</li>
85             <li>default library, same patron type, default item type</li>
86             <li>default library, default patron type, same item type</li>
87             <li>default library, default patron type, default item type</li>
88         </ul>
89         <p>To modify a rule, create a new one with the same patron type and item type.</p>
90     </div>
91     <div id="bloc100">
92         <form method="get" action="/cgi-bin/koha/admin/smart-rules.pl" id="selectlibrary">
93         Select a library :
94             <select name="branch" id="branch" style="width:20em;">
95                 <option value="*">Default</option>
96             <!-- TMPL_LOOP NAME="branchloop" -->
97                 <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option><!-- /TMPL_IF -->
98             <!-- /TMPL_LOOP -->
99             </select>
100         </form>
101 <!-- TMPL_IF Name="definedbranch" --><form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"><label for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidden" name="frombranch" value="<!-- TMPL_VAR NAME="branch" -->" />
102             <select name="tobranch" id="tobranch"><!-- TMPL_LOOP NAME="branchloop" --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option><!-- /TMPL_LOOP --></select> <input type="submit" value="Clone" /></form><!-- /TMPL_IF --></fieldset>
103
104         <div class="toptabs">
105             <ul class="ui-tabs-nav">
106                 <li class="ui-tabs-selected"><a id="nofilter">All</a></li>
107                 <li><a id="issuesfilter">Issues</a></li>
108                 <li><a id="finesfilter">Fines</a></li>
109                 <li><a id="reservesfilter">Reserves</a></li>
110                 <div style="text-align:right;"><label for="filter">Filter: </label><input type="text" name="filter" id="filter" /></div>
111             </ul>
112             <div class="tabs-container">
113             <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
114             <input type="hidden" name="op" value="add" />
115             <table id="smartrules" width="100%">
116                 <thead>
117                     <tr>
118                         <th>Patron Category</th>
119                         <th>Item Type</th>
120                         <th class="issues">Current Checkouts Allowed</th>
121                         <th class="issues">Loan Period (day)</th>
122                         <th class="fines">Fine Amount</th>
123                         <th class="fines">Fine Charging Interval</th>
124                         <th class="fines">Fine Grace period (day)</th>
125                         <th class="fines">Suspension in Days (day)</th>
126                         <th class="issues">Renewals Allowed (count)</th>
127                         <th class="reserves">Holds Allowed (count)</th>
128                         <th class="issues">Rental Discount (%)</th>
129                         <th>&nbsp;</th>
130                     </tr>
131                 </thead>
132                 <tbody>
133                                 <!-- TMPL_LOOP NAME="rules" -->
134                                         <!-- TMPL_UNLESS NAME="__odd__" -->
135                                         <tr class="highlight">
136                                         <!-- TMPL_ELSE -->
137                                         <tr>
138                                         <!-- /TMPL_UNLESS -->
139                                                         <td><!-- TMPL_IF NAME="default_humancategorycode" -->
140                                                                         <em>Default</em>
141                                                                 <!-- TMPL_ELSE -->
142                                                                         <!-- TMPL_VAR NAME="humancategorycode" -->
143                                                                 <!-- /TMPL_IF -->
144                                                         </td>
145                                                         <td><!-- TMPL_IF NAME="default_humanitemtype" -->
146                                                                         <em>Default</em>
147                                                                 <!-- TMPL_ELSE -->
148                                                                         <!-- TMPL_VAR NAME="humanitemtype" -->
149                                                                 <!-- /TMPL_IF -->
150                                                         </td>
151                                                             <td class="issues"><!-- TMPL_IF NAME="unlimited_maxissueqty" -->
152                                             Unlimited
153                                         <!-- TMPL_ELSE -->
154                                             <!-- TMPL_VAR NAME="maxissueqty" -->
155                                         <!-- /TMPL_IF -->
156                                     </td>
157                                     <td class="issues"><!-- TMPL_IF NAME="issuelength" --><!-- TMPL_VAR NAME="issuelength" --> <!-- /TMPL_IF --></td>
158                                     <td class="fines"><!-- TMPL_VAR NAME="fine" --></td>
159                                     <td class="fines"><!-- TMPL_IF NAME="chargeperiod" --><!-- TMPL_VAR NAME="chargeperiod" --> <!-- /TMPL_IF --></td>
160                                     <td class="fines"><!-- TMPL_IF NAME="firstremind" --><!-- TMPL_VAR NAME="firstremind" --> <!-- /TMPL_IF --></td>
161                                     <td class="fines"><!-- TMPL_IF NAME="finedays" --> <!-- TMPL_VAR NAME="finedays" --> <!-- /TMPL_IF --></td>
162                                     <td class="issues"><!-- TMPL_IF NAME="renewalsallowed" --><!-- TMPL_VAR NAME="renewalsallowed" --> <!-- /TMPL_IF --></td>
163                                     <td class="reserves"><!-- TMPL_IF NAME="reservesallowed" --><!-- TMPL_VAR NAME="reservesallowed" --> <!-- /TMPL_IF --></td>
164                                                         <td class="issues"><!-- TMPL_VAR NAME="rentaldiscount" --></td>
165                                                         <td>
166                                                                 <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&amp;itemtype=<!-- TMPL_VAR NAME="itemtype" -->&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->&amp;branch=<!-- TMPL_VAR NAME="branch" -->">Delete</a>
167                                                         </td>
168                         </tr>
169                 <!-- /TMPL_LOOP -->
170                 </tbody>
171                 <tfoot>
172                 <tr>
173                     <td>
174                         <select name="categorycode">
175                             <option value="*">Default</option>
176                         <!-- TMPL_LOOP NAME="categoryloop" -->
177                             <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option>
178                         <!-- /TMPL_LOOP -->
179                         </select>
180                     </td>
181                     <td>
182                         <select name="itemtype" style="width:13em;">
183                             <option value="*">Default</option>
184                         <!-- TMPL_LOOP NAME="itemtypeloop" -->
185                             <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
186                         <!-- /TMPL_LOOP -->
187                         </select>
188                     </td>
189                         <td class="issues"><input name="maxissueqty" size="3" /></td>
190                                 <td class="issues"><input name="issuelength" size="3" /> </td>
191                                 <td class="fines"><input name="fine" size="4" /></td>
192                                 <td class="fines"><input name="chargeperiod" size="2" /></td>
193                                 <td class="fines"><input name="firstremind" size="2" /> </td>
194                                 <td class="fines"><input name="finedays" size="3" /> </td>
195                                 <td class="issues"><input name="renewalsallowed" size="2" /></td>
196                                 <td class="reserves"><input name="reservesallowed" size="2" /></td>
197                     <td><input class="issues" name="rentaldiscount" size="2" /></td>
198                     <td><input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/><input type="submit" value="Add" class="submit" /></td>
199                 </tr>
200                 </tfoot>
201             </table>
202         </form>
203             </div><!-- tabs-container -->
204         </div><!-- toptabs -->
205     </div>
206     <div class="help">
207         <h4>Defaults for this library</h4>
208         <p>You can set a default maximum number of checkouts and hold policy that will be used if none is defined below for a particular item type or category.</p>
209     </div>
210     <div>
211         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
212             <input type="hidden" name="op" value="set-branch-defaults" />
213             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
214             <table>
215                 <tr>
216                     <th>&nbsp;</th>
217                     <th>Total Current Checkouts Allowed</th>
218                     <th>Hold Policy</th>
219                     <th>&nbsp;</th>
220                     <th>&nbsp;</th>
221                 </tr>
222                 <tr>
223                     <td><em>Defaults<!-- TMPL_UNLESS NAME="default_rules" --> (not set)<!-- /TMPL_IF --></em></td>
224                     <td><input type="text" name="maxissueqty" size="3" value="<!-- TMPL_VAR NAME="default_maxissueqty" -->"/></td>
225                     <td>
226                         <select name="holdallowed">
227                             <!-- TMPL_IF NAME="default_holdallowed_any" -->
228                             <option value="2" selected="selected">
229                             <!-- TMPL_ELSE -->
230                             <option value="2">
231                             <!-- /TMPL_IF -->
232                                 From Any Library
233                             </option>
234                             <!-- TMPL_IF NAME="default_holdallowed_same" -->
235                             <option value="1" selected="selected">
236                             <!-- TMPL_ELSE -->
237                             <option value="1">
238                             <!-- /TMPL_IF -->
239                                 From Home Library
240                             </option>
241                             <!-- TMPL_IF NAME="default_holdallowed_none" -->
242                             <option value="0" selected="selected">
243                             <!-- TMPL_ELSE -->
244                             <option value="0">
245                             <!-- /TMPL_IF -->
246                                 No Holds Allowed
247                             </option>
248                         </select>
249                     </td>
250                     <td><input type="submit" value="Save" class="submit" /></td>
251                     <td>
252                         <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&amp;categorycode=*&amp;branch=<!-- TMPL_VAR NAME="branch" -->">Unset</a>
253                     </td>
254                 </tr>
255             </table>
256         </form>
257     </div>
258     <!-- TMPL_IF NAME="show_branch_cat_rule_form" -->
259     <div class="help">
260         <p>For this library, you can specify the maximum number of loans that
261             a patron of a given category can make, regardless of the item type.
262         </p>
263         <p>If the total amount loanable for a given patron category is left blank,
264            no limit applies, except possibly for a limit you define for a specific item type.
265         </p>
266     </div>
267     <div>
268         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
269             <input type="hidden" name="op" value="add-branch-cat" />
270             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
271             <table>
272                 <tr>
273                     <th>Patron Category</th>
274                     <th>Total Current Checkouts Allowed</th>
275                     <th>&nbsp;</th>
276                 </tr>
277                 <!-- TMPL_LOOP NAME="branch_cat_rule_loop" -->
278                     <!-- TMPL_UNLESS NAME="__odd__" -->
279                     <tr class="highlight">
280                     <!-- TMPL_ELSE -->
281                     <tr>
282                     <!-- /TMPL_UNLESS -->
283                         <td><!-- TMPL_IF NAME="default_humancategorycode" -->
284                                 <em>Default</em>
285                             <!-- TMPL_ELSE -->
286                                 <!-- TMPL_VAR NAME="humancategorycode" -->
287                             <!-- /TMPL_IF -->
288                         </td>
289                         <td><!-- TMPL_IF NAME="unlimited_maxissueqty" -->
290                                 Unlimited
291                             <!-- TMPL_ELSE -->
292                                 <!-- TMPL_VAR NAME="maxissueqty" -->
293                             <!-- /TMPL_IF -->
294                         </td>
295                         <td>
296                             <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->&amp;branch=<!-- TMPL_VAR NAME="branch" -->">Delete</a>
297                         </td>
298                     </tr>
299                 <!-- /TMPL_LOOP -->
300                 <tr>
301                     <td>
302                         <select name="categorycode">
303                         <!-- TMPL_LOOP NAME="categoryloop" -->
304                             <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option>
305                         <!-- /TMPL_LOOP -->
306                         </select>
307                     </td>
308                     <td><input name="maxissueqty" size="3" /></td>
309                     <td><input type="submit" value="Add" class="submit" /></td>
310                 </tr>
311             </table>
312         </form>
313     </div>
314     <!-- /TMPL_IF -->
315     <div class="help">
316         <p>
317             For this library, you can edit rules for given itemtypes, regardless
318             of the patron's category.
319         </p>
320         <p>
321             Currently, this means hold policies.
322             The various policies have the following effects:
323         </p>
324         <ul>
325             <li><strong>From Any Library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li>
326             <li><strong>From Home Library:</strong> Only patrons from the item's home library may put this book on hold.</li>
327             <li><strong>No Holds Allowed:</strong> No patron may put this book on hold.</li>
328         </ul>
329         <p>
330             Note that if the system preference
331             <code>AllowHoldPolicyOverride</code> is enabled, these policies can
332             be overridden by your circulation staff. Also, these policies are
333             based on the patron's home branch, <em>not</em> the branch that
334             the reserving staff member is from.
335         </p>
336     </div>
337     <div>
338         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
339             <input type="hidden" name="op" value="add-branch-item" />
340             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
341             <table>
342                 <tr>
343                     <th>Item Type</th>
344                     <th>Hold Policy</th>
345                     <th>&nbsp;</th>
346                 </tr>
347                 <!-- TMPL_LOOP NAME="branch_item_rule_loop" -->
348                     <!-- TMPL_UNLESS NAME="__odd__" -->
349                     <tr class="highlight">
350                     <!-- TMPL_ELSE -->
351                     <tr>
352                     <!-- /TMPL_UNLESS -->
353                         <td><!-- TMPL_IF NAME="default_humanitemtype" -->
354                                 <em>Default</em>
355                             <!-- TMPL_ELSE -->
356                                 <!-- TMPL_VAR NAME="humanitemtype" -->
357                             <!-- /TMPL_IF -->
358                         </td>
359                         <td><!-- TMPL_IF NAME="holdallowed_any" -->
360                                 From Any Library
361                             <!-- TMPL_ELSIF NAME="holdallowed_same" -->
362                                 From Home Library
363                             <!-- TMPL_ELSE -->
364                                 No Holds Allowed
365                             <!-- /TMPL_IF -->
366                         </td>
367                         <td>
368                             <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-item&amp;itemtype=<!-- TMPL_VAR NAME="itemtype" -->&amp;branch=<!-- TMPL_VAR NAME="branch" -->">Delete</a>
369                         </td>
370                     </tr>
371                 <!-- /TMPL_LOOP -->
372                 <tr>
373                     <td>
374                         <select name="itemtype">
375                         <!-- TMPL_LOOP NAME="itemtypeloop" -->
376                             <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
377                         <!-- /TMPL_LOOP -->
378                         </select>
379                     </td>
380                     <td>
381                         <select name="holdallowed">
382                             <option value="2">From Any Library</option>
383                             <option value="1">From Home Library</option>
384                             <option value="0">No Holds Allowed</option>
385                         </select>
386                     </td>
387                     <td><input type="submit" value="Add" class="submit" /></td>
388                 </tr>
389             </table>
390         </form>
391     </div>
392 </div>
393
394 </div>
395 <div class="yui-b">
396 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
397 </div>
398 </div>
399 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->