Lines 122-128
Link Here
|
122 |
[% INCLUDE 'biblio-title.inc' link =1 %] |
122 |
[% INCLUDE 'biblio-title.inc' link =1 %] |
123 |
[% END %] |
123 |
[% END %] |
124 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
124 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
125 |
<span>Place a hold</span> |
125 |
[% IF closed_stack_request %] |
|
|
126 |
<span>Closed stack request</span> |
127 |
[% ELSE %] |
128 |
<span>Place a hold</span> |
129 |
[% END %] |
126 |
[% END %] |
130 |
[% END %] |
127 |
[% ELSE %] |
131 |
[% ELSE %] |
128 |
[% IF ( patron ) %] |
132 |
[% IF ( patron ) %] |
Lines 226-232
Link Here
|
226 |
[% END %] |
230 |
[% END %] |
227 |
|
231 |
|
228 |
[% UNLESS ( multi_hold ) %] |
232 |
[% UNLESS ( multi_hold ) %] |
229 |
<h2>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %] by [% biblio.author | html %][% END %]</h2> |
233 |
[% IF closed_stack_request %] |
|
|
234 |
<h2>Closed stack request on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %] by [% biblio.author | html %][% END %]</h2> |
235 |
[% ELSE %] |
236 |
<h2>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %] by [% biblio.author | html %][% END %]</h2> |
237 |
[% END %] |
230 |
[% ELSE %] |
238 |
[% ELSE %] |
231 |
<h2> |
239 |
<h2> |
232 |
[% IF ( patron ) %] |
240 |
[% IF ( patron ) %] |
Lines 562-567
Link Here
|
562 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
570 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
563 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
571 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
564 |
|
572 |
|
|
|
573 |
[% IF closed_stack_request %] |
574 |
<input type="hidden" name="closed_stack_request" value="1"> |
575 |
[% END %] |
576 |
|
565 |
<ol> |
577 |
<ol> |
566 |
<li> |
578 |
<li> |
567 |
<span class="label">Patron:</span> |
579 |
<span class="label">Patron:</span> |
Lines 613-796
Link Here
|
613 |
</li> |
625 |
</li> |
614 |
</ol> |
626 |
</ol> |
615 |
</fieldset> |
627 |
</fieldset> |
616 |
<fieldset class="rows any_specific"> |
|
|
617 |
<legend> |
618 |
[% IF force_hold_level == 'item' || force_hold_level == 'item_group' %] |
619 |
<input type="radio" id="requestany" name="request" disabled="true" /> |
620 |
[% ELSIF force_hold_level == 'record' %] |
621 |
<input type="radio" id="requestany" checked="checked" value="Any" disabled="true"/> |
622 |
<input type="hidden" name="request" value="Any"/> |
623 |
<span class="error"><i>(Required)</i></span> |
624 |
[% ELSE %] |
625 |
<input type="radio" id="requestany" name="request" checked="checked" value="Any" /> |
626 |
[% END %] |
627 |
<label for="requestany" class="inline"> |
628 |
Hold next available item |
629 |
</label> |
630 |
</legend> |
631 |
<input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" /> |
632 |
<fieldset class="enable_request_any disable_request_group disable_request_specific"> |
633 |
[% IF force_hold_level == 'item' # Patron has placed a item level hold previously for this record %] |
634 |
<span class="error"> |
635 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
636 |
Hold must be item level |
637 |
</span> |
638 |
[% ELSIF force_hold_level == 'item_group' # Patron has placed an item group level hold previously for this record %] |
639 |
<span class="error"> |
640 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
641 |
Hold must be item group level |
642 |
</span> |
643 |
[% ELSE %] |
644 |
<ol> |
645 |
|
646 |
<li> |
647 |
<label for="pickup">Pickup at:</label> |
648 |
<select name="pickup" id="pickup-next-avail" |
649 |
data-biblio-id="[% biblio.biblionumber | html %]" |
650 |
data-patron-id="[% patron.borrowernumber | html %]" |
651 |
data-pickup-location-source="biblio"> |
652 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
653 |
</select> |
654 |
</li> |
655 |
|
628 |
|
656 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
629 |
[% biblio_info = biblioloop.0 %] |
657 |
<li> |
630 |
|
658 |
<label for="itemtype">Request specific item type:</label> |
631 |
[% UNLESS closed_stack_request %] |
659 |
<select name="itemtype" id="itemtype"> |
632 |
<fieldset class="rows any_specific"> |
660 |
<option value="">Any item type</option> |
633 |
<legend> |
661 |
[%- FOREACH itemtype IN available_itemtypes %] |
634 |
[% IF force_hold_level == 'item' || force_hold_level == 'item_group' %] |
662 |
<option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option> |
635 |
<input type="radio" id="requestany" name="request" disabled="true" /> |
663 |
[%- END %] |
636 |
[% ELSIF force_hold_level == 'record' %] |
664 |
</select> |
637 |
<input type="radio" id="requestany" checked="checked" value="Any" disabled="true"/> |
665 |
</li> |
638 |
<input type="hidden" name="request" value="Any"/> |
666 |
[% END %] |
639 |
<span class="error"><i>(Required)</i></span> |
667 |
[% UNLESS remaining_holds_for_record == 1 %] |
|
|
668 |
<li> |
669 |
<label for="holds_to_place_count">Holds to place (count)</label> |
670 |
<input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" value="1" /> |
671 |
</li> |
672 |
[% ELSE %] |
640 |
[% ELSE %] |
673 |
<input type="hidden" name="holds_to_place_count" value="1" /> |
641 |
<input type="radio" id="requestany" name="request" checked="checked" value="Any" /> |
674 |
[% END %] |
642 |
[% END %] |
675 |
</ol> |
643 |
<label for="requestany" class="inline"> |
676 |
[% END %] |
644 |
Hold next available item |
|
|
645 |
</label> |
646 |
</legend> |
647 |
<input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" /> |
648 |
<fieldset class="enable_request_any disable_request_group disable_request_specific"> |
649 |
[% IF force_hold_level == 'item' # Patron has placed a item level hold previously for this record %] |
650 |
<span class="error"> |
651 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
652 |
Hold must be item level |
653 |
</span> |
654 |
[% ELSIF force_hold_level == 'item_group' # Patron has placed an item group level hold previously for this record %] |
655 |
<span class="error"> |
656 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
657 |
Hold must be item group level |
658 |
</span> |
659 |
[% ELSE %] |
660 |
<ol> |
677 |
|
661 |
|
|
|
662 |
<li> |
663 |
<label for="pickup">Pickup at:</label> |
664 |
<select name="pickup" id="pickup-next-avail" |
665 |
data-biblio-id="[% biblio.biblionumber | html %]" |
666 |
data-patron-id="[% patron.borrowernumber | html %]" |
667 |
data-pickup-location-source="biblio"> |
668 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
669 |
</select> |
670 |
</li> |
678 |
|
671 |
|
679 |
<fieldset class="action"> |
672 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
680 |
[% IF ( patron.borrowernumber ) %] |
673 |
<li> |
681 |
[% IF ( override_required ) %] |
674 |
<label for="itemtype">Request specific item type:</label> |
682 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
675 |
<select name="itemtype" id="itemtype"> |
683 |
[% ELSIF ( none_available ) %] |
676 |
<option value="">Any item type</option> |
684 |
<button type="submit" id="hold_grp_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
677 |
[%- FOREACH itemtype IN available_itemtypes %] |
685 |
[% ELSE %] |
678 |
<option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option> |
686 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary">Place hold</button> |
679 |
[%- END %] |
|
|
680 |
</select> |
681 |
</li> |
682 |
[% END %] |
683 |
[% UNLESS remaining_holds_for_record == 1 %] |
684 |
<li> |
685 |
<label for="holds_to_place_count">Holds to place (count)</label> |
686 |
<input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" value="1" /> |
687 |
</li> |
688 |
[% ELSE %] |
689 |
<input type="hidden" name="holds_to_place_count" value="1" /> |
690 |
[% END %] |
691 |
</ol> |
687 |
[% END %] |
692 |
[% END %] |
688 |
[% END %] |
|
|
689 |
</fieldset> |
690 |
</fieldset> |
691 |
</fieldset> |
692 |
|
693 |
<hr/> |
694 |
|
693 |
|
695 |
[% biblio_info = biblioloop.0 %] |
|
|
696 |
<!-- ItemGroup level holds --> |
697 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio_info.object.item_groups.count %] |
698 |
<fieldset class="rows any_specific"> |
699 |
<legend> |
700 |
[% IF force_hold_level == 'item_group' %] |
701 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" checked="checked" disabled="true" /> |
702 |
<span class="error"><i>(Required)</i></span> |
703 |
[% ELSIF force_hold_level == 'item' || force_hold_level == 'record' %] |
704 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" disabled="true" /> |
705 |
[% ELSE %] |
706 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" /> |
707 |
[% END %] |
708 |
<label for="requestgrp" class="inline"> |
709 |
Hold next available item from an item group |
710 |
</label> |
711 |
</legend> |
712 |
|
694 |
|
713 |
<fieldset class="enable_request_group disable_request_any disable_request_specific"> |
695 |
<fieldset class="action"> |
714 |
[% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] |
696 |
[% IF ( patron.borrowernumber ) %] |
715 |
<span class="error"> |
697 |
[% IF ( override_required ) %] |
716 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
698 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
717 |
Hold must be record level |
699 |
[% ELSIF ( none_available ) %] |
718 |
</span> |
700 |
<button type="submit" id="hold_grp_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
719 |
[% ELSIF force_hold_level == 'item' # Patron has placed an item level hold previously for this record %] |
701 |
[% ELSE %] |
720 |
<span class="error"> |
702 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary">Place hold</button> |
721 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
|
|
722 |
Hold must be item level |
723 |
</span> |
724 |
[% ELSE %] |
725 |
<ul> |
726 |
<li> |
727 |
<label for="pickup">Pickup at:</label> |
728 |
<select name="pickup" id="pickup-item-group" |
729 |
data-biblio-id="[% biblio.biblionumber | html %]" |
730 |
data-patron-id="[% patron.borrowernumber | html %]" |
731 |
data-pickup-location-source="biblio"> |
732 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
733 |
</select> |
734 |
</li> |
735 |
<li> |
736 |
<table id="requestgroup"> |
737 |
<thead> |
738 |
<tr> |
739 |
<th>Hold</th> |
740 |
<th>Item group</th> |
741 |
<th>Holdable items</th> |
742 |
</tr> |
743 |
</thead> |
744 |
<tbody> |
745 |
[% FOREACH g IN biblio_info.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
746 |
[% IF g.items.count %] |
747 |
<tr> |
748 |
<td> |
749 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" /> |
750 |
</td> |
751 |
<td> |
752 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
753 |
</td> |
754 |
<td> |
755 |
[% FOREACH i IN g.items %] |
756 |
<div><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% i.biblionumber | uri %]#item[% i.itemnumber | uri %]">[% i.barcode | html %]</a></div> |
757 |
[% END %] |
758 |
</td> |
759 |
</tr> |
760 |
[% ELSE %] |
761 |
<tr> |
762 |
<td> |
763 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" disabled="disabled" /> |
764 |
</td> |
765 |
<td> |
766 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
767 |
</td> |
768 |
<td> |
769 |
<div class="error">No holdable items in this item group.</div> |
770 |
</td> |
771 |
</tr> |
772 |
[% END %] |
773 |
[% END %] |
703 |
[% END %] |
774 |
</tbody> |
704 |
[% END %] |
775 |
</table> |
705 |
</fieldset> |
776 |
</li> |
706 |
</fieldset> |
777 |
</ul> |
707 |
</fieldset> |
778 |
[% END %] |
708 |
|
779 |
<fieldset class="action"> |
709 |
<hr/> |
780 |
[% IF ( patron.borrowernumber ) %] |
710 |
|
781 |
[% IF ( override_required ) %] |
711 |
<!-- ItemGroup level holds --> |
782 |
<button type="submit" id="hold_any_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
712 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio_info.object.item_groups.count %] |
783 |
[% ELSIF ( none_available ) %] |
713 |
<fieldset class="rows any_specific"> |
784 |
<button type="submit" id="hold_any_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
714 |
<legend> |
|
|
715 |
[% IF force_hold_level == 'item_group' %] |
716 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" checked="checked" disabled="true" /> |
717 |
<span class="error"><i>(Required)</i></span> |
718 |
[% ELSIF force_hold_level == 'item' || force_hold_level == 'record' %] |
719 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" disabled="true" /> |
785 |
[% ELSE %] |
720 |
[% ELSE %] |
786 |
<button type="submit" id="hold_any_btn" class="btn btn-primary">Place hold</button> |
721 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" /> |
787 |
[% END %] |
722 |
[% END %] |
|
|
723 |
<label for="requestgrp" class="inline"> |
724 |
Hold next available item from an item group |
725 |
</label> |
726 |
</legend> |
727 |
|
728 |
<fieldset class="enable_request_group disable_request_any disable_request_specific"> |
729 |
[% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] |
730 |
<span class="error"> |
731 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
732 |
Hold must be record level |
733 |
</span> |
734 |
[% ELSIF force_hold_level == 'item' # Patron has placed an item level hold previously for this record %] |
735 |
<span class="error"> |
736 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
737 |
Hold must be item level |
738 |
</span> |
739 |
[% ELSE %] |
740 |
<ul> |
741 |
<li> |
742 |
<label for="pickup">Pickup at:</label> |
743 |
<select name="pickup" id="pickup-item-group" |
744 |
data-biblio-id="[% biblio.biblionumber | html %]" |
745 |
data-patron-id="[% patron.borrowernumber | html %]" |
746 |
data-pickup-location-source="biblio"> |
747 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
748 |
</select> |
749 |
</li> |
750 |
<li> |
751 |
<table id="requestgroup"> |
752 |
<thead> |
753 |
<tr> |
754 |
<th>Hold</th> |
755 |
<th>Item group</th> |
756 |
<th>Holdable items</th> |
757 |
</tr> |
758 |
</thead> |
759 |
<tbody> |
760 |
[% FOREACH g IN biblio_info.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
761 |
[% IF g.items.count %] |
762 |
<tr> |
763 |
<td> |
764 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" /> |
765 |
</td> |
766 |
<td> |
767 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
768 |
</td> |
769 |
<td> |
770 |
[% FOREACH i IN g.items %] |
771 |
<div><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% i.biblionumber | uri %]#item[% i.itemnumber | uri %]">[% i.barcode | html %]</a></div> |
772 |
[% END %] |
773 |
</td> |
774 |
</tr> |
775 |
[% ELSE %] |
776 |
<tr> |
777 |
<td> |
778 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" disabled="disabled" /> |
779 |
</td> |
780 |
<td> |
781 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
782 |
</td> |
783 |
<td> |
784 |
<div class="error">No holdable items in this item group.</div> |
785 |
</td> |
786 |
</tr> |
787 |
[% END %] |
788 |
[% END %] |
789 |
</tbody> |
790 |
</table> |
791 |
</li> |
792 |
</ul> |
788 |
[% END %] |
793 |
[% END %] |
|
|
794 |
|
795 |
<fieldset class="action"> |
796 |
[% IF ( patron.borrowernumber ) %] |
797 |
[% IF ( override_required ) %] |
798 |
<button type="submit" id="hold_any_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
799 |
[% ELSIF ( none_available ) %] |
800 |
<button type="submit" id="hold_any_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
801 |
[% ELSE %] |
802 |
<button type="submit" id="hold_any_btn" class="btn btn-primary">Place hold</button> |
803 |
[% END %] |
804 |
[% END %] |
805 |
</fieldset> |
806 |
</fieldset> |
789 |
</fieldset> |
807 |
</fieldset> |
790 |
</fieldset> |
808 |
[% END # UNLESS closed_stack_request %] |
791 |
</fieldset> |
809 |
<!-- /ItemGroup level holds --> |
792 |
[% END %] |
810 |
[% END %] |
793 |
<!-- /ItemGroup level holds --> |
|
|
794 |
|
811 |
|
795 |
<fieldset class="rows any_specific"> |
812 |
<fieldset class="rows any_specific"> |
796 |
<legend> |
813 |
<legend> |
Lines 1188-1193
Link Here
|
1188 |
</ul> |
1205 |
</ul> |
1189 |
[% END %] |
1206 |
[% END %] |
1190 |
[% END %] |
1207 |
[% END %] |
|
|
1208 |
|
1209 |
[% IF itemloo.is_closed_stack %] |
1210 |
<br><span>Closed stack</span> |
1211 |
[% END %] |
1191 |
</td> |
1212 |
</td> |
1192 |
</tr> |
1213 |
</tr> |
1193 |
[% END # /FOREACH biblioloo %] |
1214 |
[% END # /FOREACH biblioloo %] |
Lines 1490-1495
Link Here
|
1490 |
[% IF multi_hold %] |
1511 |
[% IF multi_hold %] |
1491 |
[% SET url_biblio_params = url_biblio_params _ "&multi_hold=1" %] |
1512 |
[% SET url_biblio_params = url_biblio_params _ "&multi_hold=1" %] |
1492 |
[% END %] |
1513 |
[% END %] |
|
|
1514 |
[% IF closed_stack_request %] |
1515 |
[% SET url_biblio_params = url_biblio_params _ "&closed_stack_request=1" %] |
1516 |
[% END %] |
1493 |
|
1517 |
|
1494 |
<script> |
1518 |
<script> |
1495 |
$(document).ready(function () { |
1519 |
$(document).ready(function () { |