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