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 1330-1335
Link Here
|
1330 |
}; |
1389 |
}; |
1331 |
if($('input[name="checkitem"]:checked').length) |
1390 |
if($('input[name="checkitem"]:checked').length) |
1332 |
data.item_id = $('input[name="checkitem"]:checked').val(); |
1391 |
data.item_id = $('input[name="checkitem"]:checked').val(); |
|
|
1392 |
if($('input[name="item_group_id"]:checked').length) |
1393 |
data.item_group_id = $('input[name="item_group_id"]:checked').val(); |
1333 |
if($('input[name="borrowernumber"]').length) |
1394 |
if($('input[name="borrowernumber"]').length) |
1334 |
data.patron_id = $('input[name="borrowernumber"]').val(); |
1395 |
data.patron_id = $('input[name="borrowernumber"]').val(); |
1335 |
if($('textarea[name="notes"]').length) |
1396 |
if($('textarea[name="notes"]').length) |
Lines 1375-1382
Link Here
|
1375 |
}); |
1436 |
}); |
1376 |
|
1437 |
|
1377 |
[% UNLESS ( multi_hold ) %] |
1438 |
[% UNLESS ( multi_hold ) %] |
1378 |
$("#hold-request-form").on("submit", function(){ |
1439 |
$("#hold-request-form").on("submit", function(e){ |
1379 |
return check($(this)); |
1440 |
return check(e, $(this)); |
1380 |
}); |
1441 |
}); |
1381 |
[% ELSE %] |
1442 |
[% ELSE %] |
1382 |
$("#hold-request-form").on("submit", function(){ |
1443 |
$("#hold-request-form").on("submit", function(){ |
Lines 1420-1426
Link Here
|
1420 |
}); |
1481 |
}); |
1421 |
}); |
1482 |
}); |
1422 |
|
1483 |
|
1423 |
function check( table ) { |
1484 |
function check( e, table ) { |
1424 |
|
1485 |
|
1425 |
var msg = ""; |
1486 |
var msg = ""; |
1426 |
|
1487 |
|
Lines 1451-1456
Link Here
|
1451 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1512 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1452 |
return(true); |
1513 |
return(true); |
1453 |
} else { |
1514 |
} else { |
|
|
1515 |
e.preventDefault(); |
1454 |
alert(msg); |
1516 |
alert(msg); |
1455 |
return(false); |
1517 |
return(false); |
1456 |
} |
1518 |
} |
Lines 1604-1609
Link Here
|
1604 |
stickyClass: "floating" |
1666 |
stickyClass: "floating" |
1605 |
}); |
1667 |
}); |
1606 |
|
1668 |
|
|
|
1669 |
[% IF Koha.Preference('EnableItemGroupHolds') %] |
1670 |
$(':radio[name="item_group_id"]').change(function(){ |
1671 |
$(':radio[name="checkitem"]').prop('checked', false); |
1672 |
}); |
1673 |
|
1674 |
$(':radio[name="checkitem"]').change(function(){ |
1675 |
$(':radio[name="item_group_id"]').prop('checked', false); |
1676 |
}); |
1677 |
[% END %] |
1678 |
|
1607 |
if(!localStorage.selectedHolds || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) { |
1679 |
if(!localStorage.selectedHolds || document.referrer.replace(/\?.*/, '') !== document.location.origin+document.location.pathname) { |
1608 |
localStorage.selectedHolds = []; |
1680 |
localStorage.selectedHolds = []; |
1609 |
} |
1681 |
} |