Lines 1288-1293
Link Here
|
1288 |
[% SET holdallowed = CirculationRules.Search( branchcode, undef, i.itemtype, 'holdallowed' ) %] |
1288 |
[% SET holdallowed = CirculationRules.Search( branchcode, undef, i.itemtype, 'holdallowed' ) %] |
1289 |
[% SET hold_fulfillment_policy = CirculationRules.Search( branchcode, undef, i.itemtype, 'hold_fulfillment_policy' ) %] |
1289 |
[% SET hold_fulfillment_policy = CirculationRules.Search( branchcode, undef, i.itemtype, 'hold_fulfillment_policy' ) %] |
1290 |
[% SET returnbranch = CirculationRules.Search( branchcode, undef, i.itemtype, 'returnbranch' ) %] |
1290 |
[% SET returnbranch = CirculationRules.Search( branchcode, undef, i.itemtype, 'returnbranch' ) %] |
|
|
1291 |
<tr> |
1292 |
<td> |
1293 |
<select> |
1294 |
[% IF returnbranch == 'homebranch' %] |
1295 |
<option value="homebranch" selected="selected"> |
1296 |
[% ELSE %] |
1297 |
<option value="homebranch"> |
1298 |
[% END %] |
1299 |
Item returns home |
1300 |
</option> |
1301 |
[% IF returnbranch == 'holdingbranch' %] |
1302 |
<option value="holdingbranch" selected="selected"> |
1303 |
[% ELSE %] |
1304 |
<option value="holdingbranch"> |
1305 |
[% END %] |
1306 |
Item returns to issuing library |
1307 |
</option> |
1308 |
[% IF returnbranch == 'noreturn' %] |
1309 |
<option value="noreturn" selected="selected"> |
1310 |
[% ELSE %] |
1311 |
<option value="noreturn"> |
1312 |
[% END %] |
1313 |
Item floats |
1314 |
</option> |
1315 |
</select> |
1316 |
</td> |
1317 |
<td class="actions"> |
1318 |
<button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button> |
1319 |
<a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=*&branch=[% current_branch | html %]" id="unset"><i class="fa fa-undo"></i> Unset</a> |
1320 |
</td> |
1321 |
</tr> |
1322 |
</table> |
1323 |
</form> |
1324 |
</div> |
1325 |
[% IF ( show_branch_cat_rule_form ) %] |
1326 |
<div id="holds-policy-by-patron-category" class="container"> |
1327 |
<h3>[% IF humanbranch %]Checkout, hold policy by patron category for [% Branches.GetName( humanbranch ) | html %][% ELSE %]Default checkout, hold policy by patron category[% END %]</h3> |
1328 |
<p>For this library, you can specify the maximum number of loans that |
1329 |
a patron of a given category can make, regardless of the item type. |
1330 |
</p> |
1331 |
<p>If the total amount loanable for a given patron category is left blank, |
1332 |
no limit applies, except possibly for a limit you define for a specific item type. |
1333 |
</p> |
1334 |
<p> |
1335 |
<b>Has priority: </b>If checked, the rule will override those for all branches. Else |
1336 |
it behaves like a default one: used if no rule existe for the coresponding branch. |
1337 |
</p> |
1338 |
<form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> |
1339 |
<input type="hidden" name="op" value="add-branch-cat" /> |
1340 |
<input type="hidden" name="branch" value="[% current_branch | html %]"/> |
1341 |
<table> |
1342 |
<tr> |
1343 |
<th>Patron category</th> |
1344 |
<th>Total current checkouts allowed</th> |
1345 |
<th>Total current on-site checkouts allowed</th> |
1346 |
<th>Total holds allowed</th> |
1347 |
[% UNLESS humanbranch %]<th>Has priority</th>[% END %] |
1348 |
<th> </th> |
1349 |
</tr> |
1350 |
[% FOREACH c IN categorycodes %] |
1351 |
[% NEXT UNLESS c %] |
1352 |
[% SET patron_maxissueqty = CirculationRules.Search( branchcode, c, undef, 'patron_maxissueqty' ) %] |
1353 |
[% SET patron_maxonsiteissueqty = CirculationRules.Search( branchcode, c, undef, 'patron_maxonsiteissueqty' ) %] |
1354 |
[% SET max_holds = CirculationRules.Search( branchcode, c, undef, 'max_holds' ) %] |
1355 |
|
1356 |
[% IF ( patron_maxissueqty.defined && patron_maxissueqty != '' ) || ( patron_maxonsiteissueqty.defined && patron_maxonsiteissueqty != '' ) || ( max_holds.defined && max_holds != '' ) %] |
1357 |
<tr> |
1358 |
<td> |
1359 |
[% IF c == undef %] |
1360 |
<em>Default</em> |
1361 |
[% ELSE %] |
1362 |
[% Categories.GetName(c) | html %] |
1363 |
[% END %] |
1364 |
</td> |
1365 |
<td> |
1366 |
[% IF patron_maxissueqty.defined && patron_maxissueqty != '' %] |
1367 |
[% patron_maxissueqty | html %] |
1368 |
[% ELSE %] |
1369 |
<span>Unlimited</span> |
1370 |
[% END %] |
1371 |
</td> |
1372 |
<td> |
1373 |
[% IF patron_maxonsiteissueqty.defined && patron_maxonsiteissueqty != '' %] |
1374 |
[% patron_maxonsiteissueqty | html %] |
1375 |
[% ELSE %] |
1376 |
<span>Unlimited</span> |
1377 |
[% END %] |
1378 |
</td> |
1379 |
<td> |
1380 |
[% IF max_holds.defined && max_holds != '' %] |
1381 |
[% max_holds | html %] |
1382 |
[% ELSE %] |
1383 |
<span>Unlimited</span> |
1384 |
[% END %] |
1385 |
</td> |
1386 |
[% UNLESS humanbranch %] |
1387 |
<td> |
1388 |
<input type="checkbox" [% IF branch_cat_rule_loo.has_priority %]checked[% END %] disabled/> |
1389 |
</td> |
1390 |
[% END %] |
1391 |
|
1392 |
<td class="actions"> |
1393 |
<a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=[% c | html %]&branch=[% current_branch | html %]"><i class="fa fa-trash"></i> Delete</a> |
1394 |
</td> |
1395 |
</tr> |
1396 |
[% END %] |
1397 |
[% END %] |
1398 |
<tr> |
1399 |
<td> |
1400 |
<select name="categorycode"> |
1401 |
[% FOREACH patron_category IN patron_categories%] |
1402 |
<option value="[% patron_category.categorycode | html %]">[% patron_category.description | html %]</option> |
1403 |
[% END %] |
1404 |
</select> |
1405 |
</td> |
1406 |
<td><input name="patron_maxissueqty" size="3" type="text" /></td> |
1407 |
<td><input name="patron_maxonsiteissueqty" size="3" type="text" /></td> |
1408 |
<td><input name="max_holds" size="3" type="text" /></td> |
1409 |
[% UNLESS humanbranch %] |
1410 |
<td> |
1411 |
<input type="checkbox" name="has_priority"/> |
1412 |
</td> |
1413 |
[% END %] |
1414 |
<td class="actions"><button type="submit" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add</td> |
1415 |
</tr> |
1416 |
</table> |
1417 |
</form> |
1418 |
</div> |
1419 |
[% END %] |
1291 |
|
1420 |
|
1292 |
[% IF holdallowed || hold_fulfillment_policy || returnbranch %] |
1421 |
[% IF holdallowed || hold_fulfillment_policy || returnbranch %] |
1293 |
<tr> |
1422 |
<tr> |