Lines 533-539
Link Here
|
533 |
[% UNLESS ( multi_hold ) %] |
533 |
[% UNLESS ( multi_hold ) %] |
534 |
<li> |
534 |
<li> |
535 |
<label for="requestany">Hold next available item </label> |
535 |
<label for="requestany">Hold next available item </label> |
536 |
[% IF force_hold_level == 'item' %] |
536 |
[% IF force_hold_level == 'item' || force_hold_level == 'item_group' %] |
537 |
<input type="checkbox" id="requestany" name="request" disabled="true" /> |
537 |
<input type="checkbox" id="requestany" name="request" disabled="true" /> |
538 |
[% ELSIF force_hold_level == 'record' %] |
538 |
[% ELSIF force_hold_level == 'record' %] |
539 |
<input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/> |
539 |
<input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/> |
Lines 592-597
Link Here
|
592 |
[% END %] |
592 |
[% END %] |
593 |
</ol> |
593 |
</ol> |
594 |
|
594 |
|
|
|
595 |
<!-- ItemGroup level holds --> |
596 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %] |
597 |
<h2 style="padding: 0 1em;"> |
598 |
Hold next available item from an item group |
599 |
[% IF force_hold_level == 'item_group' %] |
600 |
<span class="error"><i>(Required)</i></span> |
601 |
[% END %] |
602 |
</h2> |
603 |
|
604 |
[% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] |
605 |
<span class="error"> |
606 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
607 |
Hold must be record level |
608 |
</span> |
609 |
[% ELSIF force_hold_level == 'item' # Patron has placed an item level hold previously for this record %] |
610 |
<span class="error"> |
611 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
612 |
Hold must be item level |
613 |
</span> |
614 |
[% ELSE %] |
615 |
<table> |
616 |
<thead> |
617 |
<tr> |
618 |
<th>Hold</th> |
619 |
<th>Item group</th> |
620 |
</tr> |
621 |
</thead> |
622 |
<tbody> |
623 |
[% FOREACH g IN biblio.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
624 |
[% IF g.items %] |
625 |
<tr> |
626 |
<td> |
627 |
<input id="item_group_id_[% g.id | html %]" type="radio" name="item_group_id" value="[% g.id | html %]" /> |
628 |
</td> |
629 |
<td> |
630 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
631 |
</td> |
632 |
</tr> |
633 |
[% END %] |
634 |
[% END %] |
635 |
</tbody> |
636 |
</table> |
637 |
[% END %] |
638 |
[% END %] |
639 |
<!-- /ItemGroup level holds --> |
640 |
|
595 |
<h2 style="padding: 0 1em;"> |
641 |
<h2 style="padding: 0 1em;"> |
596 |
Place a hold on a specific item |
642 |
Place a hold on a specific item |
597 |
[% IF force_hold_level == 'item' %] |
643 |
[% IF force_hold_level == 'item' %] |
Lines 608-613
Link Here
|
608 |
<th>Item type</th> |
654 |
<th>Item type</th> |
609 |
[% END %] |
655 |
[% END %] |
610 |
<th>Barcode</th> |
656 |
<th>Barcode</th> |
|
|
657 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %] |
658 |
<th>Item group</th> |
659 |
[% END %] |
611 |
<th>Home library</th> |
660 |
<th>Home library</th> |
612 |
<th>Last location</th> |
661 |
<th>Last location</th> |
613 |
[% IF itemdata_ccode %] |
662 |
[% IF itemdata_ccode %] |
Lines 632-637
Link Here
|
632 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
681 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
633 |
Hold must be record level |
682 |
Hold must be record level |
634 |
</span> |
683 |
</span> |
|
|
684 |
[% ELSIF force_hold_level == 'item_group' %] |
685 |
<span class="error"> |
686 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
687 |
Hold must be item group level |
688 |
</span> |
635 |
[% ELSIF ( itemloo.available ) %] |
689 |
[% ELSIF ( itemloo.available ) %] |
636 |
<input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" /> |
690 |
<input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" /> |
637 |
[% ELSIF ( itemloo.override ) %] |
691 |
[% ELSIF ( itemloo.override ) %] |
Lines 701-706
Link Here
|
701 |
<td> |
755 |
<td> |
702 |
[% itemloo.barcode | html %] |
756 |
[% itemloo.barcode | html %] |
703 |
</td> |
757 |
</td> |
|
|
758 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %] |
759 |
<td> |
760 |
[% itemloo.object.item_group.description | html %] |
761 |
</td> |
762 |
[% END %] |
704 |
<td> |
763 |
<td> |
705 |
[% Branches.GetName( itemloo.homebranch ) | html %] |
764 |
[% Branches.GetName( itemloo.homebranch ) | html %] |
706 |
</td> |
765 |
</td> |
Lines 1268-1273
Link Here
|
1268 |
}; |
1327 |
}; |
1269 |
if($('input[name="checkitem"]:checked').length) |
1328 |
if($('input[name="checkitem"]:checked').length) |
1270 |
data.item_id = $('input[name="checkitem"]:checked').val(); |
1329 |
data.item_id = $('input[name="checkitem"]:checked').val(); |
|
|
1330 |
if($('input[name="item_group_id"]:checked').length) |
1331 |
data.item_group_id = $('input[name="item_group_id"]:checked').val(); |
1271 |
if($('input[name="borrowernumber"]').length) |
1332 |
if($('input[name="borrowernumber"]').length) |
1272 |
data.patron_id = $('input[name="borrowernumber"]').val(); |
1333 |
data.patron_id = $('input[name="borrowernumber"]').val(); |
1273 |
if($('textarea[name="notes"]').length) |
1334 |
if($('textarea[name="notes"]').length) |
Lines 1313-1320
Link Here
|
1313 |
}); |
1374 |
}); |
1314 |
|
1375 |
|
1315 |
[% UNLESS ( multi_hold ) %] |
1376 |
[% UNLESS ( multi_hold ) %] |
1316 |
$("#hold-request-form").on("submit", function(){ |
1377 |
$("#hold-request-form").on("submit", function(e){ |
1317 |
return check($(this)); |
1378 |
return check(e, $(this)); |
1318 |
}); |
1379 |
}); |
1319 |
[% ELSE %] |
1380 |
[% ELSE %] |
1320 |
$("#hold-request-form").on("submit", function(){ |
1381 |
$("#hold-request-form").on("submit", function(){ |
Lines 1358-1364
Link Here
|
1358 |
}); |
1419 |
}); |
1359 |
}); |
1420 |
}); |
1360 |
|
1421 |
|
1361 |
function check( table ) { |
1422 |
function check( e, table ) { |
1362 |
|
1423 |
|
1363 |
var msg = ""; |
1424 |
var msg = ""; |
1364 |
|
1425 |
|
Lines 1384-1389
Link Here
|
1384 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1445 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1385 |
return(true); |
1446 |
return(true); |
1386 |
} else { |
1447 |
} else { |
|
|
1448 |
e.preventDefault(); |
1387 |
alert(msg); |
1449 |
alert(msg); |
1388 |
return(false); |
1450 |
return(false); |
1389 |
} |
1451 |
} |
Lines 1565-1570
Link Here
|
1565 |
stickyClass: "floating" |
1627 |
stickyClass: "floating" |
1566 |
}); |
1628 |
}); |
1567 |
|
1629 |
|
|
|
1630 |
[% IF Koha.Preference('EnableItemGroupHolds') %] |
1631 |
$(':radio[name="item_group_id"]').change(function(){ |
1632 |
$(':radio[name="checkitem"]').prop('checked', false); |
1633 |
}); |
1634 |
|
1635 |
$(':radio[name="checkitem"]').change(function(){ |
1636 |
$(':radio[name="item_group_id"]').prop('checked', false); |
1637 |
}); |
1638 |
[% END %] |
1639 |
|
1568 |
if(!localStorage.selectedHolds || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) { |
1640 |
if(!localStorage.selectedHolds || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) { |
1569 |
localStorage.selectedHolds = []; |
1641 |
localStorage.selectedHolds = []; |
1570 |
} |
1642 |
} |