Bug 13590: Add missing th in tfoot
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / smart-rules.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo; Circulation and fine rules</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <script type="text/javascript">
6 //<![CDATA[
7
8 function clear_edit(){
9     var cancel = confirm(_("Are you sure you want to cancel your changes?"));
10     if ( !cancel ) return;
11     $('#default-circulation-rules td').removeClass('highlighted-row');
12     var edit_row = $("#edit_row");
13     $(edit_row).find("input").each(function(){
14         var type = $(this).attr("type");
15         if (type != "button" && type != "submit" ) {
16             $(this).val("");
17             $(this).removeAttr("disabled");
18         }
19     });
20     $(edit_row).find("select").removeAttr("disabled");
21     $(edit_row).find("select option:first").attr("selected", "selected");
22     $(edit_row).find("td:last input[name='clear']").remove();
23 }
24
25 $(document).ready(function() {
26         $('#selectlibrary').find("input:submit").hide();
27         $('#branch').change(function() {
28                 $('#selectlibrary').submit();
29         });
30         $(".editrule").click(function(){
31             if ( $(edit_row).find("input[type='text'][value!='']").length > 0 ) {
32                 var edit = confirm(_("Are you sure you want to edit another rule?"));
33                 if (!edit) return false;
34             }
35             $('#default-circulation-rules td').removeClass('highlighted-row');
36             $(this).parent().parent().find("td").each(function (i) {
37                 $(this).addClass('highlighted-row');
38                 itm = $(this).text();
39                 itm = itm.replace(/^\s*|\s*$/g,'');
40                 var current_column = $("#edit_row td:eq("+i+")");
41                 if ( i != 6 ) {
42                     $(current_column).find("input[type='text']").val(itm);
43                     // select the corresponding option
44                     $(current_column).find("select option").each(function(){
45                         opt = $(this).text().toLowerCase();
46                         opt = opt.replace(/^\s*|\s*$/g,'');
47                         if ( opt == itm.toLowerCase() ) {
48                             $(this).attr('selected', 'selected');
49                         }
50                     });
51                     if ( i == 0 || i == 1 ) {
52                         // Disable the 2 first columns, we cannot update them.
53                         var val = $(current_column).find("select option:selected").val();
54                         var name = "categorycode";
55                         if ( i == 1 ) {
56                             name="itemtype";
57                         }
58                         // Remove potential previous input added
59                         $(current_column).find("input").remove();
60                         $(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />");
61                     } else if ( i == 2 || i == 3 ) {
62                         // If the value is not an integer for "Current checkouts allowed" or "Current on-site checkouts allowed"
63                         // The value is "Unlimited" (or an equivalent translated string)
64                         // an it should be set to an empty string
65                         if( !((parseFloat(itm) == parseInt(itm)) && !isNaN(itm)) ) {
66                             $(current_column).find("input[type='text']").val("");
67                         }
68                     }
69                 } else {
70                     // specific processing for the Hard due date column
71                     var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val();
72                     var input_value = '';
73                     if (typeof select_value === 'undefined'){
74                         select_value = '-1';
75                     }else {
76                         input_value = itm.split(' ')[1];
77                     }
78                     $(current_column).find("input[type='text']").val(input_value);
79                     $(current_column).find("select").val(select_value);
80                 }
81             });
82             $("#default-circulation-rules tr:last td:eq(0) select").attr('disabled', 'disabled');
83             $("#default-circulation-rules tr:last td:eq(1) select").attr('disabled', 'disabled');
84             return false;
85         });
86 });
87 //]]>
88 </script>
89 </head>
90 <body id="admin_smart-rules" class="admin">
91 [% INCLUDE 'header.inc' %]
92 [% INCLUDE 'cat-search.inc' %]
93
94 <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>
95
96 <div id="doc3" class="yui-t1">
97
98 <div id="bd">
99     <div id="yui-main">
100     <div class="yui-b">
101     <h1 class="parameters">
102         [% IF ( humanbranch ) %]
103             Defining circulation and fine rules for "[% humanbranch %]"
104         [% ELSE %]
105             Defining circulation and fine rules for all libraries
106         [% END %]
107     </h1>
108     <div class="help">
109         <p>The rules are applied from most specific to less specific, using the first found in this order:</p>
110         <ul>
111             <li>same library, same patron type, same item type</li>
112             <li>same library, same patron type, all item types</li>
113             <li>same library, all patron types, same item type</li>
114             <li>same library, all patron types, all item types</li>
115             <li>default (all libraries), same patron type, same item type</li>
116             <li>default (all libraries), same patron type, all item types</li>
117             <li>default (all libraries), all patron types, same item type</li>
118             <li>default (all libraries), all patron types, all item types</li>
119         </ul>
120         <p>To modify a rule, create a new one with the same patron type and item type.</p>
121     </div>
122     <div>
123         <form method="get" action="/cgi-bin/koha/admin/smart-rules.pl" id="selectlibrary">
124         Select a library :
125             <select name="branch" id="branch" style="width:20em;">
126                 <option value="*">All libraries</option>
127             [% FOREACH branchloo IN branchloop %]
128                                 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
129             [% END %]
130             </select>
131         </form>
132 [% IF ( definedbranch ) %]<form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"><label 
133 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidden" name="frombranch" value="[% current_branch %]" />
134             <select name="tobranch" id="tobranch">[% FOREACH branchloo IN branchloop %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]</select> <input type="submit" value="Clone" /></form>[% END %]
135
136         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
137             <input type="hidden" name="op" value="add" />
138             <input type="hidden" name="branch" value="[% current_branch %]"/>
139             <table id="default-circulation-rules">
140             <thead>
141             <tr>
142                 <th>Patron category</th>
143                 <th>Item type</th>
144                 <th>Current checkouts allowed</th>
145                 <th>Current on-site checkouts allowed</th>
146                 <th>Loan period</th>
147                 <th>Unit</th>
148                 <th>Hard due date</th>
149                 <th>Fine amount</th>
150                 <th>Fine charging interval</th>
151                 <th>Charge when?</th>
152                 <th>Fine grace period</th>
153                 <th>Overdue fines cap (amount)</th>
154                 <th>Suspension in days (day)</th>
155                 <th>Max. suspension duration (day)</th>
156                 <th>Renewals allowed (count)</th>
157                 <th>Renewal period</th>
158                 <th>No renewal before</th>
159                 <th>Automatic renewal</th>
160                 <th>Holds allowed (count)</th>
161                 <th>On shelf holds allowed</th>
162                 <th>Item level holds</th>
163                 <th>Rental discount (%)</th>
164                 <th colspan="2">&nbsp;</th>
165             </tr>
166             </thead>
167             <tbody>
168                                 [% FOREACH rule IN rules %]
169                                         <tr id="row_[% loop.count %]">
170                                                         <td>[% IF ( rule.default_humancategorycode ) %]
171                                                                         <em>All</em>
172                                                                 [% ELSE %]
173                                                                         [% rule.humancategorycode %]
174                                                                 [% END %]
175                                                         </td>
176                                                         <td>[% IF ( rule.default_humanitemtype ) %]
177                                                                         <em>All</em>
178                                                                 [% ELSE %]
179                                                                         [% rule.humanitemtype %]
180                                                                 [% END %]
181                                                         </td>
182                                                         <td>[% IF ( rule.unlimited_maxissueqty ) %]
183                                                                         Unlimited
184                                                                 [% ELSE %]
185                                                                         [% rule.maxissueqty %]
186                                                                 [% END %]
187                                                         </td>
188                             <td>[% IF rule.unlimited_maxonsiteissueqty %]
189                                     Unlimited
190                                 [% ELSE %]
191                                     [% rule.maxonsiteissueqty %]
192                                 [% END %]
193                             </td>
194                                                         <td>[% rule.issuelength %]</td>
195                                                         <td>
196                                                             [% rule.lengthunit %]
197                                                         </td>
198                             <td>
199                               [% IF ( rule.hardduedate ) %]
200                                 [% IF ( rule.hardduedatebefore ) %]
201                                   before [% rule.hardduedate %]
202                                   <input type="hidden" name="hardduedatecomparebackup" value="-1" />
203                                 [% ELSIF ( rule.hardduedateexact ) %]
204                                   on [% rule.hardduedate %]
205                                   <input type="hidden" name="hardduedatecomparebackup" value="0" />
206                                 [% ELSIF ( rule.hardduedateafter ) %]
207                                   after [% rule.hardduedate %]
208                                   <input type="hidden" name="hardduedatecomparebackup" value="1" />
209                                 [% END %]
210                               [% ELSE %]
211                                 None defined
212                               [% END %]
213                             </td>
214                                                         <td>[% rule.fine %]</td>
215                                                         <td>[% rule.chargeperiod %]</td>
216                 <td>[% IF rule.chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td>
217                                                         <td>[% rule.firstremind %]</td>
218                             <td>[% rule.overduefinescap FILTER format("%.2f") %]</td>
219                                                         <td>[% rule.finedays %]</td>
220                             <td>[% rule.maxsuspensiondays %]</td>
221                                                         <td>[% rule.renewalsallowed %]</td>
222                             <td>[% rule.renewalperiod %]</td>
223                             <td>[% rule.norenewalbefore %]</td>
224                             <td>
225                                 [% IF ( rule.auto_renew ) %]
226                                 Yes
227                                 [% ELSE %]
228                                 No
229                                 [% END %]
230                             </td>
231                                                         <td>[% rule.reservesallowed %]</td>
232                                                         <td>[% IF rule.onshelfholds %]Yes[% ELSE %]No[% END %]</td>
233                                                         <td>[% IF rule.opacitemholds == 'F'%]Force[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %]</td>
234                                                         <td>[% rule.rentaldiscount %]</td>
235                             <td><a href="#" class="editrule">Edit</a></td>
236                                                         <td>
237                                                                 <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&amp;itemtype=[% rule.itemtype %]&amp;categorycode=[% rule.categorycode %]&amp;branch=[% rule.current_branch %]">Delete</a>
238                                                         </td>
239                         </tr>
240                 [% END %]
241                 <tr id="edit_row">
242                     <td>
243                         <select name="categorycode" id="categorycode">
244                             <option value="*">All</option>
245                         [% FOREACH categoryloo IN categoryloop %]
246                             <option value="[% categoryloo.categorycode %]">[% categoryloo.description %]</option>
247                         [% END %]
248                         </select>
249                     </td>
250                     <td>
251                         <select name="itemtype" id="matrixitemtype" style="width:13em;">
252                             <option value="*">All</option>
253                         [% FOREACH itemtypeloo IN itemtypeloop %]
254                             <option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.description %]</option>
255                         [% END %]
256                         </select>
257                     </td>
258                     <td><input type="text" name="maxissueqty" id="maxissueqty" size="3" /></td>
259                     <td><input type="text" name="maxonsiteissueqty" id="maxonsiteissueqty" size="3" /></td>
260                     <td><input type="text" name="issuelength" id="issuelength" size="3" /> </td>
261                     <td>
262                       <select name="lengthunit" id="lengthunit">
263                         <option value="days" selected="selected">Days</option>
264                         <option value="hours">Hours</option>
265                       </select>
266                     </td>
267                     <td>
268                         <select name="hardduedatecompare" id="hardduedatecompare">
269                            <option value="-1">Before</option>
270                            <option value="0">Exactly on</option>
271                            <option value="1">After</option>
272                         </select>
273                         <input type="text" size="10" id="hardduedate" name="hardduedate" value="[% hardduedate %]" class="datepicker" />
274                         <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
275                     </td>
276                     <td><input type="text" name="fine" id="fine" size="4" /></td>
277                     <td><input type="text" name="chargeperiod" id="chargeperiod" size="2" /></td>
278                     <td>
279                         <select name="chargeperiod_charge_at" id="chargeperiod_charge_at">
280                            <option value="0">End of interval</option>
281                            <option value="1">Start of interval</option>
282                         </select>
283                     </td>
284                     <td><input type="text" name="firstremind" id="firstremind" size="2" /> </td>
285                     <td><input type="text" name="overduefinescap" id="overduefinescap" size="6" /> </td>
286                     <td><input type="text" name="finedays" id="fined" size="3" /> </td>
287                     <td><input type="text" name="maxsuspensiondays" id="maxsuspensiondays" size="3" /> </td>
288                     <td><input type="text" name="renewalsallowed" id="renewalsallowed" size="2" /></td>
289                     <td><input type="text" name="renewalperiod" id="renewalperiod" size="3" /></td>
290                     <td><input type="text" name="norenewalbefore" id="norenewalbefore" size="3" /></td>
291                     <td>
292                         <select name="auto_renew" id="auto_renew">
293                             <option value="no" selected>No</option>
294                             <option value="yes">Yes</option>
295                         </select>
296                     </td>
297                     <td><input type="text" name="reservesallowed" id="reservesallowed" size="2" /></td>
298                     <td>
299                         <select name="onshelfholds" id="onshelfholds">
300                             <option value="0" selected>No</option>
301                             <option value="1">Yes</option>
302                         </select>
303                     </td>
304                     <td>
305                         <select id="opacitemholds" name="opacitemholds">
306                             <option value="N">Don't allow</option>
307                             <option value="Y">Allow</option>
308                             <option value="F">Force</option>
309                         </select>
310                     </td>
311                     <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
312                     <td colspan="2">
313                         <input type="hidden" name="branch" value="[% current_branch %]"/>
314                         <input type="submit" value="Save" class="submit" />
315                         <input type="button" name="cancel" value="Clear" onclick="clear_edit();return false;" />
316                     </td>
317                 </tr>
318                 <tfoot>
319                     <tr>
320                       <th>Patron category</th>
321                       <th>Item type</th>
322                       <th>Current checkouts allowed</th>
323                       <th>Current on-site checkouts allowed</th>
324                       <th>Loan period</th>
325                       <th>Unit</th>
326                       <th>Hard due date</th>
327                       <th>Fine amount</th>
328                       <th>Fine charging interval</th>
329                       <th>Charge when?</th>
330                       <th>Fine grace period</th>
331                       <th>Overdue fines cap (amount)</th>
332                       <th>Suspension in days (day)</th>
333                       <th>Max. suspension duration (day)</th>
334                       <th>Renewals allowed (count)</th>
335                       <th>Renewal period</th>
336                       <th>No renewal before</th>
337                       <th>Automatic renewal</th>
338                       <th>Holds allowed (count)</th>
339                       <th>On shelf holds allowed</th>
340                       <th>Item level holds</th>
341                       <th>Rental discount (%)</th>
342                       <th colspan="2">&nbsp;</th>
343                     </tr>
344                   </tfoot>
345                 </tbody>
346             </table>
347         </form>
348     </div>
349     <div id="defaults-for-this-library" class="container">
350     <h3>Default checkout, hold and return policy[% IF ( humanbranch ) %] for [% humanbranch %][% END %]</h3>
351         <p>You can set a default maximum number of checkouts, hold policy and return policy that will be used if none is defined below for a particular item type or category.</p>
352         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
353             <input type="hidden" name="op" value="set-branch-defaults" />
354             <input type="hidden" name="branch" value="[% current_branch %]"/>
355             <table>
356                 <tr>
357                     <th>&nbsp;</th>
358                     <th>Total current checkouts allowed</th>
359                     <th>Total current on-site checkouts allowed</th>
360                     <th>Hold policy</th>
361                     <th>Return policy</th>
362                     <th>&nbsp;</th>
363                     <th>&nbsp;</th>
364                 </tr>
365                 <tr>
366                     <td><em>Defaults[% UNLESS ( default_rules ) %] (not set)[% END %]</em></td>
367                     <td><input type="text" name="maxissueqty" size="3" value="[% default_maxissueqty %]"/></td>
368                     <td><input type="text" name="maxonsiteissueqty" size="3" value="[% default_maxonsiteissueqty %]"/></td>
369                     <td>
370                         <select name="holdallowed">
371                             [% IF ( default_holdallowed_any ) %]
372                             <option value="2" selected="selected">
373                             [% ELSE %]
374                             <option value="2">
375                             [% END %]
376                                 From any library
377                             </option>
378                             [% IF ( default_holdallowed_same ) %]
379                             <option value="1" selected="selected">
380                             [% ELSE %]
381                             <option value="1">
382                             [% END %]
383                                 From home library
384                             </option>
385                             [% IF ( default_holdallowed_none ) %]
386                             <option value="0" selected="selected">
387                             [% ELSE %]
388                             <option value="0">
389                             [% END %]
390                                 No holds allowed
391                             </option>
392                         </select>
393                     </td>
394                     <td>
395                         <select name="returnbranch">
396                             [% IF ( default_returnbranch == 'homebranch' ) %]
397                             <option value="homebranch" selected="selected">
398                             [% ELSE %]
399                             <option value="homebranch">
400                             [% END %]
401                                 Item returns home
402                             </option>
403                             [% IF ( default_returnbranch == 'holdingbranch' ) %]
404                             <option value="holdingbranch" selected="selected">
405                             [% ELSE %]
406                             <option value="holdingbranch">
407                             [% END %]
408                                 Item returns to issuing library
409                             </option>
410                             [% IF ( default_returnbranch == 'noreturn' ) %]
411                             <option value="noreturn" selected="selected">
412                             [% ELSE %]
413                             <option value="noreturn">
414                             [% END %]
415                                 Item floats
416                             </option>
417                         </select>
418                     </td>
419                     <td><input type="submit" value="Save" class="submit" /></td>
420                     <td>
421                         <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&amp;categorycode=*&amp;branch=[% current_branch %]">Unset</a>
422                     </td>
423                 </tr>
424             </table>
425         </form>
426     </div>
427     [% IF ( show_branch_cat_rule_form ) %]
428     <div id="holds-policy-by-patron-category" class="container">
429     <h3>[% IF humanbranch %]Checkout limit by patron category for [% humanbranch %][% ELSE %]Default checkout limit by patron category[% END %]</h3>
430         <p>For this library, you can specify the maximum number of loans that
431             a patron of a given category can make, regardless of the item type.
432         </p>
433         <p>If the total amount loanable for a given patron category is left blank,
434            no limit applies, except possibly for a limit you define for a specific item type.
435         </p>
436         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
437             <input type="hidden" name="op" value="add-branch-cat" />
438             <input type="hidden" name="branch" value="[% current_branch %]"/>
439             <table>
440                 <tr>
441                     <th>Patron category</th>
442                     <th>Total current checkouts allowed</th>
443                     <th>Total current on-site checkouts allowed</th>
444                     <th>&nbsp;</th>
445                 </tr>
446                 [% FOREACH branch_cat_rule_loo IN branch_cat_rule_loop %]
447                     [% UNLESS ( loop.odd ) %]
448                     <tr class="highlight">
449                     [% ELSE %]
450                     <tr>
451                     [% END %]
452                         <td>[% IF ( branch_cat_rule_loo.default_humancategorycode ) %]
453                                 <em>Default</em>
454                             [% ELSE %]
455                                 [% branch_cat_rule_loo.humancategorycode %]
456                             [% END %]
457                         </td>
458                         <td>[% IF ( branch_cat_rule_loo.unlimited_maxissueqty ) %]
459                                 Unlimited
460                             [% ELSE %]
461                                 [% branch_cat_rule_loo.maxissueqty %]
462                             [% END %]
463                         </td>
464                         <td>[% IF ( branch_cat_rule_loo.unlimited_maxonsiteissueqty ) %]
465                                 Unlimited
466                             [% ELSE %]
467                                 [% branch_cat_rule_loo.maxonsiteissueqty %]
468                             [% END %]
469                         </td>
470
471                         <td>
472                             <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&amp;categorycode=[% branch_cat_rule_loo.categorycode %]&amp;branch=[% current_branch %]">Delete</a>
473                         </td>
474                     </tr>
475                 [% END %]
476                 <tr>
477                     <td>
478                         <select name="categorycode">
479                         [% FOREACH categoryloo IN categoryloop %]
480                             <option value="[% categoryloo.categorycode %]">[% categoryloo.description %]</option>
481                         [% END %]
482                         </select>
483                     </td>
484                     <td><input name="maxissueqty" size="3" /></td>
485                     <td><input name="maxonsiteissueqty" size="3" /></td>
486                     <td><input type="submit" value="Add" class="submit" /></td>
487                 </tr>
488             </table>
489         </form>
490     </div>
491     [% END %]
492     <div id="holds-policy-by-item-type" class="container">
493     <h3>[% IF humanbranch %]Holds policy by item type for [% humanbranch %][% ELSE %]Default holds policy by item type[% END %]</h3>
494         <p>
495             For this library, you can edit rules for given itemtypes, regardless
496             of the patron's category.
497         </p>
498         <p>
499             Currently, this means hold policies.
500             The various policies have the following effects:
501         </p>
502         <ul>
503             <li><strong>From any library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li>
504             <li><strong>From home library:</strong> Only patrons from the item's home library may put this book on hold.</li>
505             <li><strong>No holds allowed:</strong> No patron may put this book on hold.</li>
506         </ul>
507         <p>
508             Note that if the system preference
509             <code>AllowHoldPolicyOverride</code> is enabled, these policies can
510             be overridden by your circulation staff. Also, these policies are
511             based on the patron's home library, <em>not</em> the library where the hold is being placed..
512         </p>
513
514         <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
515             <input type="hidden" name="op" value="add-branch-item" />
516             <input type="hidden" name="branch" value="[% current_branch %]"/>
517             <table>
518                 <tr>
519                     <th>Item type</th>
520                     <th>Hold policy</th>
521                     <th>Return policy</th>
522                     <th>&nbsp;</th>
523                 </tr>
524                 [% FOREACH branch_item_rule_loo IN branch_item_rule_loop %]
525                     [% UNLESS ( loop.odd ) %]
526                     <tr class="highlight">
527                     [% ELSE %]
528                     <tr>
529                     [% END %]
530                         <td>[% IF ( branch_item_rule_loo.default_humanitemtype ) %]
531                                 <em>Default</em>
532                             [% ELSE %]
533                                 [% branch_item_rule_loo.humanitemtype %]
534                             [% END %]
535                         </td>
536                         <td>[% IF ( branch_item_rule_loo.holdallowed_any ) %]
537                                 From any library
538                             [% ELSIF ( branch_item_rule_loo.holdallowed_same ) %]
539                                 From home library
540                             [% ELSE %]
541                                 No holds allowed
542                             [% END %]
543                         </td>
544                         <td>[% IF ( branch_item_rule_loo.returnbranch == 'homebranch' ) %]
545                                 Item returns home
546                             [% ELSIF ( branch_item_rule_loo.returnbranch == 'holdingbranch' ) %]
547                                 Item returns to issuing branch
548                             [% ELSIF ( branch_item_rule_loo.returnbranch == 'noreturn' ) %]
549                                 Item floats
550                             [% ELSE %]
551                                 Error - unknown option
552                             [% END %]
553                         </td>
554                         <td>
555                             <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-item&amp;itemtype=[% branch_item_rule_loo.itemtype %]&amp;branch=[% current_branch %]">Delete</a>
556                         </td>
557                     </tr>
558                 [% END %]
559                 <tr>
560                     <td>
561                         <select name="itemtype">
562                         [% FOREACH itemtypeloo IN itemtypeloop %]
563                             <option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.description %]</option>
564                         [% END %]
565                         </select>
566                     </td>
567                     <td>
568                         <select name="holdallowed">
569                             <option value="2">From any library</option>
570                             <option value="1">From home library</option>
571                             <option value="0">No holds allowed</option>
572                         </select>
573                     </td>
574                     <td>
575                         <select name="returnbranch">
576                             <option value="homebranch">Item returns home</option>
577                             <option value="holdingbranch">Item returns to issuing library</option>
578                             <option value="noreturn">Item floats</option>
579                         </select>
580                     </td>
581                     <td><input type="submit" value="Add" class="submit" /></td>
582                 </tr>
583             </table>
584         </form>
585     </div>
586 </div>
587
588 </div>
589 <div class="yui-b">
590 [% INCLUDE 'admin-menu.inc' %]
591 </div>
592 </div>
593 [% INCLUDE 'intranet-bottom.inc' %]