Lines 599-605
Link Here
|
599 |
[% UNLESS ( multi_hold ) %] |
599 |
[% UNLESS ( multi_hold ) %] |
600 |
<li> |
600 |
<li> |
601 |
<label for="requestany">Hold next available item </label> |
601 |
<label for="requestany">Hold next available item </label> |
602 |
[% IF force_hold_level == 'item' %] |
602 |
[% IF force_hold_level == 'item' || force_hold_level == 'item_group' %] |
603 |
<input type="checkbox" id="requestany" name="request" disabled="true" /> |
603 |
<input type="checkbox" id="requestany" name="request" disabled="true" /> |
604 |
[% ELSIF force_hold_level == 'record' %] |
604 |
[% ELSIF force_hold_level == 'record' %] |
605 |
<input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/> |
605 |
<input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/> |
Lines 658-663
Link Here
|
658 |
[% END %] |
658 |
[% END %] |
659 |
</ol> |
659 |
</ol> |
660 |
|
660 |
|
|
|
661 |
<!-- ItemGroup level holds --> |
662 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %] |
663 |
<h2 style="padding: 0 1em;"> |
664 |
Hold next available item from an item group |
665 |
[% IF force_hold_level == 'item_group' %] |
666 |
<span class="error"><i>(Required)</i></span> |
667 |
[% END %] |
668 |
</h2> |
669 |
|
670 |
[% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] |
671 |
<span class="error"> |
672 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
673 |
Hold must be record level |
674 |
</span> |
675 |
[% ELSIF force_hold_level == 'item' # Patron has placed an item level hold previously for this record %] |
676 |
<span class="error"> |
677 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
678 |
Hold must be item level |
679 |
</span> |
680 |
[% ELSE %] |
681 |
<table> |
682 |
<thead> |
683 |
<tr> |
684 |
<th>Hold</th> |
685 |
<th>Item group</th> |
686 |
</tr> |
687 |
</thead> |
688 |
<tbody> |
689 |
[% FOREACH g IN biblio.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
690 |
[% IF g.items %] |
691 |
<tr> |
692 |
<td> |
693 |
<input id="item_group_id_[% g.id | html %]" type="radio" name="item_group_id" value="[% g.id | html %]" /> |
694 |
</td> |
695 |
<td> |
696 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
697 |
</td> |
698 |
</tr> |
699 |
[% END %] |
700 |
[% END %] |
701 |
</tbody> |
702 |
</table> |
703 |
[% END %] |
704 |
[% END %] |
705 |
<!-- /ItemGroup level holds --> |
706 |
|
661 |
<h2 style="padding: 0 1em;"> |
707 |
<h2 style="padding: 0 1em;"> |
662 |
Place a hold on a specific item |
708 |
Place a hold on a specific item |
663 |
[% IF force_hold_level == 'item' %] |
709 |
[% IF force_hold_level == 'item' %] |
Lines 674-679
Link Here
|
674 |
<th>Item type</th> |
720 |
<th>Item type</th> |
675 |
[% END %] |
721 |
[% END %] |
676 |
<th>Barcode</th> |
722 |
<th>Barcode</th> |
|
|
723 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %] |
724 |
<th>Item group</th> |
725 |
[% END %] |
677 |
<th>Home library</th> |
726 |
<th>Home library</th> |
678 |
<th>Last location</th> |
727 |
<th>Last location</th> |
679 |
[% IF itemdata_ccode %] |
728 |
[% IF itemdata_ccode %] |
Lines 698-703
Link Here
|
698 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
747 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
699 |
Hold must be record level |
748 |
Hold must be record level |
700 |
</span> |
749 |
</span> |
|
|
750 |
[% ELSIF force_hold_level == 'item_group' %] |
751 |
<span class="error"> |
752 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
753 |
Hold must be item group level |
754 |
</span> |
701 |
[% ELSIF ( itemloo.available ) %] |
755 |
[% ELSIF ( itemloo.available ) %] |
702 |
<input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" /> |
756 |
<input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" /> |
703 |
[% ELSIF ( itemloo.override ) %] |
757 |
[% ELSIF ( itemloo.override ) %] |
Lines 767-772
Link Here
|
767 |
<td> |
821 |
<td> |
768 |
[% itemloo.barcode | html %] |
822 |
[% itemloo.barcode | html %] |
769 |
</td> |
823 |
</td> |
|
|
824 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %] |
825 |
<td> |
826 |
[% itemloo.object.item_group.description | html %] |
827 |
</td> |
828 |
[% END %] |
770 |
<td> |
829 |
<td> |
771 |
[% Branches.GetName( itemloo.homebranch ) | html %] |
830 |
[% Branches.GetName( itemloo.homebranch ) | html %] |
772 |
</td> |
831 |
</td> |
Lines 1339-1344
Link Here
|
1339 |
}; |
1398 |
}; |
1340 |
if($('input[name="checkitem"]:checked').length) |
1399 |
if($('input[name="checkitem"]:checked').length) |
1341 |
data.item_id = $('input[name="checkitem"]:checked').val(); |
1400 |
data.item_id = $('input[name="checkitem"]:checked').val(); |
|
|
1401 |
if($('input[name="item_group_id"]:checked').length) |
1402 |
data.item_group_id = $('input[name="item_group_id"]:checked').val(); |
1342 |
if($('input[name="borrowernumber"]').length) |
1403 |
if($('input[name="borrowernumber"]').length) |
1343 |
data.patron_id = $('input[name="borrowernumber"]').val(); |
1404 |
data.patron_id = $('input[name="borrowernumber"]').val(); |
1344 |
if($('textarea[name="notes"]').length) |
1405 |
if($('textarea[name="notes"]').length) |
Lines 1384-1391
Link Here
|
1384 |
}); |
1445 |
}); |
1385 |
|
1446 |
|
1386 |
[% UNLESS ( multi_hold ) %] |
1447 |
[% UNLESS ( multi_hold ) %] |
1387 |
$("#hold-request-form").on("submit", function(){ |
1448 |
$("#hold-request-form").on("submit", function(e){ |
1388 |
return check($(this)); |
1449 |
return check(e, $(this)); |
1389 |
}); |
1450 |
}); |
1390 |
[% ELSE %] |
1451 |
[% ELSE %] |
1391 |
$("#hold-request-form").on("submit", function(){ |
1452 |
$("#hold-request-form").on("submit", function(){ |
Lines 1429-1435
Link Here
|
1429 |
}); |
1490 |
}); |
1430 |
}); |
1491 |
}); |
1431 |
|
1492 |
|
1432 |
function check( table ) { |
1493 |
function check( e, table ) { |
1433 |
|
1494 |
|
1434 |
var msg = ""; |
1495 |
var msg = ""; |
1435 |
|
1496 |
|
Lines 1460-1465
Link Here
|
1460 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1521 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1461 |
return(true); |
1522 |
return(true); |
1462 |
} else { |
1523 |
} else { |
|
|
1524 |
e.preventDefault(); |
1463 |
alert(msg); |
1525 |
alert(msg); |
1464 |
return(false); |
1526 |
return(false); |
1465 |
} |
1527 |
} |
Lines 1613-1618
Link Here
|
1613 |
stickyClass: "floating" |
1675 |
stickyClass: "floating" |
1614 |
}); |
1676 |
}); |
1615 |
|
1677 |
|
|
|
1678 |
[% IF Koha.Preference('EnableItemGroupHolds') %] |
1679 |
$(':radio[name="item_group_id"]').change(function(){ |
1680 |
$(':radio[name="checkitem"]').prop('checked', false); |
1681 |
}); |
1682 |
|
1683 |
$(':radio[name="checkitem"]').change(function(){ |
1684 |
$(':radio[name="item_group_id"]').prop('checked', false); |
1685 |
}); |
1686 |
[% END %] |
1687 |
|
1616 |
if(!localStorage.selectedHolds || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) { |
1688 |
if(!localStorage.selectedHolds || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) { |
1617 |
localStorage.selectedHolds = []; |
1689 |
localStorage.selectedHolds = []; |
1618 |
} |
1690 |
} |