Bug 5824: Creating a circ rule for a specific library causes anomalies
[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; Circulation and Fine 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; Circulation and Fine 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 circulation and fine rules for "<!-- TMPL_VAR NAME="humanbranch" -->"
31         <!-- TMPL_ELSE -->
32             Defining circulation and fine rules for all libraries
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, all item types</li>
40             <li>same library, all patron types, same item type</li>
41             <li>same library, all patron types, all item types</li>
42             <li>all libraries, same patron type, same item type</li>
43             <li>all libraries, same patron type, all item types</li>
44             <li>all libraries, all patron types, same item type</li>
45             <li>all libraries, all patron types, all item types</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>
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="*">All libraries</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 <!-- TMPL_IF Name="definedbranch" --><form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"><label 
60 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidden" name="frombranch" value="<!-- TMPL_VAR NAME="current_branch" -->" />
61             <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>
62
63         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
64             <input type="hidden" name="op" value="add" />
65             <table>
66             <tr>
67                 <th>Patron Category</th>
68                 <th>Item Type</th>
69                 <th>Current Checkouts Allowed</th>
70                 <th>Loan Period (day)</th>
71                 <th>Fine Amount</th>
72                 <th>Fine Charging Interval</th>
73                 <th>Fine Grace period (day)</th>
74                 <th>Suspension in Days (day)</th>
75                 <th>Renewals Allowed (count)</th>
76                 <th>Holds Allowed (count)</th>
77                         <th>Rental Discount (%)</th>
78                                 <th>&nbsp;</th>
79             </tr>
80                                 <!-- TMPL_LOOP NAME="rules" -->
81                                         <!-- TMPL_UNLESS NAME="__odd__" -->
82                                         <tr class="highlight">
83                                         <!-- TMPL_ELSE -->
84                                         <tr>
85                                         <!-- /TMPL_UNLESS -->
86                                                         <td><!-- TMPL_IF NAME="default_humancategorycode" -->
87                                                                         <em>All</em>
88                                                                 <!-- TMPL_ELSE -->
89                                                                         <!-- TMPL_VAR NAME="humancategorycode" -->
90                                                                 <!-- /TMPL_IF -->
91                                                         </td>
92                                                         <td><!-- TMPL_IF NAME="default_humanitemtype" -->
93                                                                         <em>All</em>
94                                                                 <!-- TMPL_ELSE -->
95                                                                         <!-- TMPL_VAR NAME="humanitemtype" -->
96                                                                 <!-- /TMPL_IF -->
97                                                         </td>
98                                                         <td><!-- TMPL_IF NAME="unlimited_maxissueqty" -->
99                                                                         Unlimited
100                                                                 <!-- TMPL_ELSE -->
101                                                                         <!-- TMPL_VAR NAME="maxissueqty" -->
102                                                                 <!-- /TMPL_IF -->
103                                                         </td>
104                                                         <td><!-- TMPL_VAR NAME="issuelength" --></td>
105                                                         <td><!-- TMPL_VAR NAME="fine" --></td>
106                                                         <td><!-- TMPL_VAR NAME="chargeperiod" --></td>
107                                                         <td><!-- TMPL_VAR NAME="firstremind" --></td>
108                                                         <td><!-- TMPL_VAR NAME="finedays" --></td>
109                                                         <td><!-- TMPL_VAR NAME="renewalsallowed" --></td>
110                                                         <td><!-- TMPL_VAR NAME="reservesallowed" --></td>
111                                                         <td><!-- TMPL_VAR NAME="rentaldiscount" --></td>
112                                                         <td>
113                                                                 <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="current_branch" -->">Delete</a>
114                                                         </td>
115                         </tr>
116                 <!-- /TMPL_LOOP -->
117                 <tr>
118                     <td>
119                         <select name="categorycode">
120                             <option value="*">All</option>
121                         <!-- TMPL_LOOP NAME="categoryloop" -->
122                             <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option>
123                         <!-- /TMPL_LOOP -->
124                         </select>
125                     </td>
126                     <td>
127                         <select name="itemtype" style="width:13em;">
128                             <option value="*">All</option>
129                         <!-- TMPL_LOOP NAME="itemtypeloop" -->
130                             <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
131                         <!-- /TMPL_LOOP -->
132                         </select>
133                     </td>
134                     <td><input name="maxissueqty" size="3" /></td>
135                     <td><input name="issuelength" size="3" /> </td>
136                     <td><input name="fine" size="4" /></td>
137                     <td><input name="chargeperiod" size="2" /></td>
138                     <td><input name="firstremind" size="2" /> </td>
139                     <td><input name="finedays" size="3" /> </td>
140                     <td><input name="renewalsallowed" size="2" /></td>
141                     <td><input name="reservesallowed" size="2" /></td>
142                     <td><input name="rentaldiscount" size="2" /></td>
143                     <td><input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="current_branch" -->"/><input type="submit" value="Add" class="submit" /></td>
144                 </tr>
145             </table>
146         </form>
147     </div>
148     <div id="defaults-for-this-library" class="container">
149     <h3>Default checkout and hold policy for <!-- TMPL_IF NAME="humanbranch" --><!-- TMPL_VAR NAME="humanbranch" --><!-- TMPL_ELSE -->all libraries<!-- /TMPL_IF --></h3>
150         <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>
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="current_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                     <th>&nbsp;</th>
161                 </tr>
162                 <tr>
163                     <td><em>Defaults<!-- TMPL_UNLESS NAME="default_rules" --> (not set)<!-- /TMPL_IF --></em></td>
164                     <td><input type="text" name="maxissueqty" size="3" value="<!-- TMPL_VAR NAME="default_maxissueqty" -->"/></td>
165                     <td>
166                         <select name="holdallowed">
167                             <!-- TMPL_IF NAME="default_holdallowed_any" -->
168                             <option value="2" selected="selected">
169                             <!-- TMPL_ELSE -->
170                             <option value="2">
171                             <!-- /TMPL_IF -->
172                                 From Any Library
173                             </option>
174                             <!-- TMPL_IF NAME="default_holdallowed_same" -->
175                             <option value="1" selected="selected">
176                             <!-- TMPL_ELSE -->
177                             <option value="1">
178                             <!-- /TMPL_IF -->
179                                 From Home Library
180                             </option>
181                             <!-- TMPL_IF NAME="default_holdallowed_none" -->
182                             <option value="0" selected="selected">
183                             <!-- TMPL_ELSE -->
184                             <option value="0">
185                             <!-- /TMPL_IF -->
186                                 No Holds Allowed
187                             </option>
188                         </select>
189                     </td>
190                     <td><input type="submit" value="Save" class="submit" /></td>
191                     <td>
192                         <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&amp;categorycode=*&amp;branch=<!-- TMPL_VAR NAME="current_branch" -->">Unset</a>
193                     </td>
194                 </tr>
195             </table>
196         </form>
197     </div>
198     <!-- TMPL_IF NAME="show_branch_cat_rule_form" -->
199     <div id="holds-policy-by-patron-category" class="container">
200     <h3>Checkout limit by patron category for <!-- TMPL_IF NAME="humanbranch" --><!-- TMPL_VAR NAME="humanbranch" --><!-- TMPL_ELSE -->all libraries<!-- /TMPL_IF --></h3>
201         <p>For this library, you can specify the maximum number of loans that
202             a patron of a given category can make, regardless of the item type.
203         </p>
204         <p>If the total amount loanable for a given patron category is left blank,
205            no limit applies, except possibly for a limit you define for a specific item type.
206         </p>
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="current_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="current_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 id="holds-policy-by-item-type" class="container">
255     <h3>Holds policy by item type for <!-- TMPL_IF NAME="humanbranch" --><!-- TMPL_VAR NAME="humanbranch" --><!-- TMPL_ELSE -->all libraries<!-- /TMPL_IF --></h3>
256         <p>
257             For this library, you can edit rules for given itemtypes, regardless
258             of the patron's category.
259         </p>
260         <p>
261             Currently, this means hold policies.
262             The various policies have the following effects:
263         </p>
264         <ul>
265             <li><strong>From Any Library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li>
266             <li><strong>From Home Library:</strong> Only patrons from the item's home library may put this book on hold.</li>
267             <li><strong>No Holds Allowed:</strong> No patron may put this book on hold.</li>
268         </ul>
269         <p>
270             Note that if the system preference
271             <code>AllowHoldPolicyOverride</code> is enabled, these policies can
272             be overridden by your circulation staff. Also, these policies are
273             based on the patron's home library, <em>not</em> the library where the hold is being placed..
274         </p>
275
276         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
277             <input type="hidden" name="op" value="add-branch-item" />
278             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="current_branch" -->"/>
279             <table>
280                 <tr>
281                     <th>Item Type</th>
282                     <th>Hold Policy</th>
283                     <th>&nbsp;</th>
284                 </tr>
285                 <!-- TMPL_LOOP NAME="branch_item_rule_loop" -->
286                     <!-- TMPL_UNLESS NAME="__odd__" -->
287                     <tr class="highlight">
288                     <!-- TMPL_ELSE -->
289                     <tr>
290                     <!-- /TMPL_UNLESS -->
291                         <td><!-- TMPL_IF NAME="default_humanitemtype" -->
292                                 <em>Default</em>
293                             <!-- TMPL_ELSE -->
294                                 <!-- TMPL_VAR NAME="humanitemtype" -->
295                             <!-- /TMPL_IF -->
296                         </td>
297                         <td><!-- TMPL_IF NAME="holdallowed_any" -->
298                                 From Any Library
299                             <!-- TMPL_ELSIF NAME="holdallowed_same" -->
300                                 From Home Library
301                             <!-- TMPL_ELSE -->
302                                 No Holds Allowed
303                             <!-- /TMPL_IF -->
304                         </td>
305                         <td>
306                             <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="current_branch" -->">Delete</a>
307                         </td>
308                     </tr>
309                 <!-- /TMPL_LOOP -->
310                 <tr>
311                     <td>
312                         <select name="itemtype">
313                         <!-- TMPL_LOOP NAME="itemtypeloop" -->
314                             <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
315                         <!-- /TMPL_LOOP -->
316                         </select>
317                     </td>
318                     <td>
319                         <select name="holdallowed">
320                             <option value="2">From Any Library</option>
321                             <option value="1">From Home Library</option>
322                             <option value="0">No Holds Allowed</option>
323                         </select>
324                     </td>
325                     <td><input type="submit" value="Add" class="submit" /></td>
326                 </tr>
327             </table>
328         </form>
329     </div>
330 </div>
331
332 </div>
333 <div class="yui-b">
334 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
335 </div>
336 </div>
337 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->