Lines 596-602
Link Here
|
596 |
[% UNLESS ( multi_hold ) %] |
596 |
[% UNLESS ( multi_hold ) %] |
597 |
<li> |
597 |
<li> |
598 |
<label for="requestany">Hold next available item </label> |
598 |
<label for="requestany">Hold next available item </label> |
599 |
[% IF force_hold_level == 'item' %] |
599 |
[% IF force_hold_level == 'item' || force_hold_level == 'item_group' %] |
600 |
<input type="checkbox" id="requestany" name="request" disabled="true" /> |
600 |
<input type="checkbox" id="requestany" name="request" disabled="true" /> |
601 |
[% ELSIF force_hold_level == 'record' %] |
601 |
[% ELSIF force_hold_level == 'record' %] |
602 |
<input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/> |
602 |
<input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/> |
Lines 655-660
Link Here
|
655 |
[% END %] |
655 |
[% END %] |
656 |
</ol> |
656 |
</ol> |
657 |
|
657 |
|
|
|
658 |
<!-- ItemGroup level holds --> |
659 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %] |
660 |
<h2 style="padding: 0 1em;"> |
661 |
Hold next available item from an item group |
662 |
[% IF force_hold_level == 'item_group' %] |
663 |
<span class="error"><i>(Required)</i></span> |
664 |
[% END %] |
665 |
</h2> |
666 |
|
667 |
[% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] |
668 |
<span class="error"> |
669 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
670 |
Hold must be record level |
671 |
</span> |
672 |
[% ELSIF force_hold_level == 'item' # Patron has placed an item level hold previously for this record %] |
673 |
<span class="error"> |
674 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
675 |
Hold must be item level |
676 |
</span> |
677 |
[% ELSE %] |
678 |
<table> |
679 |
<thead> |
680 |
<tr> |
681 |
<th>Hold</th> |
682 |
<th>Item group</th> |
683 |
</tr> |
684 |
</thead> |
685 |
<tbody> |
686 |
[% FOREACH g IN biblio.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
687 |
[% IF g.items %] |
688 |
<tr> |
689 |
<td> |
690 |
<input id="item_group_id_[% g.id | html %]" type="radio" name="item_group_id" value="[% g.id | html %]" /> |
691 |
</td> |
692 |
<td> |
693 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
694 |
</td> |
695 |
</tr> |
696 |
[% END %] |
697 |
[% END %] |
698 |
</tbody> |
699 |
</table> |
700 |
[% END %] |
701 |
[% END %] |
702 |
<!-- /ItemGroup level holds --> |
703 |
|
658 |
<h2 style="padding: 0 1em;"> |
704 |
<h2 style="padding: 0 1em;"> |
659 |
Place a hold on a specific item |
705 |
Place a hold on a specific item |
660 |
[% IF force_hold_level == 'item' %] |
706 |
[% IF force_hold_level == 'item' %] |
Lines 671-676
Link Here
|
671 |
<th>Item type</th> |
717 |
<th>Item type</th> |
672 |
[% END %] |
718 |
[% END %] |
673 |
<th>Barcode</th> |
719 |
<th>Barcode</th> |
|
|
720 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %] |
721 |
<th>Item group</th> |
722 |
[% END %] |
674 |
<th>Home library</th> |
723 |
<th>Home library</th> |
675 |
<th>Last location</th> |
724 |
<th>Last location</th> |
676 |
[% IF itemdata_ccode %] |
725 |
[% IF itemdata_ccode %] |
Lines 695-700
Link Here
|
695 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
744 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
696 |
Hold must be record level |
745 |
Hold must be record level |
697 |
</span> |
746 |
</span> |
|
|
747 |
[% ELSIF force_hold_level == 'item_group' %] |
748 |
<span class="error"> |
749 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
750 |
Hold must be item group level |
751 |
</span> |
698 |
[% ELSIF ( itemloo.available ) %] |
752 |
[% ELSIF ( itemloo.available ) %] |
699 |
<input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" /> |
753 |
<input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" /> |
700 |
[% ELSIF ( itemloo.override ) %] |
754 |
[% ELSIF ( itemloo.override ) %] |
Lines 764-769
Link Here
|
764 |
<td> |
818 |
<td> |
765 |
[% itemloo.barcode | html %] |
819 |
[% itemloo.barcode | html %] |
766 |
</td> |
820 |
</td> |
|
|
821 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %] |
822 |
<td> |
823 |
[% itemloo.object.item_group.description | html %] |
824 |
</td> |
825 |
[% END %] |
767 |
<td> |
826 |
<td> |
768 |
[% Branches.GetName( itemloo.homebranch ) | html %] |
827 |
[% Branches.GetName( itemloo.homebranch ) | html %] |
769 |
</td> |
828 |
</td> |
Lines 1336-1341
Link Here
|
1336 |
}; |
1395 |
}; |
1337 |
if($('input[name="checkitem"]:checked').length) |
1396 |
if($('input[name="checkitem"]:checked').length) |
1338 |
data.item_id = $('input[name="checkitem"]:checked').val(); |
1397 |
data.item_id = $('input[name="checkitem"]:checked').val(); |
|
|
1398 |
if($('input[name="item_group_id"]:checked').length) |
1399 |
data.item_group_id = $('input[name="item_group_id"]:checked').val(); |
1339 |
if($('input[name="borrowernumber"]').length) |
1400 |
if($('input[name="borrowernumber"]').length) |
1340 |
data.patron_id = $('input[name="borrowernumber"]').val(); |
1401 |
data.patron_id = $('input[name="borrowernumber"]').val(); |
1341 |
if($('textarea[name="notes"]').length) |
1402 |
if($('textarea[name="notes"]').length) |
Lines 1381-1388
Link Here
|
1381 |
}); |
1442 |
}); |
1382 |
|
1443 |
|
1383 |
[% UNLESS ( multi_hold ) %] |
1444 |
[% UNLESS ( multi_hold ) %] |
1384 |
$("#hold-request-form").on("submit", function(){ |
1445 |
$("#hold-request-form").on("submit", function(e){ |
1385 |
return check($(this)); |
1446 |
return check(e, $(this)); |
1386 |
}); |
1447 |
}); |
1387 |
[% ELSE %] |
1448 |
[% ELSE %] |
1388 |
$("#hold-request-form").on("submit", function(){ |
1449 |
$("#hold-request-form").on("submit", function(){ |
Lines 1426-1432
Link Here
|
1426 |
}); |
1487 |
}); |
1427 |
}); |
1488 |
}); |
1428 |
|
1489 |
|
1429 |
function check( table ) { |
1490 |
function check( e, table ) { |
1430 |
|
1491 |
|
1431 |
var msg = ""; |
1492 |
var msg = ""; |
1432 |
|
1493 |
|
Lines 1457-1462
Link Here
|
1457 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1518 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1458 |
return(true); |
1519 |
return(true); |
1459 |
} else { |
1520 |
} else { |
|
|
1521 |
e.preventDefault(); |
1460 |
alert(msg); |
1522 |
alert(msg); |
1461 |
return(false); |
1523 |
return(false); |
1462 |
} |
1524 |
} |
Lines 1610-1615
Link Here
|
1610 |
stickyClass: "floating" |
1672 |
stickyClass: "floating" |
1611 |
}); |
1673 |
}); |
1612 |
|
1674 |
|
|
|
1675 |
[% IF Koha.Preference('EnableItemGroupHolds') %] |
1676 |
$(':radio[name="item_group_id"]').change(function(){ |
1677 |
$(':radio[name="checkitem"]').prop('checked', false); |
1678 |
}); |
1679 |
|
1680 |
$(':radio[name="checkitem"]').change(function(){ |
1681 |
$(':radio[name="item_group_id"]').prop('checked', false); |
1682 |
}); |
1683 |
[% END %] |
1684 |
|
1613 |
if(!localStorage.selectedHolds || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) { |
1685 |
if(!localStorage.selectedHolds || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) { |
1614 |
localStorage.selectedHolds = []; |
1686 |
localStorage.selectedHolds = []; |
1615 |
} |
1687 |
} |