Add holds policies
[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">
6 //<![CDATA[
7 $(document).ready(function() {
8         $('#selectlibrary').find("input:submit").hide();
9         $('#branch').change(function() {
10                 $('#selectlibrary').submit();
11         });
12 });
13 //]]>
14 </script>
15
16 </head>
17 <body>
18 <!-- TMPL_INCLUDE NAME="header.inc" -->
19 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
20
21 <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>
22
23 <div id="doc3" class="yui-t1">
24
25 <div id="bd">
26     <div id="yui-main">
27     <div class="yui-b">
28     <h1 class="parameters">
29         <!-- TMPL_IF NAME="humanbranch" -->
30             Defining issuing rules for "<!-- TMPL_VAR NAME="humanbranch" -->"
31         <!-- TMPL_ELSE -->
32             Defining default issuing rules
33         <!-- /TMPL_IF -->
34     </h1>
35     <div class="help">
36         <p>The rules are applied from most specific to less specific, using the first found in this order:</p>
37         <ul>
38             <li>same library, same patron type, same item type</li>
39             <li>same library, same patron type, default item type</li>
40             <li>same library, default patron type, same item type</li>
41             <li>same library, default patron type, default item type</li>
42             <li>default library, same patron type, same item type</li>
43             <li>default library, same patron type, default item type</li>
44             <li>default library, default patron type, same item type</li>
45             <li>default library, default patron type, default item type</li>
46         </ul>
47         <p>To modify a rule, create a new one with the same patron type and item type.</p>
48     </div>
49     <div id="bloc100">
50         <form method="get" action="/cgi-bin/koha/admin/smart-rules.pl" id="selectlibrary">
51         Select a library :
52             <select name="branch" id="branch" style="width:20em;">
53                 <option value="*">Default</option>
54             <!-- TMPL_LOOP NAME="branchloop" -->
55                                 <!-- 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 -->
56             <!-- /TMPL_LOOP -->
57             </select>
58         </form>
59                 <br />
60                 <br />
61         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
62             <input type="hidden" name="op" value="add" />
63             <table>
64             <tr>
65                 <th>Patron Category</th>
66                 <th>Item Type</th>
67                 <th>Fine Amount</th>
68                 <th>Fine Grace Period</th>
69                 <th>Fine Charging Interval</th>
70                 <th>Current Checkouts Allowed</th>
71                 <th>Loan Period</th><th>&nbsp;</th>
72             </tr>
73             <!-- TMPL_LOOP NAME="rules" -->
74                 <tr>
75                     <td><!-- TMPL_IF NAME="default_humancategorycode" -->
76                             <em>Default</em>
77                         <!-- TMPL_ELSE -->
78                             <!-- TMPL_VAR NAME="humancategorycode" -->
79                         <!-- /TMPL_IF -->
80                     </td>
81                     <td><!-- TMPL_IF NAME="default_humanitemtype" -->
82                             <em>Default</em>
83                         <!-- TMPL_ELSE -->
84                             <!-- TMPL_VAR NAME="humanitemtype" -->
85                         <!-- /TMPL_IF -->
86                     </td>
87                     <td>$<!-- TMPL_VAR NAME="fine" --></td>
88                     <td><!-- TMPL_IF NAME="firstremind" --><!-- TMPL_VAR NAME="firstremind" --> day(s)<!-- /TMPL_IF --></td>
89                     <td><!-- TMPL_IF NAME="chargeperiod" --><!-- TMPL_VAR NAME="chargeperiod" --> day(s)<!-- /TMPL_IF --></td>
90                     <td><!-- TMPL_IF NAME="unlimited_maxissueqty" -->
91                             Unlimited
92                         <!-- TMPL_ELSE -->
93                             <!-- TMPL_VAR NAME="maxissueqty" -->
94                         <!-- /TMPL_IF -->
95                     </td>
96                     <td><!-- TMPL_IF NAME="issuelength" --><!-- TMPL_VAR NAME="issuelength" --> day(s)<!-- /TMPL_IF --></td>
97                     <td>
98                         <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>
99                     </td>
100                 </tr>
101             <!-- /TMPL_LOOP -->
102                 <tr>
103                     <td>
104                         <select name="categorycode">
105                             <option value="*">Default</option>
106                         <!-- TMPL_LOOP NAME="categoryloop" -->
107                             <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option>
108                         <!-- /TMPL_LOOP -->
109                         </select>
110                     </td>
111                     <td>
112                         <select name="itemtype" style="width:13em;">
113                             <option value="*">Default</option>
114                         <!-- TMPL_LOOP NAME="itemtypeloop" -->
115                             <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
116                         <!-- /TMPL_LOOP -->
117                         </select>
118                     </td>
119                     <td>$<input name="fine" size="4" /></td>
120                     <td><input name="firstremind" size="2" /> day(s)</td>
121                     <td><input name="chargeperiod" size="2" /> day(s)</td>
122                     <td><input name="maxissueqty" size="3" /></td>
123                     <td><input name="issuelength" size="3" /> day(s)</td>
124                     <td><input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/><input type="submit" value="Add" class="submit" /></td>
125                 </tr>
126             </table>
127         </form>
128     </div>
129     <div class="help">
130         <h4>Defaults for this branch</h4>
131         <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>
132     </div>
133     <div>
134         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
135             <input type="hidden" name="op" value="set-branch-defaults" />
136             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
137             <table>
138                 <tr>
139                     <th>&nbsp;</th>
140                     <th>Total Current Checkouts Allowed</th>
141                     <th>Hold Policy</th>
142                     <th>&nbsp;</th>
143                 </tr>
144                 <tr>
145                     <td><em>Defaults<!-- TMPL_UNLESS NAME="default_rules" --> (not set)<!-- /TMPL_IF --></em></td>
146                     <td><input name="maxissueqty" size="3" value="<!-- TMPL_VAR NAME="default_maxissueqty" -->"/></td>
147                     <td>
148                         <select name="holdallowed">
149                             <!-- TMPL_IF NAME="default_holdallowed_any" -->
150                             <option value="2" selected="selected">
151                             <!-- TMPL_ELSE -->
152                             <option value="2">
153                             <!-- /TMPL_IF -->
154                                 From Any Library
155                             </option>
156                             <!-- TMPL_IF NAME="default_holdallowed_same" -->
157                             <option value="1" selected="selected">
158                             <!-- TMPL_ELSE -->
159                             <option value="1">
160                             <!-- /TMPL_IF -->
161                                 From Home Library
162                             </option>
163                             <!-- TMPL_IF NAME="default_holdallowed_none" -->
164                             <option value="0" selected="selected">
165                             <!-- TMPL_ELSE -->
166                             <option value="0">
167                             <!-- /TMPL_IF -->
168                                 No Holds Allowed
169                             </option>
170                         </select>
171                     </td>
172                     <td><input type="submit" value="Save" class="submit" /></td>
173                     <td>
174                         <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>
175                     </td>
176                 </tr>
177             </table>
178         </form>
179     </div>
180     <!-- TMPL_IF NAME="show_branch_cat_rule_form" -->
181     <div class="help">
182         <p>For this library, you can specify the maximum number of loans that 
183             a patron of a given category can make, regardless of the item type.
184         </p>
185         <p>If the total amount loanable for a given patron category is left blank,
186            no limit applies, except possibly for a limit you define for a specific item type.
187         </p>
188     </div>
189     <div>
190         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
191             <input type="hidden" name="op" value="add-branch-cat" />
192             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
193             <table>
194                 <tr>
195                     <th>Patron Category</th>
196                     <th>Total Current Checkouts Allowed</th>
197                     <th>&nbsp;</th>
198                 </tr>
199                 <!-- TMPL_LOOP NAME="branch_cat_rule_loop" -->
200                     <tr>
201                         <td><!-- TMPL_IF NAME="default_humancategorycode" -->
202                                 <em>Default</em>
203                             <!-- TMPL_ELSE -->
204                                 <!-- TMPL_VAR NAME="humancategorycode" -->
205                             <!-- /TMPL_IF -->
206                         </td>
207                         <td><!-- TMPL_IF NAME="unlimited_maxissueqty" -->
208                                 Unlimited
209                             <!-- TMPL_ELSE -->
210                                 <!-- TMPL_VAR NAME="maxissueqty" -->
211                             <!-- /TMPL_IF -->
212                         </td>
213                         <td>
214                             <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>
215                         </td>
216                     </tr>
217                 <!-- /TMPL_LOOP -->
218                 <tr>
219                     <td>
220                         <select name="categorycode">
221                         <!-- TMPL_LOOP NAME="categoryloop" -->
222                             <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option>
223                         <!-- /TMPL_LOOP -->
224                         </select>
225                     </td>
226                     <td><input name="maxissueqty" size="3" /></td>
227                     <td><input type="submit" value="Add" class="submit" /></td>
228                 </tr>
229             </table>
230         </form>
231     </div>
232     <!-- /TMPL_IF -->
233     <div class="help">
234         <p>
235             For this library, you can edit rules for given itemtypes, regardless
236             of the patron's category.
237         </p>
238         <p>
239             Currently, this means hold policies.
240             The various policies have the following effects:
241         </p>
242         <ul>
243             <li><strong>From Any Library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li>
244             <li><strong>From Home Library:</strong> Only patrons from the item's home library may put this book on hold.</li>
245             <li><strong>No Holds Allowed:</strong> No patron may put this book on hold.</li>
246         </ul>
247         <p>
248             Note that if the system preference
249             <code>AllowHoldPolicyOverride</code> is enabled, these policies can
250             be overridden by your circulation staff. Also, these policies are
251             based on the patron's home branch, <em>not</em> the branch that
252             the reserving staff member is from.
253         </p>
254     </div>
255     <div>
256         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
257             <input type="hidden" name="op" value="add-branch-item" />
258             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
259             <table>
260                 <tr>
261                     <th>Item Type</th>
262                     <th>Hold Policy</th>
263                     <th>&nbsp;</th>
264                 </tr>
265                 <!-- TMPL_LOOP NAME="branch_item_rule_loop" -->
266                     <tr>
267                         <td><!-- TMPL_IF NAME="default_humanitemtype" -->
268                                 <em>Default</em>
269                             <!-- TMPL_ELSE -->
270                                 <!-- TMPL_VAR NAME="humanitemtype" -->
271                             <!-- /TMPL_IF -->
272                         </td>
273                         <td><!-- TMPL_IF NAME="holdallowed_any" -->
274                                 From Any Library
275                             <!-- TMPL_ELSIF NAME="holdallowed_same" -->
276                                 From Home Library
277                             <!-- TMPL_ELSE -->
278                                 No Holds Allowed
279                             <!-- /TMPL_IF -->
280                         </td>
281                         <td>
282                             <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>
283                         </td>
284                     </tr>
285                 <!-- /TMPL_LOOP -->
286                 <tr>
287                     <td>
288                         <select name="itemtype">
289                         <!-- TMPL_LOOP NAME="itemtypeloop" -->
290                             <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
291                         <!-- /TMPL_LOOP -->
292                         </select>
293                     </td>
294                     <td>
295                         <select name="holdallowed">
296                             <option value="2">From Any Library</option>
297                             <option value="1">From Home Library</option>
298                             <option value="0">No Holds Allowed</option>
299                         </select>
300                     </td>
301                     <td><input type="submit" value="Add" class="submit" /></td>
302                 </tr>
303             </table>
304         </form>
305     </div>
306 </div>
307
308 </div>
309 <div class="yui-b">
310 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
311 </div>
312 </div>
313 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->