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 1346-1351
Link Here
|
1346 |
}; |
1405 |
}; |
1347 |
if($('input[name="checkitem"]:checked').length) |
1406 |
if($('input[name="checkitem"]:checked').length) |
1348 |
data.item_id = $('input[name="checkitem"]:checked').val(); |
1407 |
data.item_id = $('input[name="checkitem"]:checked').val(); |
|
|
1408 |
if($('input[name="item_group_id"]:checked').length) |
1409 |
data.item_group_id = $('input[name="item_group_id"]:checked').val(); |
1349 |
if($('input[name="borrowernumber"]').length) |
1410 |
if($('input[name="borrowernumber"]').length) |
1350 |
data.patron_id = $('input[name="borrowernumber"]').val(); |
1411 |
data.patron_id = $('input[name="borrowernumber"]').val(); |
1351 |
if($('textarea[name="notes"]').length) |
1412 |
if($('textarea[name="notes"]').length) |
Lines 1391-1398
Link Here
|
1391 |
}); |
1452 |
}); |
1392 |
|
1453 |
|
1393 |
[% UNLESS ( multi_hold ) %] |
1454 |
[% UNLESS ( multi_hold ) %] |
1394 |
$("#hold-request-form").on("submit", function(){ |
1455 |
$("#hold-request-form").on("submit", function(e){ |
1395 |
return check($(this)); |
1456 |
return check(e, $(this)); |
1396 |
}); |
1457 |
}); |
1397 |
[% ELSE %] |
1458 |
[% ELSE %] |
1398 |
$("#hold-request-form").on("submit", function(){ |
1459 |
$("#hold-request-form").on("submit", function(){ |
Lines 1436-1442
Link Here
|
1436 |
}); |
1497 |
}); |
1437 |
}); |
1498 |
}); |
1438 |
|
1499 |
|
1439 |
function check( table ) { |
1500 |
function check( e, table ) { |
1440 |
|
1501 |
|
1441 |
var msg = ""; |
1502 |
var msg = ""; |
1442 |
|
1503 |
|
Lines 1467-1472
Link Here
|
1467 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1528 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1468 |
return(true); |
1529 |
return(true); |
1469 |
} else { |
1530 |
} else { |
|
|
1531 |
e.preventDefault(); |
1470 |
alert(msg); |
1532 |
alert(msg); |
1471 |
return(false); |
1533 |
return(false); |
1472 |
} |
1534 |
} |
Lines 1620-1625
Link Here
|
1620 |
stickyClass: "floating" |
1682 |
stickyClass: "floating" |
1621 |
}); |
1683 |
}); |
1622 |
|
1684 |
|
|
|
1685 |
[% IF Koha.Preference('EnableItemGroupHolds') %] |
1686 |
$(':radio[name="item_group_id"]').change(function(){ |
1687 |
$(':radio[name="checkitem"]').prop('checked', false); |
1688 |
}); |
1689 |
|
1690 |
$(':radio[name="checkitem"]').change(function(){ |
1691 |
$(':radio[name="item_group_id"]').prop('checked', false); |
1692 |
}); |
1693 |
[% END %] |
1694 |
|
1623 |
if(!localStorage.selectedHolds || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) { |
1695 |
if(!localStorage.selectedHolds || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) { |
1624 |
localStorage.selectedHolds = []; |
1696 |
localStorage.selectedHolds = []; |
1625 |
} |
1697 |
} |