eaa0d438f203d5904cb1261f89210f9eb92206fd
[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 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidden" name="frombranch" value="<!-- TMPL_VAR NAME="branch" -->" />
60             <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>
61
62         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
63             <input type="hidden" name="op" value="add" />
64             <table>
65             <tr>
66                 <th>Patron Category</th>
67                 <th>Item Type</th>
68                 <th>Current Checkouts Allowed</th>
69                 <th>Loan Period (day)</th>
70                 <th>Fine Amount</th>
71                 <th>Fine Charging Interval</th>
72                 <th>Fine Grace period (day)</th>
73                 <th>Suspension in Days (day)</th>
74                 <th>Renewals Allowed (count)</th>
75                 <th>Holds Allowed (count)</th>
76                         <th>Rental Discount (%)</th>
77                                 <th>&nbsp;</th>
78             </tr>
79                                 <!-- TMPL_LOOP NAME="rules" -->
80                                         <!-- TMPL_UNLESS NAME="__odd__" -->
81                                         <tr class="highlight">
82                                         <!-- TMPL_ELSE -->
83                                         <tr>
84                                         <!-- /TMPL_UNLESS -->
85                                                         <td><!-- TMPL_IF NAME="default_humancategorycode" -->
86                                                                         <em>All</em>
87                                                                 <!-- TMPL_ELSE -->
88                                                                         <!-- TMPL_VAR NAME="humancategorycode" -->
89                                                                 <!-- /TMPL_IF -->
90                                                         </td>
91                                                         <td><!-- TMPL_IF NAME="default_humanitemtype" -->
92                                                                         <em>All</em>
93                                                                 <!-- TMPL_ELSE -->
94                                                                         <!-- TMPL_VAR NAME="humanitemtype" -->
95                                                                 <!-- /TMPL_IF -->
96                                                         </td>
97                                                         <td><!-- TMPL_IF NAME="unlimited_maxissueqty" -->
98                                                                         Unlimited
99                                                                 <!-- TMPL_ELSE -->
100                                                                         <!-- TMPL_VAR NAME="maxissueqty" -->
101                                                                 <!-- /TMPL_IF -->
102                                                         </td>
103                                                         <td><!-- TMPL_VAR NAME="issuelength" --></td>
104                                                         <td><!-- TMPL_VAR NAME="fine" --></td>
105                                                         <td><!-- TMPL_VAR NAME="chargeperiod" --></td>
106                                                         <td><!-- TMPL_VAR NAME="firstremind" --></td>
107                                                         <td><!-- TMPL_VAR NAME="finedays" --></td>
108                                                         <td><!-- TMPL_VAR NAME="renewalsallowed" --></td>
109                                                         <td><!-- TMPL_VAR NAME="reservesallowed" --></td>
110                                                         <td><!-- TMPL_VAR NAME="rentaldiscount" --></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="*">All</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="*">All</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="maxissueqty" size="3" /></td>
134                     <td><input name="issuelength" size="3" /> </td>
135                     <td><input name="fine" size="4" /></td>
136                     <td><input name="chargeperiod" size="2" /></td>
137                     <td><input name="firstremind" size="2" /> </td>
138                     <td><input name="finedays" size="3" /> </td>
139                     <td><input name="renewalsallowed" size="2" /></td>
140                     <td><input name="reservesallowed" size="2" /></td>
141                     <td><input name="rentaldiscount" size="2" /></td>
142                     <td><input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/><input type="submit" value="Add" class="submit" /></td>
143                 </tr>
144             </table>
145         </form>
146     </div>
147     <div id="defaults-for-this-library" class="container">
148     <h3>Default checkout and hold policy for <!-- TMPL_IF NAME="humanbranch" --><!-- TMPL_VAR NAME="humanbranch" --><!-- TMPL_ELSE -->all libraries<!-- /TMPL_IF --></h3>
149         <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>
150         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
151             <input type="hidden" name="op" value="set-branch-defaults" />
152             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
153             <table>
154                 <tr>
155                     <th>&nbsp;</th>
156                     <th>Total Current Checkouts Allowed</th>
157                     <th>Hold Policy</th>
158                     <th>&nbsp;</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 type="text" 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 id="holds-policy-by-patron-category" class="container">
199     <h3>Checkout limit by patron category for <!-- TMPL_IF NAME="humanbranch" --><!-- TMPL_VAR NAME="humanbranch" --><!-- TMPL_ELSE -->all libraries<!-- /TMPL_IF --></h3>
200         <p>For this library, you can specify the maximum number of loans that
201             a patron of a given category can make, regardless of the item type.
202         </p>
203         <p>If the total amount loanable for a given patron category is left blank,
204            no limit applies, except possibly for a limit you define for a specific item type.
205         </p>
206         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
207             <input type="hidden" name="op" value="add-branch-cat" />
208             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
209             <table>
210                 <tr>
211                     <th>Patron Category</th>
212                     <th>Total Current Checkouts Allowed</th>
213                     <th>&nbsp;</th>
214                 </tr>
215                 <!-- TMPL_LOOP NAME="branch_cat_rule_loop" -->
216                     <!-- TMPL_UNLESS NAME="__odd__" -->
217                     <tr class="highlight">
218                     <!-- TMPL_ELSE -->
219                     <tr>
220                     <!-- /TMPL_UNLESS -->
221                         <td><!-- TMPL_IF NAME="default_humancategorycode" -->
222                                 <em>Default</em>
223                             <!-- TMPL_ELSE -->
224                                 <!-- TMPL_VAR NAME="humancategorycode" -->
225                             <!-- /TMPL_IF -->
226                         </td>
227                         <td><!-- TMPL_IF NAME="unlimited_maxissueqty" -->
228                                 Unlimited
229                             <!-- TMPL_ELSE -->
230                                 <!-- TMPL_VAR NAME="maxissueqty" -->
231                             <!-- /TMPL_IF -->
232                         </td>
233                         <td>
234                             <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>
235                         </td>
236                     </tr>
237                 <!-- /TMPL_LOOP -->
238                 <tr>
239                     <td>
240                         <select name="categorycode">
241                         <!-- TMPL_LOOP NAME="categoryloop" -->
242                             <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option>
243                         <!-- /TMPL_LOOP -->
244                         </select>
245                     </td>
246                     <td><input name="maxissueqty" size="3" /></td>
247                     <td><input type="submit" value="Add" class="submit" /></td>
248                 </tr>
249             </table>
250         </form>
251     </div>
252     <!-- /TMPL_IF -->
253     <div id="holds-policy-by-item-type" class="container">
254     <h3>Holds policy by item type for <!-- TMPL_IF NAME="humanbranch" --><!-- TMPL_VAR NAME="humanbranch" --><!-- TMPL_ELSE -->all libraries<!-- /TMPL_IF --></h3>
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 library, <em>not</em> the library where the hold is being placed..
273         </p>
274
275         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
276             <input type="hidden" name="op" value="add-branch-item" />
277             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
278             <table>
279                 <tr>
280                     <th>Item Type</th>
281                     <th>Hold Policy</th>
282                     <th>&nbsp;</th>
283                 </tr>
284                 <!-- TMPL_LOOP NAME="branch_item_rule_loop" -->
285                     <!-- TMPL_UNLESS NAME="__odd__" -->
286                     <tr class="highlight">
287                     <!-- TMPL_ELSE -->
288                     <tr>
289                     <!-- /TMPL_UNLESS -->
290                         <td><!-- TMPL_IF NAME="default_humanitemtype" -->
291                                 <em>Default</em>
292                             <!-- TMPL_ELSE -->
293                                 <!-- TMPL_VAR NAME="humanitemtype" -->
294                             <!-- /TMPL_IF -->
295                         </td>
296                         <td><!-- TMPL_IF NAME="holdallowed_any" -->
297                                 From Any Library
298                             <!-- TMPL_ELSIF NAME="holdallowed_same" -->
299                                 From Home Library
300                             <!-- TMPL_ELSE -->
301                                 No Holds Allowed
302                             <!-- /TMPL_IF -->
303                         </td>
304                         <td>
305                             <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>
306                         </td>
307                     </tr>
308                 <!-- /TMPL_LOOP -->
309                 <tr>
310                     <td>
311                         <select name="itemtype">
312                         <!-- TMPL_LOOP NAME="itemtypeloop" -->
313                             <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
314                         <!-- /TMPL_LOOP -->
315                         </select>
316                     </td>
317                     <td>
318                         <select name="holdallowed">
319                             <option value="2">From Any Library</option>
320                             <option value="1">From Home Library</option>
321                             <option value="0">No Holds Allowed</option>
322                         </select>
323                     </td>
324                     <td><input type="submit" value="Add" class="submit" /></td>
325                 </tr>
326             </table>
327         </form>
328     </div>
329 </div>
330
331 </div>
332 <div class="yui-b">
333 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
334 </div>
335 </div>
336 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->