|
Lines 137-143
Link Here
|
| 137 |
[% INCLUDE 'biblio-title.inc' link =1 %] |
137 |
[% INCLUDE 'biblio-title.inc' link =1 %] |
| 138 |
[% END %] |
138 |
[% END %] |
| 139 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
139 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
| 140 |
<span>Place a hold</span> |
140 |
[% IF closed_stack_request %] |
|
|
141 |
<span>Closed stack request</span> |
| 142 |
[% ELSE %] |
| 143 |
<span>Place a hold</span> |
| 144 |
[% END %] |
| 141 |
[% END %] |
145 |
[% END %] |
| 142 |
[% ELSE %] |
146 |
[% ELSE %] |
| 143 |
[% IF ( patron ) %] |
147 |
[% IF ( patron ) %] |
|
Lines 286-292
Link Here
|
| 286 |
[% END %] |
290 |
[% END %] |
| 287 |
|
291 |
|
| 288 |
[% UNLESS ( multi_hold ) %] |
292 |
[% UNLESS ( multi_hold ) %] |
| 289 |
<h2>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %]by [% biblio.author | html %][% END %]</h2> |
293 |
[% IF closed_stack_request %] |
|
|
294 |
<h2>Closed stack request on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %]by [% biblio.author | html %][% END %]</h2> |
| 295 |
[% ELSE %] |
| 296 |
<h2>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %]by [% biblio.author | html %][% END %]</h2> |
| 297 |
[% END %] |
| 290 |
[% ELSE %] |
298 |
[% ELSE %] |
| 291 |
<h2> |
299 |
<h2> |
| 292 |
[% IF ( patron ) %] |
300 |
[% IF ( patron ) %] |
|
Lines 626-631
Link Here
|
| 626 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
634 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
| 627 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
635 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
| 628 |
|
636 |
|
|
|
637 |
[% IF closed_stack_request %] |
| 638 |
<input type="hidden" name="closed_stack_request" value="1" /> |
| 639 |
[% END %] |
| 640 |
|
| 629 |
<ol> |
641 |
<ol> |
| 630 |
<li> |
642 |
<li> |
| 631 |
<span class="label">Patron:</span> |
643 |
<span class="label">Patron:</span> |
|
Lines 677-848
Link Here
|
| 677 |
</li> |
689 |
</li> |
| 678 |
</ol> |
690 |
</ol> |
| 679 |
</fieldset> |
691 |
</fieldset> |
| 680 |
<fieldset class="rows any_specific"> |
|
|
| 681 |
<legend> |
| 682 |
[% IF force_hold_level == 'item' || force_hold_level == 'item_group' %] |
| 683 |
<input type="radio" id="requestany" name="request" disabled="true" /> |
| 684 |
[% ELSIF force_hold_level == 'record' %] |
| 685 |
<input type="radio" id="requestany" checked="checked" value="Any" disabled="true" /> |
| 686 |
<input type="hidden" name="request" value="Any" /> |
| 687 |
<span class="error"><i>(Required)</i></span> |
| 688 |
[% ELSE %] |
| 689 |
<input type="radio" id="requestany" name="request" checked="checked" value="Any" /> |
| 690 |
[% END %] |
| 691 |
<label for="requestany" class="inline"> Hold next available item: </label> |
| 692 |
</legend> |
| 693 |
<input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" /> |
| 694 |
<fieldset class="enable_request_any disable_request_group disable_request_specific"> |
| 695 |
[% IF force_hold_level == 'item' # Patron has placed a item level hold previously for this record %] |
| 696 |
<span class="error"> |
| 697 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
| 698 |
Hold must be item level |
| 699 |
</span> |
| 700 |
[% ELSIF force_hold_level == 'item_group' # Patron has placed an item group level hold previously for this record %] |
| 701 |
<span class="error"> |
| 702 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
| 703 |
Hold must be item group level |
| 704 |
</span> |
| 705 |
[% ELSE %] |
| 706 |
<ol> |
| 707 |
<li> |
| 708 |
<label for="pickup">Pickup at:</label> |
| 709 |
<select name="pickup" id="pickup-next-avail" data-biblio-id="[% biblio.biblionumber | html %]" data-patron-id="[% patron.borrowernumber | html %]" data-pickup-location-source="biblio"> |
| 710 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
| 711 |
</select> |
| 712 |
</li> |
| 713 |
|
| 714 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
| 715 |
<li> |
| 716 |
<label for="itemtype">Request specific item type:</label> |
| 717 |
<select name="itemtype" id="itemtype"> |
| 718 |
<option value="">Any item type</option> |
| 719 |
[%- FOREACH itemtype IN available_itemtypes %] |
| 720 |
<option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option> |
| 721 |
[%- END %] |
| 722 |
</select> |
| 723 |
</li> |
| 724 |
[% END %] |
| 725 |
[% UNLESS remaining_holds_for_record == 1 %] |
| 726 |
<li> |
| 727 |
<label for="holds_to_place_count">Holds to place (count): </label> |
| 728 |
<input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" value="1" /> |
| 729 |
</li> |
| 730 |
[% ELSE %] |
| 731 |
<input type="hidden" name="holds_to_place_count" value="1" /> |
| 732 |
[% END %] |
| 733 |
</ol> |
| 734 |
[% END %] |
| 735 |
|
| 736 |
<fieldset class="action"> |
| 737 |
[% IF ( patron.borrowernumber ) %] |
| 738 |
[% IF ( override_required ) %] |
| 739 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
| 740 |
[% ELSIF ( none_available ) %] |
| 741 |
<button type="submit" id="hold_grp_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
| 742 |
[% ELSE %] |
| 743 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary">Place hold</button> |
| 744 |
[% END %] |
| 745 |
[% END %] |
| 746 |
</fieldset> |
| 747 |
</fieldset> |
| 748 |
</fieldset> |
| 749 |
|
| 750 |
<hr /> |
| 751 |
|
| 752 |
[% biblio_info = biblioloop.0 %] |
692 |
[% biblio_info = biblioloop.0 %] |
| 753 |
<!-- ItemGroup level holds --> |
693 |
|
| 754 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio_info.object.item_groups.count %] |
694 |
[% UNLESS closed_stack_request %] |
| 755 |
<fieldset class="rows any_specific"> |
695 |
<fieldset class="rows any_specific"> |
| 756 |
<legend> |
696 |
<legend> |
| 757 |
[% IF force_hold_level == 'item_group' %] |
697 |
[% IF force_hold_level == 'item' || force_hold_level == 'item_group' %] |
| 758 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" checked="checked" disabled="true" /> |
698 |
<input type="radio" id="requestany" name="request" disabled="true" /> |
|
|
699 |
[% ELSIF force_hold_level == 'record' %] |
| 700 |
<input type="radio" id="requestany" checked="checked" value="Any" disabled="true" /> |
| 701 |
<input type="hidden" name="request" value="Any" /> |
| 759 |
<span class="error"><i>(Required)</i></span> |
702 |
<span class="error"><i>(Required)</i></span> |
| 760 |
[% ELSIF force_hold_level == 'item' || force_hold_level == 'record' %] |
|
|
| 761 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" disabled="true" /> |
| 762 |
[% ELSE %] |
703 |
[% ELSE %] |
| 763 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" /> |
704 |
<input type="radio" id="requestany" name="request" checked="checked" value="Any" /> |
| 764 |
[% END %] |
705 |
[% END %] |
| 765 |
<label for="requestgrp" class="inline"> Hold next available item from an item group </label> |
706 |
<label for="requestany" class="inline"> Hold next available item: </label> |
| 766 |
</legend> |
707 |
</legend> |
| 767 |
|
708 |
<input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" /> |
| 768 |
<fieldset class="enable_request_group disable_request_any disable_request_specific"> |
709 |
<fieldset class="enable_request_any disable_request_group disable_request_specific"> |
| 769 |
[% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] |
710 |
[% IF force_hold_level == 'item' # Patron has placed a item level hold previously for this record %] |
| 770 |
<span class="error"> |
|
|
| 771 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
| 772 |
Hold must be record level |
| 773 |
</span> |
| 774 |
[% ELSIF force_hold_level == 'item' # Patron has placed an item level hold previously for this record %] |
| 775 |
<span class="error"> |
711 |
<span class="error"> |
| 776 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
712 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
| 777 |
Hold must be item level |
713 |
Hold must be item level |
| 778 |
</span> |
714 |
</span> |
|
|
715 |
[% ELSIF force_hold_level == 'item_group' # Patron has placed an item group level hold previously for this record %] |
| 716 |
<span class="error"> |
| 717 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
| 718 |
Hold must be item group level |
| 719 |
</span> |
| 779 |
[% ELSE %] |
720 |
[% ELSE %] |
| 780 |
<ul> |
721 |
<ol> |
| 781 |
<li> |
722 |
<li> |
| 782 |
<label for="pickup">Pickup at:</label> |
723 |
<label for="pickup">Pickup at:</label> |
| 783 |
<select name="pickup" id="pickup-item-group" data-biblio-id="[% biblio.biblionumber | html %]" data-patron-id="[% patron.borrowernumber | html %]" data-pickup-location-source="biblio"> |
724 |
<select name="pickup" id="pickup-next-avail" data-biblio-id="[% biblio.biblionumber | html %]" data-patron-id="[% patron.borrowernumber | html %]" data-pickup-location-source="biblio"> |
| 784 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
725 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
| 785 |
</select> |
726 |
</select> |
| 786 |
</li> |
727 |
</li> |
| 787 |
<li> |
728 |
|
| 788 |
<table id="requestgroup"> |
729 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
| 789 |
<thead> |
730 |
<li> |
| 790 |
<tr> |
731 |
<label for="itemtype">Request specific item type:</label> |
| 791 |
<th>Hold</th> |
732 |
<select name="itemtype" id="itemtype"> |
| 792 |
<th>Item group</th> |
733 |
<option value="">Any item type</option> |
| 793 |
<th>Holdable items</th> |
734 |
[%- FOREACH itemtype IN available_itemtypes %] |
| 794 |
</tr> |
735 |
<option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option> |
| 795 |
</thead> |
736 |
[%- END %] |
| 796 |
<tbody> |
737 |
</select> |
| 797 |
[% FOREACH g IN biblio_info.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
738 |
</li> |
| 798 |
[% IF g.items.count %] |
739 |
[% END %] |
| 799 |
<tr> |
740 |
[% UNLESS remaining_holds_for_record == 1 %] |
| 800 |
<td> |
741 |
<li> |
| 801 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" /> |
742 |
<label for="holds_to_place_count">Holds to place (count): </label> |
| 802 |
</td> |
743 |
<input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" value="1" /> |
| 803 |
<td> |
744 |
</li> |
| 804 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
745 |
[% ELSE %] |
| 805 |
</td> |
746 |
<input type="hidden" name="holds_to_place_count" value="1" /> |
| 806 |
<td> |
747 |
[% END %] |
| 807 |
[% FOREACH i IN g.items %] |
748 |
</ol> |
| 808 |
<div><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% i.biblionumber | uri %]#item[% i.itemnumber | uri %]">[% i.barcode | html %]</a></div> |
|
|
| 809 |
[% END %] |
| 810 |
</td> |
| 811 |
</tr> |
| 812 |
[% ELSE %] |
| 813 |
<tr> |
| 814 |
<td> |
| 815 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" disabled="disabled" /> |
| 816 |
</td> |
| 817 |
<td> |
| 818 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
| 819 |
</td> |
| 820 |
<td> |
| 821 |
<div class="error">No holdable items in this item group.</div> |
| 822 |
</td> |
| 823 |
</tr> |
| 824 |
[% END %] |
| 825 |
[% END %] |
| 826 |
</tbody> |
| 827 |
</table> |
| 828 |
</li> |
| 829 |
</ul> |
| 830 |
[% END %] |
749 |
[% END %] |
|
|
750 |
|
| 831 |
<fieldset class="action"> |
751 |
<fieldset class="action"> |
| 832 |
[% IF ( patron.borrowernumber ) %] |
752 |
[% IF ( patron.borrowernumber ) %] |
| 833 |
[% IF ( override_required ) %] |
753 |
[% IF ( override_required ) %] |
| 834 |
<button type="submit" id="hold_any_btn" class="btn btn-primary"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
754 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
| 835 |
[% ELSIF ( none_available ) %] |
755 |
[% ELSIF ( none_available ) %] |
| 836 |
<button type="submit" id="hold_any_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
756 |
<button type="submit" id="hold_grp_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
| 837 |
[% ELSE %] |
757 |
[% ELSE %] |
| 838 |
<button type="submit" id="hold_any_btn" class="btn btn-primary">Place hold</button> |
758 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary">Place hold</button> |
| 839 |
[% END %] |
759 |
[% END %] |
| 840 |
[% END %] |
760 |
[% END %] |
| 841 |
</fieldset> |
761 |
</fieldset> |
| 842 |
</fieldset> |
762 |
</fieldset> |
| 843 |
</fieldset> |
763 |
</fieldset> |
|
|
764 |
|
| 765 |
<hr /> |
| 766 |
|
| 767 |
<!-- ItemGroup level holds --> |
| 768 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio_info.object.item_groups.count %] |
| 769 |
<fieldset class="rows any_specific"> |
| 770 |
<legend> |
| 771 |
[% IF force_hold_level == 'item_group' %] |
| 772 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" checked="checked" disabled="true" /> |
| 773 |
<span class="error"><i>(Required)</i></span> |
| 774 |
[% ELSIF force_hold_level == 'item' || force_hold_level == 'record' %] |
| 775 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" disabled="true" /> |
| 776 |
[% ELSE %] |
| 777 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" /> |
| 778 |
[% END %] |
| 779 |
<label for="requestgrp" class="inline"> Hold next available item from an item group </label> |
| 780 |
</legend> |
| 781 |
|
| 782 |
<fieldset class="enable_request_group disable_request_any disable_request_specific"> |
| 783 |
[% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] |
| 784 |
<span class="error"> |
| 785 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
| 786 |
Hold must be record level |
| 787 |
</span> |
| 788 |
[% ELSIF force_hold_level == 'item' # Patron has placed an item level hold previously for this record %] |
| 789 |
<span class="error"> |
| 790 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
| 791 |
Hold must be item level |
| 792 |
</span> |
| 793 |
[% ELSE %] |
| 794 |
<ul> |
| 795 |
<li> |
| 796 |
<label for="pickup">Pickup at:</label> |
| 797 |
<select name="pickup" id="pickup-item-group" data-biblio-id="[% biblio.biblionumber | html %]" data-patron-id="[% patron.borrowernumber | html %]" data-pickup-location-source="biblio"> |
| 798 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
| 799 |
</select> |
| 800 |
</li> |
| 801 |
<li> |
| 802 |
<table id="requestgroup"> |
| 803 |
<thead> |
| 804 |
<tr> |
| 805 |
<th>Hold</th> |
| 806 |
<th>Item group</th> |
| 807 |
<th>Holdable items</th> |
| 808 |
</tr> |
| 809 |
</thead> |
| 810 |
<tbody> |
| 811 |
[% FOREACH g IN biblio_info.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
| 812 |
[% IF g.items.count %] |
| 813 |
<tr> |
| 814 |
<td> |
| 815 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" /> |
| 816 |
</td> |
| 817 |
<td> |
| 818 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
| 819 |
</td> |
| 820 |
<td> |
| 821 |
[% FOREACH i IN g.items %] |
| 822 |
<div><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% i.biblionumber | uri %]#item[% i.itemnumber | uri %]">[% i.barcode | html %]</a></div> |
| 823 |
[% END %] |
| 824 |
</td> |
| 825 |
</tr> |
| 826 |
[% ELSE %] |
| 827 |
<tr> |
| 828 |
<td> |
| 829 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" disabled="disabled" /> |
| 830 |
</td> |
| 831 |
<td> |
| 832 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
| 833 |
</td> |
| 834 |
<td> |
| 835 |
<div class="error">No holdable items in this item group.</div> |
| 836 |
</td> |
| 837 |
</tr> |
| 838 |
[% END %] |
| 839 |
[% END %] |
| 840 |
</tbody> |
| 841 |
</table> |
| 842 |
</li> |
| 843 |
</ul> |
| 844 |
[% END %] |
| 845 |
<fieldset class="action"> |
| 846 |
[% IF ( patron.borrowernumber ) %] |
| 847 |
[% IF ( override_required ) %] |
| 848 |
<button type="submit" id="hold_any_btn" class="btn btn-primary"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
| 849 |
[% ELSIF ( none_available ) %] |
| 850 |
<button type="submit" id="hold_any_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
| 851 |
[% ELSE %] |
| 852 |
<button type="submit" id="hold_any_btn" class="btn btn-primary">Place hold</button> |
| 853 |
[% END %] |
| 854 |
[% END %] |
| 855 |
</fieldset> |
| 856 |
</fieldset> |
| 857 |
</fieldset> |
| 858 |
[% END %] |
| 859 |
<!-- /ItemGroup level holds --> |
| 844 |
[% END %] |
860 |
[% END %] |
| 845 |
<!-- /ItemGroup level holds --> |
|
|
| 846 |
|
861 |
|
| 847 |
<fieldset class="rows any_specific"> |
862 |
<fieldset class="rows any_specific"> |
| 848 |
<legend> |
863 |
<legend> |
|
Lines 1238-1243
Link Here
|
| 1238 |
><li> <strong>No items are available</strong> to be placed on hold</li></ul |
1253 |
><li> <strong>No items are available</strong> to be placed on hold</li></ul |
| 1239 |
> |
1254 |
> |
| 1240 |
[% END %] |
1255 |
[% END %] |
|
|
1256 |
|
| 1257 |
[% IF itemloo.is_closed_stack %] |
| 1258 |
<br /><span>Closed stack</span> |
| 1259 |
[% END %] |
| 1241 |
</td> |
1260 |
</td> |
| 1242 |
</tr> |
1261 |
</tr> |
| 1243 |
[% END # /FOREACH biblioloo %] |
1262 |
[% END # /FOREACH biblioloo %] |
|
Lines 1579-1584
Link Here
|
| 1579 |
[% IF multi_hold %] |
1598 |
[% IF multi_hold %] |
| 1580 |
[% SET url_biblio_params = url_biblio_params _ "&multi_hold=1" %] |
1599 |
[% SET url_biblio_params = url_biblio_params _ "&multi_hold=1" %] |
| 1581 |
[% END %] |
1600 |
[% END %] |
|
|
1601 |
[% IF closed_stack_request %] |
| 1602 |
[% SET url_biblio_params = url_biblio_params _ "&closed_stack_request=1" %] |
| 1603 |
[% END %] |
| 1582 |
<script> |
1604 |
<script> |
| 1583 |
$(document).ready(function () { |
1605 |
$(document).ready(function () { |
| 1584 |
hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %]; |
1606 |
hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %]; |