[HEAD] (bug #3323) allow rules for reserves in issuing rules.
[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 Days</th>
69                 <th>Fine Grace Period</th>
70                 <th>Fine Charging Interval</th>
71                 <th>Current Checkouts Allowed</th>
72                 <th>Renewals Allowed</th>
73                 <th>Reserves Allowed</th>
74                 <th>Loan Period</th><th>&nbsp;</th>
75             </tr>
76             <!-- TMPL_LOOP NAME="rules" -->
77                 <!-- TMPL_UNLESS NAME="__odd__" -->
78                 <tr class="highlight">
79                 <!-- TMPL_ELSE -->
80                 <tr>
81                 <!-- /TMPL_UNLESS -->
82                     <td><!-- TMPL_IF NAME="default_humancategorycode" -->
83                             <em>Default</em>
84                         <!-- TMPL_ELSE -->
85                             <!-- TMPL_VAR NAME="humancategorycode" -->
86                         <!-- /TMPL_IF -->
87                     </td>
88                     <td><!-- TMPL_IF NAME="default_humanitemtype" -->
89                             <em>Default</em>
90                         <!-- TMPL_ELSE -->
91                             <!-- TMPL_VAR NAME="humanitemtype" -->
92                         <!-- /TMPL_IF -->
93                     </td>
94                     <td><!-- TMPL_VAR NAME="fine" --></td>
95                     <td>
96                         <!-- TMPL_IF NAME="finedays" -->
97                             <!-- TMPL_VAR NAME="finedays" --> day(s)
98                         <!-- /TMPL_IF -->
99                     </td>
100                     <td><!-- TMPL_IF NAME="firstremind" --><!-- TMPL_VAR NAME="firstremind" --> day(s)<!-- /TMPL_IF --></td>
101                     <td><!-- TMPL_IF NAME="chargeperiod" --><!-- TMPL_VAR NAME="chargeperiod" --> day(s)<!-- /TMPL_IF --></td>
102                     <td><!-- TMPL_IF NAME="unlimited_maxissueqty" -->
103                             Unlimited
104                         <!-- TMPL_ELSE -->
105                             <!-- TMPL_VAR NAME="maxissueqty" -->
106                         <!-- /TMPL_IF -->
107                     </td>
108                                         <td><!-- TMPL_IF NAME="renewalsallowed" --><!-- TMPL_VAR NAME="renewalsallowed" --> time(s)<!-- /TMPL_IF --></td>
109                                         <td><!-- TMPL_IF NAME="reservesallowed" --><!-- TMPL_VAR NAME="reservesallowed" --> time(s)<!-- /TMPL_IF --></td>
110                     <td><!-- TMPL_IF NAME="issuelength" --><!-- TMPL_VAR NAME="issuelength" --> day(s)<!-- /TMPL_IF --></td>
111                     <td>
112                         <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>
113                     </td>
114                 </tr>
115             <!-- /TMPL_LOOP -->
116                 <tr>
117                     <td>
118                         <select name="categorycode">
119                             <option value="*">Default</option>
120                         <!-- TMPL_LOOP NAME="categoryloop" -->
121                             <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option>
122                         <!-- /TMPL_LOOP -->
123                         </select>
124                     </td>
125                     <td>
126                         <select name="itemtype" style="width:13em;">
127                             <option value="*">Default</option>
128                         <!-- TMPL_LOOP NAME="itemtypeloop" -->
129                             <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
130                         <!-- /TMPL_LOOP -->
131                         </select>
132                     </td>
133                     <td><input name="fine" size="4" /></td>
134                     <td><input name="finedays" size="2" /> day(s)</td>
135                     <td><input name="firstremind" size="2" /> day(s)</td>
136                     <td><input name="chargeperiod" size="2" /> day(s)</td>
137                     <td><input name="maxissueqty" size="3" /></td>
138                     <td><input name="renewalsallowed" size="3" /></td>
139                     <td><input name="reservesallowed" size="3" /></td>
140                     <td><input name="issuelength" size="3" /> day(s)</td>
141                     <td><input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/><input type="submit" value="Add" class="submit" /></td>
142                 </tr>
143             </table>
144         </form>
145     </div>
146     <div class="help">
147         <h4>Defaults for this library</h4>
148         <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>
149     </div>
150     <div>
151         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
152             <input type="hidden" name="op" value="set-branch-defaults" />
153             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
154             <table>
155                 <tr>
156                     <th>&nbsp;</th>
157                     <th>Total Current Checkouts Allowed</th>
158                     <th>Hold Policy</th>
159                     <th>&nbsp;</th>
160                 </tr>
161                 <tr>
162                     <td><em>Defaults<!-- TMPL_UNLESS NAME="default_rules" --> (not set)<!-- /TMPL_IF --></em></td>
163                     <td><input name="maxissueqty" size="3" value="<!-- TMPL_VAR NAME="default_maxissueqty" -->"/></td>
164                     <td>
165                         <select name="holdallowed">
166                             <!-- TMPL_IF NAME="default_holdallowed_any" -->
167                             <option value="2" selected="selected">
168                             <!-- TMPL_ELSE -->
169                             <option value="2">
170                             <!-- /TMPL_IF -->
171                                 From Any Library
172                             </option>
173                             <!-- TMPL_IF NAME="default_holdallowed_same" -->
174                             <option value="1" selected="selected">
175                             <!-- TMPL_ELSE -->
176                             <option value="1">
177                             <!-- /TMPL_IF -->
178                                 From Home Library
179                             </option>
180                             <!-- TMPL_IF NAME="default_holdallowed_none" -->
181                             <option value="0" selected="selected">
182                             <!-- TMPL_ELSE -->
183                             <option value="0">
184                             <!-- /TMPL_IF -->
185                                 No Holds Allowed
186                             </option>
187                         </select>
188                     </td>
189                     <td><input type="submit" value="Save" class="submit" /></td>
190                     <td>
191                         <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>
192                     </td>
193                 </tr>
194             </table>
195         </form>
196     </div>
197     <!-- TMPL_IF NAME="show_branch_cat_rule_form" -->
198     <div class="help">
199         <p>For this library, you can specify the maximum number of loans that 
200             a patron of a given category can make, regardless of the item type.
201         </p>
202         <p>If the total amount loanable for a given patron category is left blank,
203            no limit applies, except possibly for a limit you define for a specific item type.
204         </p>
205     </div>
206     <div>
207         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
208             <input type="hidden" name="op" value="add-branch-cat" />
209             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
210             <table>
211                 <tr>
212                     <th>Patron Category</th>
213                     <th>Total Current Checkouts Allowed</th>
214                     <th>&nbsp;</th>
215                 </tr>
216                 <!-- TMPL_LOOP NAME="branch_cat_rule_loop" -->
217                     <!-- TMPL_UNLESS NAME="__odd__" -->
218                     <tr class="highlight">
219                     <!-- TMPL_ELSE -->
220                     <tr>
221                     <!-- /TMPL_UNLESS -->
222                         <td><!-- TMPL_IF NAME="default_humancategorycode" -->
223                                 <em>Default</em>
224                             <!-- TMPL_ELSE -->
225                                 <!-- TMPL_VAR NAME="humancategorycode" -->
226                             <!-- /TMPL_IF -->
227                         </td>
228                         <td><!-- TMPL_IF NAME="unlimited_maxissueqty" -->
229                                 Unlimited
230                             <!-- TMPL_ELSE -->
231                                 <!-- TMPL_VAR NAME="maxissueqty" -->
232                             <!-- /TMPL_IF -->
233                         </td>
234                         <td>
235                             <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>
236                         </td>
237                     </tr>
238                 <!-- /TMPL_LOOP -->
239                 <tr>
240                     <td>
241                         <select name="categorycode">
242                         <!-- TMPL_LOOP NAME="categoryloop" -->
243                             <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option>
244                         <!-- /TMPL_LOOP -->
245                         </select>
246                     </td>
247                     <td><input name="maxissueqty" size="3" /></td>
248                     <td><input type="submit" value="Add" class="submit" /></td>
249                 </tr>
250             </table>
251         </form>
252     </div>
253     <!-- /TMPL_IF -->
254     <div class="help">
255         <p>
256             For this library, you can edit rules for given itemtypes, regardless
257             of the patron's category.
258         </p>
259         <p>
260             Currently, this means hold policies.
261             The various policies have the following effects:
262         </p>
263         <ul>
264             <li><strong>From Any Library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li>
265             <li><strong>From Home Library:</strong> Only patrons from the item's home library may put this book on hold.</li>
266             <li><strong>No Holds Allowed:</strong> No patron may put this book on hold.</li>
267         </ul>
268         <p>
269             Note that if the system preference
270             <code>AllowHoldPolicyOverride</code> is enabled, these policies can
271             be overridden by your circulation staff. Also, these policies are
272             based on the patron's home branch, <em>not</em> the branch that
273             the reserving staff member is from.
274         </p>
275     </div>
276     <div>
277         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
278             <input type="hidden" name="op" value="add-branch-item" />
279             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
280             <table>
281                 <tr>
282                     <th>Item Type</th>
283                     <th>Hold Policy</th>
284                     <th>&nbsp;</th>
285                 </tr>
286                 <!-- TMPL_LOOP NAME="branch_item_rule_loop" -->
287                     <!-- TMPL_UNLESS NAME="__odd__" -->
288                     <tr class="highlight">
289                     <!-- TMPL_ELSE -->
290                     <tr>
291                     <!-- /TMPL_UNLESS -->
292                         <td><!-- TMPL_IF NAME="default_humanitemtype" -->
293                                 <em>Default</em>
294                             <!-- TMPL_ELSE -->
295                                 <!-- TMPL_VAR NAME="humanitemtype" -->
296                             <!-- /TMPL_IF -->
297                         </td>
298                         <td><!-- TMPL_IF NAME="holdallowed_any" -->
299                                 From Any Library
300                             <!-- TMPL_ELSIF NAME="holdallowed_same" -->
301                                 From Home Library
302                             <!-- TMPL_ELSE -->
303                                 No Holds Allowed
304                             <!-- /TMPL_IF -->
305                         </td>
306                         <td>
307                             <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>
308                         </td>
309                     </tr>
310                 <!-- /TMPL_LOOP -->
311                 <tr>
312                     <td>
313                         <select name="itemtype">
314                         <!-- TMPL_LOOP NAME="itemtypeloop" -->
315                             <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
316                         <!-- /TMPL_LOOP -->
317                         </select>
318                     </td>
319                     <td>
320                         <select name="holdallowed">
321                             <option value="2">From Any Library</option>
322                             <option value="1">From Home Library</option>
323                             <option value="0">No Holds Allowed</option>
324                         </select>
325                     </td>
326                     <td><input type="submit" value="Add" class="submit" /></td>
327                 </tr>
328             </table>
329         </form>
330     </div>
331 </div>
332
333 </div>
334 <div class="yui-b">
335 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
336 </div>
337 </div>
338 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->