Lines 125-131
Link Here
|
125 |
[% INCLUDE 'biblio-title.inc' link =1 %] |
125 |
[% INCLUDE 'biblio-title.inc' link =1 %] |
126 |
[% END %] |
126 |
[% END %] |
127 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
127 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
128 |
<span>Place a hold</span> |
128 |
[% IF closed_stack_request %] |
|
|
129 |
<span>Closed stack request</span> |
130 |
[% ELSE %] |
131 |
<span>Place a hold</span> |
132 |
[% END %] |
129 |
[% END %] |
133 |
[% END %] |
130 |
[% ELSE %] |
134 |
[% ELSE %] |
131 |
[% IF ( patron ) %] |
135 |
[% IF ( patron ) %] |
Lines 222-228
Link Here
|
222 |
[% END %] |
226 |
[% END %] |
223 |
|
227 |
|
224 |
[% UNLESS ( multi_hold ) %] |
228 |
[% UNLESS ( multi_hold ) %] |
225 |
<h2>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %]by [% biblio.author | html %][% END %]</h2> |
229 |
[% IF closed_stack_request %] |
|
|
230 |
<h2>Closed stack request on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %]by [% biblio.author | html %][% END %]</h2> |
231 |
[% ELSE %] |
232 |
<h2>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %]by [% biblio.author | html %][% END %]</h2> |
233 |
[% END %] |
226 |
[% ELSE %] |
234 |
[% ELSE %] |
227 |
<h2> |
235 |
<h2> |
228 |
[% IF ( patron ) %] |
236 |
[% 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-784
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"> Hold next available item </label> |
628 |
</legend> |
629 |
<input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" /> |
630 |
<fieldset class="enable_request_any disable_request_group disable_request_specific"> |
631 |
[% IF force_hold_level == 'item' # Patron has placed a item level hold previously for this record %] |
632 |
<span class="error"> |
633 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
634 |
Hold must be item level |
635 |
</span> |
636 |
[% ELSIF force_hold_level == 'item_group' # Patron has placed an item group level hold previously for this record %] |
637 |
<span class="error"> |
638 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
639 |
Hold must be item group level |
640 |
</span> |
641 |
[% ELSE %] |
642 |
<ol> |
643 |
<li> |
644 |
<label for="pickup">Pickup at:</label> |
645 |
<select name="pickup" id="pickup-next-avail" data-biblio-id="[% biblio.biblionumber | html %]" data-patron-id="[% patron.borrowernumber | html %]" data-pickup-location-source="biblio"> |
646 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
647 |
</select> |
648 |
</li> |
649 |
|
650 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
651 |
<li> |
652 |
<label for="itemtype">Request specific item type:</label> |
653 |
<select name="itemtype" id="itemtype"> |
654 |
<option value="">Any item type</option> |
655 |
[%- FOREACH itemtype IN available_itemtypes %] |
656 |
<option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option> |
657 |
[%- END %] |
658 |
</select> |
659 |
</li> |
660 |
[% END %] |
661 |
[% UNLESS remaining_holds_for_record == 1 %] |
662 |
<li> |
663 |
<label for="holds_to_place_count">Holds to place (count)</label> |
664 |
<input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" value="1" /> |
665 |
</li> |
666 |
[% ELSE %] |
667 |
<input type="hidden" name="holds_to_place_count" value="1" /> |
668 |
[% END %] |
669 |
</ol> |
670 |
[% END %] |
671 |
|
672 |
<fieldset class="action"> |
673 |
[% IF ( patron.borrowernumber ) %] |
674 |
[% IF ( override_required ) %] |
675 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
676 |
[% ELSIF ( none_available ) %] |
677 |
<button type="submit" id="hold_grp_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
678 |
[% ELSE %] |
679 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary">Place hold</button> |
680 |
[% END %] |
681 |
[% END %] |
682 |
</fieldset> |
683 |
</fieldset> |
684 |
</fieldset> |
685 |
|
686 |
<hr /> |
687 |
|
688 |
[% biblio_info = biblioloop.0 %] |
628 |
[% biblio_info = biblioloop.0 %] |
689 |
<!-- ItemGroup level holds --> |
629 |
|
690 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio_info.object.item_groups.count %] |
630 |
[% UNLESS closed_stack_request %] |
691 |
<fieldset class="rows any_specific"> |
631 |
<fieldset class="rows any_specific"> |
692 |
<legend> |
632 |
<legend> |
693 |
[% IF force_hold_level == 'item_group' %] |
633 |
[% IF force_hold_level == 'item' || force_hold_level == 'item_group' %] |
694 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" checked="checked" disabled="true" /> |
634 |
<input type="radio" id="requestany" name="request" disabled="true" /> |
|
|
635 |
[% ELSIF force_hold_level == 'record' %] |
636 |
<input type="radio" id="requestany" checked="checked" value="Any" disabled="true" /> |
637 |
<input type="hidden" name="request" value="Any" /> |
695 |
<span class="error"><i>(Required)</i></span> |
638 |
<span class="error"><i>(Required)</i></span> |
696 |
[% ELSIF force_hold_level == 'item' || force_hold_level == 'record' %] |
|
|
697 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" disabled="true" /> |
698 |
[% ELSE %] |
639 |
[% ELSE %] |
699 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" /> |
640 |
<input type="radio" id="requestany" name="request" checked="checked" value="Any" /> |
700 |
[% END %] |
641 |
[% END %] |
701 |
<label for="requestgrp" class="inline"> Hold next available item from an item group </label> |
642 |
<label for="requestany" class="inline"> Hold next available item </label> |
702 |
</legend> |
643 |
</legend> |
703 |
|
644 |
<input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" /> |
704 |
<fieldset class="enable_request_group disable_request_any disable_request_specific"> |
645 |
<fieldset class="enable_request_any disable_request_group disable_request_specific"> |
705 |
[% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] |
646 |
[% IF force_hold_level == 'item' # Patron has placed a item level hold previously for this record %] |
706 |
<span class="error"> |
|
|
707 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
708 |
Hold must be record level |
709 |
</span> |
710 |
[% ELSIF force_hold_level == 'item' # Patron has placed an item level hold previously for this record %] |
711 |
<span class="error"> |
647 |
<span class="error"> |
712 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
648 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
713 |
Hold must be item level |
649 |
Hold must be item level |
714 |
</span> |
650 |
</span> |
|
|
651 |
[% ELSIF force_hold_level == 'item_group' # Patron has placed an item group level hold previously for this record %] |
652 |
<span class="error"> |
653 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
654 |
Hold must be item group level |
655 |
</span> |
715 |
[% ELSE %] |
656 |
[% ELSE %] |
716 |
<ul> |
657 |
<ol> |
717 |
<li> |
658 |
<li> |
718 |
<label for="pickup">Pickup at:</label> |
659 |
<label for="pickup">Pickup at:</label> |
719 |
<select name="pickup" id="pickup-item-group" data-biblio-id="[% biblio.biblionumber | html %]" data-patron-id="[% patron.borrowernumber | html %]" data-pickup-location-source="biblio"> |
660 |
<select name="pickup" id="pickup-next-avail" data-biblio-id="[% biblio.biblionumber | html %]" data-patron-id="[% patron.borrowernumber | html %]" data-pickup-location-source="biblio"> |
720 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
661 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
721 |
</select> |
662 |
</select> |
722 |
</li> |
663 |
</li> |
723 |
<li> |
664 |
|
724 |
<table id="requestgroup"> |
665 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
725 |
<thead> |
666 |
<li> |
726 |
<tr> |
667 |
<label for="itemtype">Request specific item type:</label> |
727 |
<th>Hold</th> |
668 |
<select name="itemtype" id="itemtype"> |
728 |
<th>Item group</th> |
669 |
<option value="">Any item type</option> |
729 |
<th>Holdable items</th> |
670 |
[%- FOREACH itemtype IN available_itemtypes %] |
730 |
</tr> |
671 |
<option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option> |
731 |
</thead> |
672 |
[%- END %] |
732 |
<tbody> |
673 |
</select> |
733 |
[% FOREACH g IN biblio_info.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
674 |
</li> |
734 |
[% IF g.items.count %] |
675 |
[% END %] |
735 |
<tr> |
676 |
[% UNLESS remaining_holds_for_record == 1 %] |
736 |
<td> |
677 |
<li> |
737 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" /> |
678 |
<label for="holds_to_place_count">Holds to place (count)</label> |
738 |
</td> |
679 |
<input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" value="1" /> |
739 |
<td> |
680 |
</li> |
740 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
681 |
[% ELSE %] |
741 |
</td> |
682 |
<input type="hidden" name="holds_to_place_count" value="1" /> |
742 |
<td> |
683 |
[% END %] |
743 |
[% FOREACH i IN g.items %] |
684 |
</ol> |
744 |
<div><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% i.biblionumber | uri %]#item[% i.itemnumber | uri %]">[% i.barcode | html %]</a></div> |
|
|
745 |
[% END %] |
746 |
</td> |
747 |
</tr> |
748 |
[% ELSE %] |
749 |
<tr> |
750 |
<td> |
751 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" disabled="disabled" /> |
752 |
</td> |
753 |
<td> |
754 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
755 |
</td> |
756 |
<td> |
757 |
<div class="error">No holdable items in this item group.</div> |
758 |
</td> |
759 |
</tr> |
760 |
[% END %] |
761 |
[% END %] |
762 |
</tbody> |
763 |
</table> |
764 |
</li> |
765 |
</ul> |
766 |
[% END %] |
685 |
[% END %] |
|
|
686 |
|
767 |
<fieldset class="action"> |
687 |
<fieldset class="action"> |
768 |
[% IF ( patron.borrowernumber ) %] |
688 |
[% IF ( patron.borrowernumber ) %] |
769 |
[% IF ( override_required ) %] |
689 |
[% IF ( override_required ) %] |
770 |
<button type="submit" id="hold_any_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
690 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
771 |
[% ELSIF ( none_available ) %] |
691 |
[% ELSIF ( none_available ) %] |
772 |
<button type="submit" id="hold_any_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
692 |
<button type="submit" id="hold_grp_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
773 |
[% ELSE %] |
693 |
[% ELSE %] |
774 |
<button type="submit" id="hold_any_btn" class="btn btn-primary">Place hold</button> |
694 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary">Place hold</button> |
775 |
[% END %] |
695 |
[% END %] |
776 |
[% END %] |
696 |
[% END %] |
777 |
</fieldset> |
697 |
</fieldset> |
778 |
</fieldset> |
698 |
</fieldset> |
779 |
</fieldset> |
699 |
</fieldset> |
|
|
700 |
|
701 |
<hr /> |
702 |
|
703 |
[% biblio_info = biblioloop.0 %] |
704 |
<!-- ItemGroup level holds --> |
705 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio_info.object.item_groups.count %] |
706 |
<fieldset class="rows any_specific"> |
707 |
<legend> |
708 |
[% IF force_hold_level == 'item_group' %] |
709 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" checked="checked" disabled="true" /> |
710 |
<span class="error"><i>(Required)</i></span> |
711 |
[% ELSIF force_hold_level == 'item' || force_hold_level == 'record' %] |
712 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" disabled="true" /> |
713 |
[% ELSE %] |
714 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" /> |
715 |
[% END %] |
716 |
<label for="requestgrp" class="inline"> Hold next available item from an item group </label> |
717 |
</legend> |
718 |
|
719 |
<fieldset class="enable_request_group disable_request_any disable_request_specific"> |
720 |
[% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] |
721 |
<span class="error"> |
722 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
723 |
Hold must be record level |
724 |
</span> |
725 |
[% ELSIF force_hold_level == 'item' # Patron has placed an item level hold previously for this record %] |
726 |
<span class="error"> |
727 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
728 |
Hold must be item level |
729 |
</span> |
730 |
[% ELSE %] |
731 |
<ul> |
732 |
<li> |
733 |
<label for="pickup">Pickup at:</label> |
734 |
<select name="pickup" id="pickup-item-group" data-biblio-id="[% biblio.biblionumber | html %]" data-patron-id="[% patron.borrowernumber | html %]" data-pickup-location-source="biblio"> |
735 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
736 |
</select> |
737 |
</li> |
738 |
<li> |
739 |
<table id="requestgroup"> |
740 |
<thead> |
741 |
<tr> |
742 |
<th>Hold</th> |
743 |
<th>Item group</th> |
744 |
<th>Holdable items</th> |
745 |
</tr> |
746 |
</thead> |
747 |
<tbody> |
748 |
[% FOREACH g IN biblio_info.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
749 |
[% IF g.items.count %] |
750 |
<tr> |
751 |
<td> |
752 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" /> |
753 |
</td> |
754 |
<td> |
755 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
756 |
</td> |
757 |
<td> |
758 |
[% FOREACH i IN g.items %] |
759 |
<div><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% i.biblionumber | uri %]#item[% i.itemnumber | uri %]">[% i.barcode | html %]</a></div> |
760 |
[% END %] |
761 |
</td> |
762 |
</tr> |
763 |
[% ELSE %] |
764 |
<tr> |
765 |
<td> |
766 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" disabled="disabled" /> |
767 |
</td> |
768 |
<td> |
769 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
770 |
</td> |
771 |
<td> |
772 |
<div class="error">No holdable items in this item group.</div> |
773 |
</td> |
774 |
</tr> |
775 |
[% END %] |
776 |
[% END %] |
777 |
</tbody> |
778 |
</table> |
779 |
</li> |
780 |
</ul> |
781 |
[% END %] |
782 |
<fieldset class="action"> |
783 |
[% IF ( patron.borrowernumber ) %] |
784 |
[% IF ( override_required ) %] |
785 |
<button type="submit" id="hold_any_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
786 |
[% ELSIF ( none_available ) %] |
787 |
<button type="submit" id="hold_any_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
788 |
[% ELSE %] |
789 |
<button type="submit" id="hold_any_btn" class="btn btn-primary">Place hold</button> |
790 |
[% END %] |
791 |
[% END %] |
792 |
</fieldset> |
793 |
</fieldset> |
794 |
</fieldset> |
795 |
[% END %] |
796 |
<!-- /ItemGroup level holds --> |
780 |
[% END %] |
797 |
[% END %] |
781 |
<!-- /ItemGroup level holds --> |
|
|
782 |
|
798 |
|
783 |
<fieldset class="rows any_specific"> |
799 |
<fieldset class="rows any_specific"> |
784 |
<legend> |
800 |
<legend> |
Lines 1158-1163
Link Here
|
1158 |
><li> <strong>No items are available</strong> to be placed on hold</li></ul |
1174 |
><li> <strong>No items are available</strong> to be placed on hold</li></ul |
1159 |
> |
1175 |
> |
1160 |
[% END %] |
1176 |
[% END %] |
|
|
1177 |
|
1178 |
[% IF itemloo.is_closed_stack %] |
1179 |
<br /><span>Closed stack</span> |
1180 |
[% END %] |
1161 |
</td> |
1181 |
</td> |
1162 |
</tr> |
1182 |
</tr> |
1163 |
[% END # /FOREACH biblioloo %] |
1183 |
[% END # /FOREACH biblioloo %] |
Lines 1431-1436
Link Here
|
1431 |
[% IF multi_hold %] |
1451 |
[% IF multi_hold %] |
1432 |
[% SET url_biblio_params = url_biblio_params _ "&multi_hold=1" %] |
1452 |
[% SET url_biblio_params = url_biblio_params _ "&multi_hold=1" %] |
1433 |
[% END %] |
1453 |
[% END %] |
|
|
1454 |
[% IF closed_stack_request %] |
1455 |
[% SET url_biblio_params = url_biblio_params _ "&closed_stack_request=1" %] |
1456 |
[% END %] |
1434 |
<script> |
1457 |
<script> |
1435 |
$(document).ready(function () { |
1458 |
$(document).ready(function () { |
1436 |
hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %]; |
1459 |
hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %]; |