Bug 5917 / Bug 6085 : Fixing not being able to change language
[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 <!-- Enable Calendar system -->
16 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-system.css" />
17 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar.js"></script>
18 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-en.js"></script>
19 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-setup.js"></script>
20 <!-- End Calendar system additions -->
21 </head>
22 <body>
23 <!-- TMPL_INCLUDE NAME="header.inc" -->
24 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
25
26 <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>
27
28 <div id="doc3" class="yui-t1">
29
30 <div id="bd">
31     <div id="yui-main">
32     <div class="yui-b">
33     <h1 class="parameters">
34         <!-- TMPL_IF NAME="humanbranch" -->
35             Defining circulation and fine rules for "<!-- TMPL_VAR NAME="humanbranch" -->"
36         <!-- TMPL_ELSE -->
37             Defining circulation and fine rules for all libraries
38         <!-- /TMPL_IF -->
39     </h1>
40     <div class="help">
41         <p>The rules are applied from most specific to less specific, using the first found in this order:</p>
42         <ul>
43             <li>same library, same patron type, same item type</li>
44             <li>same library, same patron type, all item types</li>
45             <li>same library, all patron types, same item type</li>
46             <li>same library, all patron types, all item types</li>
47             <li>all libraries, same patron type, same item type</li>
48             <li>all libraries, same patron type, all item types</li>
49             <li>all libraries, all patron types, same item type</li>
50             <li>all libraries, all patron types, all item types</li>
51         </ul>
52         <p>To modify a rule, create a new one with the same patron type and item type.</p>
53     </div>
54     <div>
55         <form method="get" action="/cgi-bin/koha/admin/smart-rules.pl" id="selectlibrary">
56         Select a library :
57             <select name="branch" id="branch" style="width:20em;">
58                 <option value="*">All libraries</option>
59             <!-- TMPL_LOOP NAME="branchloop" -->
60                                 <!-- 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 -->
61             <!-- /TMPL_LOOP -->
62             </select>
63         </form>
64 <!-- TMPL_IF Name="definedbranch" --><form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"><label 
65 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidden" name="frombranch" value="<!-- TMPL_VAR NAME="current_branch" -->" />
66             <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>
67
68         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
69             <input type="hidden" name="op" value="add" />
70             <table>
71             <tr>
72                 <th>Patron Category</th>
73                 <th>Item Type</th>
74                 <th>Current Checkouts Allowed</th>
75                 <th>Loan Period (day)</th>
76                 <th>Hard Due Date</th>
77                 <th>Fine Amount</th>
78                 <th>Fine Charging Interval</th>
79                 <th>Fine Grace period (day)</th>
80                 <th>Suspension in Days (day)</th>
81                 <th>Renewals Allowed (count)</th>
82                 <th>Holds Allowed (count)</th>
83                         <th>Rental Discount (%)</th>
84                                 <th>&nbsp;</th>
85             </tr>
86                                 <!-- TMPL_LOOP NAME="rules" -->
87                                         <!-- TMPL_UNLESS NAME="__odd__" -->
88                                         <tr class="highlight">
89                                         <!-- TMPL_ELSE -->
90                                         <tr>
91                                         <!-- /TMPL_UNLESS -->
92                                                         <td><!-- TMPL_IF NAME="default_humancategorycode" -->
93                                                                         <em>All</em>
94                                                                 <!-- TMPL_ELSE -->
95                                                                         <!-- TMPL_VAR NAME="humancategorycode" -->
96                                                                 <!-- /TMPL_IF -->
97                                                         </td>
98                                                         <td><!-- TMPL_IF NAME="default_humanitemtype" -->
99                                                                         <em>All</em>
100                                                                 <!-- TMPL_ELSE -->
101                                                                         <!-- TMPL_VAR NAME="humanitemtype" -->
102                                                                 <!-- /TMPL_IF -->
103                                                         </td>
104                                                         <td><!-- TMPL_IF NAME="unlimited_maxissueqty" -->
105                                                                         Unlimited
106                                                                 <!-- TMPL_ELSE -->
107                                                                         <!-- TMPL_VAR NAME="maxissueqty" -->
108                                                                 <!-- /TMPL_IF -->
109                                                         </td>
110                                                         <td><!-- TMPL_VAR NAME="issuelength" --></td>
111                                                         <td><!-- TMPL_IF NAME="hardduedate" -->
112                                                                <!-- TMPL_IF NAME="hardduedatebefore" -->before <!-- TMPL_VAR NAME="hardduedate" --></td>
113                                                                <!-- TMPL_ELSE --><!-- TMPL_IF NAME="hardduedateexact" -->on <!-- TMPL_VAR NAME="hardduedate" --></td>
114                                                                                  <!-- TMPL_ELSE --><!-- TMPL_IF NAME="hardduedateafter" -->after <!-- TMPL_VAR NAME="hardduedate" --></td><!-- /TMPL_IF -->
115                                                                                  <!-- /TMPL_IF -->
116                                                                <!-- /TMPL_IF -->
117                                                             <!-- TMPL_ELSE -->None defined<!-- /TMPL_IF -->   
118                                                         <td><!-- TMPL_VAR NAME="fine" --></td>
119                                                         <td><!-- TMPL_VAR NAME="chargeperiod" --></td>
120                                                         <td><!-- TMPL_VAR NAME="firstremind" --></td>
121                                                         <td><!-- TMPL_VAR NAME="finedays" --></td>
122                                                         <td><!-- TMPL_VAR NAME="renewalsallowed" --></td>
123                                                         <td><!-- TMPL_VAR NAME="reservesallowed" --></td>
124                                                         <td><!-- TMPL_VAR NAME="rentaldiscount" --></td>
125                                                         <td>
126                                                                 <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>
127                                                         </td>
128                         </tr>
129                 <!-- /TMPL_LOOP -->
130                 <tr>
131                     <td>
132                         <select name="categorycode">
133                             <option value="*">All</option>
134                         <!-- TMPL_LOOP NAME="categoryloop" -->
135                             <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option>
136                         <!-- /TMPL_LOOP -->
137                         </select>
138                     </td>
139                     <td>
140                         <select name="itemtype" style="width:13em;">
141                             <option value="*">All</option>
142                         <!-- TMPL_LOOP NAME="itemtypeloop" -->
143                             <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
144                         <!-- /TMPL_LOOP -->
145                         </select>
146                     </td>
147                     <td><input name="maxissueqty" size="3" /></td>
148                     <td><input name="issuelength" size="3" /> </td>
149                     <td><select name="hardduedatecompare">
150                            <option value="-1">Before</option>
151                            <option value="0">Exactly on</option>
152                            <option value="1">After</option>
153                         </select>
154                         <input type="text" size="10" id="hardduedate" name="hardduedate" value="<!-- TMPL_VAR NAME="hardduedate" -->" />
155                         <!-- TMPL_INCLUDE NAME="date-format.inc" -->
156                         <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar"  border="0" id="CalendarDueDate" style="cursor: pointer;"/>
157                         <script language="JavaScript" type="text/javascript">
158                              function refocus(calendar) {
159                                  document.getElementById('hardduedate').focus();
160                                  calendar.hide();
161                              };
162                              Calendar.setup(
163                              {
164                              inputField : "hardduedate",
165                              ifFormat : "%m/%d/%Y",
166                              button : "CalendarDueDate",
167                              onClose: refocus
168                              }
169                              );
170                  </script>
171                     </td>
172                     <td><input name="fine" size="4" /></td>
173                     <td><input name="chargeperiod" size="2" /></td>
174                     <td><input name="firstremind" size="2" /> </td>
175                     <td><input name="finedays" size="3" /> </td>
176                     <td><input name="renewalsallowed" size="2" /></td>
177                     <td><input name="reservesallowed" size="2" /></td>
178                     <td><input name="rentaldiscount" size="2" /></td>
179                     <td><input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="current_branch" -->"/><input type="submit" value="Add" class="submit" /></td>
180                 </tr>
181             </table>
182         </form>
183     </div>
184     <div id="defaults-for-this-library" class="container">
185     <h3>Default checkout and hold policy for <!-- TMPL_IF NAME="humanbranch" --><!-- TMPL_VAR NAME="humanbranch" --><!-- TMPL_ELSE -->all libraries<!-- /TMPL_IF --></h3>
186         <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>
187         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
188             <input type="hidden" name="op" value="set-branch-defaults" />
189             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="current_branch" -->"/>
190             <table>
191                 <tr>
192                     <th>&nbsp;</th>
193                     <th>Total Current Checkouts Allowed</th>
194                     <th>Hold Policy</th>
195                     <th>&nbsp;</th>
196                     <th>&nbsp;</th>
197                 </tr>
198                 <tr>
199                     <td><em>Defaults<!-- TMPL_UNLESS NAME="default_rules" --> (not set)<!-- /TMPL_IF --></em></td>
200                     <td><input type="text" name="maxissueqty" size="3" value="<!-- TMPL_VAR NAME="default_maxissueqty" -->"/></td>
201                     <td>
202                         <select name="holdallowed">
203                             <!-- TMPL_IF NAME="default_holdallowed_any" -->
204                             <option value="2" selected="selected">
205                             <!-- TMPL_ELSE -->
206                             <option value="2">
207                             <!-- /TMPL_IF -->
208                                 From Any Library
209                             </option>
210                             <!-- TMPL_IF NAME="default_holdallowed_same" -->
211                             <option value="1" selected="selected">
212                             <!-- TMPL_ELSE -->
213                             <option value="1">
214                             <!-- /TMPL_IF -->
215                                 From Home Library
216                             </option>
217                             <!-- TMPL_IF NAME="default_holdallowed_none" -->
218                             <option value="0" selected="selected">
219                             <!-- TMPL_ELSE -->
220                             <option value="0">
221                             <!-- /TMPL_IF -->
222                                 No Holds Allowed
223                             </option>
224                         </select>
225                     </td>
226                     <td><input type="submit" value="Save" class="submit" /></td>
227                     <td>
228                         <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>
229                     </td>
230                 </tr>
231             </table>
232         </form>
233     </div>
234     <!-- TMPL_IF NAME="show_branch_cat_rule_form" -->
235     <div id="holds-policy-by-patron-category" class="container">
236     <h3>Checkout limit by patron category for <!-- TMPL_IF NAME="humanbranch" --><!-- TMPL_VAR NAME="humanbranch" --><!-- TMPL_ELSE -->all libraries<!-- /TMPL_IF --></h3>
237         <p>For this library, you can specify the maximum number of loans that
238             a patron of a given category can make, regardless of the item type.
239         </p>
240         <p>If the total amount loanable for a given patron category is left blank,
241            no limit applies, except possibly for a limit you define for a specific item type.
242         </p>
243         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
244             <input type="hidden" name="op" value="add-branch-cat" />
245             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="current_branch" -->"/>
246             <table>
247                 <tr>
248                     <th>Patron Category</th>
249                     <th>Total Current Checkouts Allowed</th>
250                     <th>&nbsp;</th>
251                 </tr>
252                 <!-- TMPL_LOOP NAME="branch_cat_rule_loop" -->
253                     <!-- TMPL_UNLESS NAME="__odd__" -->
254                     <tr class="highlight">
255                     <!-- TMPL_ELSE -->
256                     <tr>
257                     <!-- /TMPL_UNLESS -->
258                         <td><!-- TMPL_IF NAME="default_humancategorycode" -->
259                                 <em>Default</em>
260                             <!-- TMPL_ELSE -->
261                                 <!-- TMPL_VAR NAME="humancategorycode" -->
262                             <!-- /TMPL_IF -->
263                         </td>
264                         <td><!-- TMPL_IF NAME="unlimited_maxissueqty" -->
265                                 Unlimited
266                             <!-- TMPL_ELSE -->
267                                 <!-- TMPL_VAR NAME="maxissueqty" -->
268                             <!-- /TMPL_IF -->
269                         </td>
270                         <td>
271                             <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>
272                         </td>
273                     </tr>
274                 <!-- /TMPL_LOOP -->
275                 <tr>
276                     <td>
277                         <select name="categorycode">
278                         <!-- TMPL_LOOP NAME="categoryloop" -->
279                             <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option>
280                         <!-- /TMPL_LOOP -->
281                         </select>
282                     </td>
283                     <td><input name="maxissueqty" size="3" /></td>
284                     <td><input type="submit" value="Add" class="submit" /></td>
285                 </tr>
286             </table>
287         </form>
288     </div>
289     <!-- /TMPL_IF -->
290     <div id="holds-policy-by-item-type" class="container">
291     <h3>Holds policy by item type for <!-- TMPL_IF NAME="humanbranch" --><!-- TMPL_VAR NAME="humanbranch" --><!-- TMPL_ELSE -->all libraries<!-- /TMPL_IF --></h3>
292         <p>
293             For this library, you can edit rules for given itemtypes, regardless
294             of the patron's category.
295         </p>
296         <p>
297             Currently, this means hold policies.
298             The various policies have the following effects:
299         </p>
300         <ul>
301             <li><strong>From Any Library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li>
302             <li><strong>From Home Library:</strong> Only patrons from the item's home library may put this book on hold.</li>
303             <li><strong>No Holds Allowed:</strong> No patron may put this book on hold.</li>
304         </ul>
305         <p>
306             Note that if the system preference
307             <code>AllowHoldPolicyOverride</code> is enabled, these policies can
308             be overridden by your circulation staff. Also, these policies are
309             based on the patron's home library, <em>not</em> the library where the hold is being placed..
310         </p>
311
312         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
313             <input type="hidden" name="op" value="add-branch-item" />
314             <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="current_branch" -->"/>
315             <table>
316                 <tr>
317                     <th>Item Type</th>
318                     <th>Hold Policy</th>
319                     <th>&nbsp;</th>
320                 </tr>
321                 <!-- TMPL_LOOP NAME="branch_item_rule_loop" -->
322                     <!-- TMPL_UNLESS NAME="__odd__" -->
323                     <tr class="highlight">
324                     <!-- TMPL_ELSE -->
325                     <tr>
326                     <!-- /TMPL_UNLESS -->
327                         <td><!-- TMPL_IF NAME="default_humanitemtype" -->
328                                 <em>Default</em>
329                             <!-- TMPL_ELSE -->
330                                 <!-- TMPL_VAR NAME="humanitemtype" -->
331                             <!-- /TMPL_IF -->
332                         </td>
333                         <td><!-- TMPL_IF NAME="holdallowed_any" -->
334                                 From Any Library
335                             <!-- TMPL_ELSIF NAME="holdallowed_same" -->
336                                 From Home Library
337                             <!-- TMPL_ELSE -->
338                                 No Holds Allowed
339                             <!-- /TMPL_IF -->
340                         </td>
341                         <td>
342                             <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>
343                         </td>
344                     </tr>
345                 <!-- /TMPL_LOOP -->
346                 <tr>
347                     <td>
348                         <select name="itemtype">
349                         <!-- TMPL_LOOP NAME="itemtypeloop" -->
350                             <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
351                         <!-- /TMPL_LOOP -->
352                         </select>
353                     </td>
354                     <td>
355                         <select name="holdallowed">
356                             <option value="2">From Any Library</option>
357                             <option value="1">From Home Library</option>
358                             <option value="0">No Holds Allowed</option>
359                         </select>
360                     </td>
361                     <td><input type="submit" value="Add" class="submit" /></td>
362                 </tr>
363             </table>
364         </form>
365     </div>
366 </div>
367
368 </div>
369 <div class="yui-b">
370 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
371 </div>
372 </div>
373 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->