Lines 490-559
Link Here
|
490 |
<div class="dialog alert hide holdalert"> |
490 |
<div class="dialog alert hide holdalert"> |
491 |
</div> |
491 |
</div> |
492 |
|
492 |
|
493 |
<fieldset class="rows"> |
493 |
[% UNLESS ( multi_hold ) %] |
494 |
<legend>Hold details</legend> |
|
|
495 |
<form action="placerequest.pl" method="post" name="form" id="hold-request-form"> |
494 |
<form action="placerequest.pl" method="post" name="form" id="hold-request-form"> |
|
|
495 |
<fieldset class="rows"> |
496 |
<legend>Hold details</legend> |
496 |
|
497 |
|
497 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
498 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
498 |
[% FOREACH biblionumber IN biblionumbers %] |
499 |
[% FOREACH biblionumber IN biblionumbers %] |
499 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
500 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
500 |
[% END %] |
|
|
501 |
[% IF ( multi_hold ) %] |
502 |
<input type="hidden" name="multi_holds" id="multi_holds" value="1" /> |
503 |
<input type="hidden" name="request" value="any"/> |
504 |
[% FOREACH biblioloo IN biblioloop %] |
505 |
[% UNLESS biblioloo.none_avail %] |
506 |
<input type="hidden" name="holdable_bibs" id="holdable_bibs" value="[% biblioloo.biblionumber | html %]"/> |
507 |
<input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/> |
508 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
509 |
[% END %] |
510 |
[% END %] |
501 |
[% END %] |
511 |
[% ELSE %] |
502 |
<input type="hidden" name="holdable_bibs" id="holdable_bibs" value="[% biblio.biblionumber | html %]"/> |
512 |
<input type="hidden" name="holdable_bibs" id="holdable_bibs" value="[% biblio.biblionumber | html %]"/> |
503 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
513 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
504 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
514 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
|
|
515 |
[% END # /IF multi_hold %] |
516 |
|
505 |
|
517 |
<ol> |
506 |
<ol> |
518 |
<li> |
507 |
<li> |
519 |
<span class="label">Patron:</span> |
508 |
<span class="label">Patron:</span> |
520 |
[% IF ( patron.borrowernumber ) %] |
509 |
[% IF ( patron.borrowernumber ) %] |
521 |
[% INCLUDE 'patron-title.inc' patron => patron no_title => 1 no_cardnumber => 1 hide_patron_infos_if_needed => 1 %] |
510 |
[% INCLUDE 'patron-title.inc' patron => patron no_title => 1 no_cardnumber => 1 hide_patron_infos_if_needed => 1 %] |
522 |
[% ELSE %] |
511 |
[% ELSE %] |
523 |
Not defined yet |
512 |
Not defined yet |
524 |
[% END %] |
513 |
[% END %] |
525 |
</li> |
514 |
</li> |
526 |
|
515 |
|
527 |
[% UNLESS ( multi_hold ) %] |
|
|
528 |
<li> |
516 |
<li> |
529 |
<span class="label">Estimated priority:</span> |
517 |
<span class="label">Estimated priority:</span> |
530 |
<strong>[% fixedRank | html %]</strong> |
518 |
<strong>[% fixedRank | html %]</strong> |
531 |
</li> |
519 |
</li> |
532 |
[% END %] |
|
|
533 |
|
520 |
|
534 |
<li> |
521 |
<li> |
535 |
<label for="holdnotes">Notes:</label> |
522 |
<label for="holdnotes">Notes:</label> |
536 |
<textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea> |
523 |
<textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea> |
537 |
</li> |
524 |
</li> |
538 |
<li> |
|
|
539 |
<label for="pickup">Pickup at:</label> |
540 |
[% UNLESS ( multi_hold ) %] |
541 |
<select name="pickup" id="pickup" |
542 |
data-biblio-id="[% biblio.biblionumber | html %]" |
543 |
data-patron-id="[% patron.borrowernumber | html %]" |
544 |
data-pickup-location-source="biblio"> |
545 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
546 |
[% ELSE %] |
547 |
<select name="pickup" id="pickup_multi" data-patron-id="[% patron.borrowernumber | html %]"> |
548 |
<option value="" selected="selected"></option> |
549 |
[% FOREACH pickup_location IN multi_pickup_locations %] |
550 |
<option value="[% pickup_location.branchcode | html %]">[% pickup_location.branchname | html %]</option> |
551 |
[% END %] |
552 |
[% END %] |
553 |
</select> |
554 |
</li> |
555 |
|
525 |
|
556 |
[% UNLESS ( multi_hold ) %] |
|
|
557 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
526 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
558 |
<li> |
527 |
<li> |
559 |
<label for="itemtype">Request specific item type:</label> |
528 |
<label for="itemtype">Request specific item type:</label> |
Lines 565-571
Link Here
|
565 |
</select> |
534 |
</select> |
566 |
</li> |
535 |
</li> |
567 |
[% END %] |
536 |
[% END %] |
568 |
[% END # /UNLESS multi_hold %] |
|
|
569 |
|
537 |
|
570 |
[% IF ( Koha.Preference('AllowHoldDateInFuture') ) %] |
538 |
[% IF ( Koha.Preference('AllowHoldDateInFuture') ) %] |
571 |
<li> |
539 |
<li> |
Lines 579-629
Link Here
|
579 |
<input id="expiration_date" name="expiration_date" id="to" size="10" type="text" class="flatpickr" data-flatpickr-futuredate="true" /> |
547 |
<input id="expiration_date" name="expiration_date" id="to" size="10" type="text" class="flatpickr" data-flatpickr-futuredate="true" /> |
580 |
</li> |
548 |
</li> |
581 |
|
549 |
|
582 |
[% UNLESS ( multi_hold ) %] |
550 |
<li id="non_priority_list_item"> |
|
|
551 |
<label for="non_priority">Non priority hold:</label> |
552 |
<input name="non_priority" id="non_priority" type="checkbox" /> |
553 |
<span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span> |
554 |
</li> |
583 |
<li> |
555 |
<li> |
584 |
<label for="requestany">Hold next available item </label> |
556 |
<label for="holdnotes">Notes:</label> |
585 |
[% IF force_hold_level == 'item' || force_hold_level == 'item_group' %] |
557 |
<textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea> |
586 |
<input type="checkbox" id="requestany" name="request" disabled="true" /> |
558 |
</li> |
|
|
559 |
</ol> |
560 |
</fieldset> |
561 |
<fieldset class="rows"> |
562 |
<legend> |
563 |
<label for="requestany" class="inline"> |
564 |
Hold next available item |
565 |
</label> |
566 |
[% IF force_hold_level == 'item' || force_hold_level == 'item_group' %] |
567 |
<input type="radio" id="requestany" name="request" disabled="true" /> |
587 |
[% ELSIF force_hold_level == 'record' %] |
568 |
[% ELSIF force_hold_level == 'record' %] |
588 |
<input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/> |
569 |
<input type="radio" id="requestany" checked="checked" value="Any" disabled="true"/> |
589 |
<input type="hidden" name="request" value="Any"/> |
570 |
<input type="hidden" name="request" value="Any"/> |
590 |
[% ELSE %] |
571 |
[% ELSE %] |
591 |
<input type="checkbox" id="requestany" name="request" checked="checked" value="Any" /> |
572 |
<input type="radio" id="requestany" name="request" checked="checked" value="Any" /> |
592 |
[% END %] |
573 |
[% END %] |
593 |
<input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" /> |
574 |
</legend> |
594 |
</li> |
575 |
<input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" /> |
|
|
576 |
<ol> |
595 |
|
577 |
|
596 |
[% IF remaining_holds_for_record > 1 %] |
|
|
597 |
<li> |
578 |
<li> |
598 |
<label for="holds_to_place_count">Holds to place (count)</label> |
579 |
<label for="pickup">Pickup at:</label> |
599 |
<input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" maxlength="[% remaining_holds_for_record | html %]" value="1" /> |
580 |
<select name="pickup" id="pickup-next-avail" |
|
|
581 |
data-biblio-id="[% biblio.biblionumber | html %]" |
582 |
data-patron-id="[% patron.borrowernumber | html %]" |
583 |
data-pickup-location-source="biblio"> |
584 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
585 |
</select> |
600 |
</li> |
586 |
</li> |
601 |
[% ELSE %] |
|
|
602 |
<input type="hidden" name="holds_to_place_count" value="1" /> |
603 |
[% END %] |
604 |
[% END # /UNLESS multi_hold %] |
605 |
|
587 |
|
606 |
<li id="non_priority_list_item"> |
588 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
607 |
<label for="non_priority">Non priority hold:</label> |
589 |
<li> |
608 |
<input name="non_priority" id="non_priority" type="checkbox" /> |
590 |
<label for="itemtype">Request specific item type:</label> |
609 |
<span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span> |
591 |
<select name="itemtype" id="itemtype"> |
610 |
</li> |
592 |
<option value="">Any item type</option> |
611 |
</ol> |
593 |
[%- FOREACH itemtype IN available_itemtypes %] |
|
|
594 |
<option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option> |
595 |
[%- END %] |
596 |
</select> |
597 |
</li> |
598 |
[% END %] |
599 |
[% IF remaining_holds_for_record > 1 %] |
600 |
<li> |
601 |
<label for="holds_to_place_count">Holds to place (count)</label> |
602 |
<input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" maxlength="[% remaining_holds_for_record | html %]" value="1" /> |
603 |
</li> |
604 |
[% ELSE %] |
605 |
<input type="hidden" name="holds_to_place_count" value="1" /> |
606 |
[% END %] |
607 |
</ol> |
608 |
|
612 |
|
609 |
|
613 |
[% UNLESS ( multi_hold ) %] |
|
|
614 |
<fieldset class="action"> |
610 |
<fieldset class="action"> |
615 |
[% IF ( patron.borrowernumber ) %] |
611 |
[% IF ( patron.borrowernumber ) %] |
616 |
[% IF ( override_required ) %] |
612 |
[% IF ( override_required ) %] |
617 |
<button type="submit" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
613 |
<button type="submit" id="hold_any_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
618 |
[% ELSIF ( none_available ) %] |
614 |
[% ELSIF ( none_available ) %] |
619 |
<button type="submit" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
615 |
<button type="submit" id="hold_any_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button> |
620 |
[% ELSE %] |
616 |
[% ELSE %] |
621 |
<button type="submit" class="btn btn-primary">Place hold</button> |
617 |
<button type="submit" id="hold_any_btn" class="btn btn-primary">Place hold</button> |
622 |
[% END %] |
618 |
[% END %] |
623 |
[% END %] |
619 |
[% END %] |
624 |
</fieldset> |
620 |
</fieldset> |
|
|
621 |
</fieldset> |
625 |
|
622 |
|
626 |
[% biblio = biblioloop.0 %] |
623 |
<hr/> |
|
|
624 |
|
625 |
[% biblio = biblioloop.0 %] |
626 |
<!-- ItemGroup level holds --> |
627 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %] |
628 |
<fieldset class="rows"> |
629 |
<legend> |
630 |
<label for="requestgrp" class="inline"> |
631 |
Hold next available item from an item group |
632 |
</label> |
633 |
[% IF force_hold_level == 'item_group' %] |
634 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" checked="checked" disabled="true" /> |
635 |
<span class="error"><i>(Required)</i></span> |
636 |
[% ELSIF force_hold_level == 'item' || force_hold_level == 'record' %] |
637 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" disabled="true" /> |
638 |
[% ELSE %] |
639 |
<input type="radio" class="requestgrp" id="requestgrp" name="request" /> |
640 |
[% END %] |
641 |
</legend> |
642 |
|
643 |
[% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] |
644 |
<span class="error"> |
645 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
646 |
Hold must be record level |
647 |
</span> |
648 |
[% ELSIF force_hold_level == 'item' # Patron has placed an item level hold previously for this record %] |
649 |
<span class="error"> |
650 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
651 |
Hold must be item level |
652 |
</span> |
653 |
[% ELSE %] |
654 |
<ul> |
655 |
<li> |
656 |
<label for="pickup">Pickup at:</label> |
657 |
<select name="pickup" id="pickup-item-group" |
658 |
data-biblio-id="[% biblio.biblionumber | html %]" |
659 |
data-patron-id="[% patron.borrowernumber | html %]" |
660 |
data-pickup-location-source="biblio"> |
661 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
662 |
</select> |
663 |
</li> |
664 |
<li> |
665 |
<table id="requestgroup"> |
666 |
<thead> |
667 |
<tr> |
668 |
<th>Hold</th> |
669 |
<th>Item group</th> |
670 |
</tr> |
671 |
</thead> |
672 |
<tbody> |
673 |
[% FOREACH g IN biblio.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
674 |
[% IF g.items %] |
675 |
<tr> |
676 |
<td> |
677 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" /> |
678 |
</td> |
679 |
<td> |
680 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
681 |
</td> |
682 |
</tr> |
683 |
[% END %] |
684 |
[% END %] |
685 |
</tbody> |
686 |
</table> |
687 |
</li> |
688 |
</ul> |
689 |
[% END %] |
690 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary warning">Place hold</button> |
691 |
</fieldset> |
692 |
[% END %] |
693 |
<!-- /ItemGroup level holds --> |
694 |
|
695 |
|
696 |
<fieldset class="rows"> |
697 |
<legend> |
698 |
<label class="inline"> |
699 |
Place a hold on a specific item |
700 |
</label> |
701 |
[% IF force_hold_level == 'item' %] |
702 |
<input type="radio" name="request" class="requestspecific" checked="checked" disabled='disabled'/> |
703 |
<span class="error"><em>(Required)</em></span> |
704 |
[% ELSIF force_hold_level == 'record' || force_hold_level == 'item_group' %] |
705 |
<input type="radio" name="request" class="requestspecific" disabled='disabled'/> |
706 |
[% ELSE %] |
707 |
<input type="radio" name="request" class="requestspecific"/> |
708 |
[% END %] |
709 |
</legend> |
627 |
|
710 |
|
628 |
<ol> |
711 |
<ol> |
629 |
[% UNLESS Koha.Preference('item-level_itypes') %] |
712 |
[% UNLESS Koha.Preference('item-level_itypes') %] |
Lines 641-699
Link Here
|
641 |
[% END %] |
724 |
[% END %] |
642 |
</ol> |
725 |
</ol> |
643 |
|
726 |
|
644 |
<!-- ItemGroup level holds --> |
|
|
645 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %] |
646 |
<h2 style="padding: 0 1em;"> |
647 |
Hold next available item from an item group |
648 |
[% IF force_hold_level == 'item_group' %] |
649 |
<span class="error"><i>(Required)</i></span> |
650 |
[% END %] |
651 |
</h2> |
652 |
|
653 |
[% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] |
654 |
<span class="error"> |
655 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
656 |
Hold must be record level |
657 |
</span> |
658 |
[% ELSIF force_hold_level == 'item' # Patron has placed an item level hold previously for this record %] |
659 |
<span class="error"> |
660 |
<i class="fa fa-times fa-lg" title="Cannot be put on hold"></i> |
661 |
Hold must be item level |
662 |
</span> |
663 |
[% ELSE %] |
664 |
<table> |
665 |
<thead> |
666 |
<tr> |
667 |
<th>Hold</th> |
668 |
<th>Item group</th> |
669 |
</tr> |
670 |
</thead> |
671 |
<tbody> |
672 |
[% FOREACH g IN biblio.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
673 |
[% IF g.items %] |
674 |
<tr> |
675 |
<td> |
676 |
<input id="item_group_id_[% g.id | html %]" type="radio" name="item_group_id" value="[% g.id | html %]" /> |
677 |
</td> |
678 |
<td> |
679 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
680 |
</td> |
681 |
</tr> |
682 |
[% END %] |
683 |
[% END %] |
684 |
</tbody> |
685 |
</table> |
686 |
[% END %] |
687 |
[% END %] |
688 |
<!-- /ItemGroup level holds --> |
689 |
|
690 |
<h2 style="padding: 0 1em;"> |
691 |
Place a hold on a specific item |
692 |
[% IF force_hold_level == 'item' %] |
693 |
<span class="error"><em>(Required)</em></span> |
694 |
[% END %] |
695 |
</h2> |
696 |
|
697 |
<table id="requestspecific"> |
727 |
<table id="requestspecific"> |
698 |
<thead> |
728 |
<thead> |
699 |
<tr> |
729 |
<tr> |
Lines 736-744
Link Here
|
736 |
Hold must be item group level |
766 |
Hold must be item group level |
737 |
</span> |
767 |
</span> |
738 |
[% ELSIF ( itemloo.available ) %] |
768 |
[% ELSIF ( itemloo.available ) %] |
739 |
<input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" /> |
769 |
<input type="radio" name="checkitem" class="requestspecific" value="[% itemloo.itemnumber | html %]" /> |
740 |
[% ELSIF ( itemloo.override ) %] |
770 |
[% ELSIF ( itemloo.override ) %] |
741 |
<input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" /> |
771 |
<input type="radio" name="checkitem" class="needsoverride requestspecific" value="[% itemloo.itemnumber | html %]" /> |
742 |
<i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i> |
772 |
<i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i> |
743 |
[% ELSE %] |
773 |
[% ELSE %] |
744 |
<span class="error"> |
774 |
<span class="error"> |
Lines 783-789
Link Here
|
783 |
</td> |
813 |
</td> |
784 |
<td> |
814 |
<td> |
785 |
[% IF (itemloo.pickup_locations_count > 0) || itemloo.override %] |
815 |
[% IF (itemloo.pickup_locations_count > 0) || itemloo.override %] |
786 |
<select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;" |
816 |
<select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations requestspecific" style="width:100%;" |
787 |
data-item-id="[% itemloo.itemnumber | html %]" |
817 |
data-item-id="[% itemloo.itemnumber | html %]" |
788 |
data-patron-id="[% patron.borrowernumber | html %]" |
818 |
data-patron-id="[% patron.borrowernumber | html %]" |
789 |
data-pickup-location-source="item"> |
819 |
data-pickup-location-source="item"> |
Lines 902-1006
Link Here
|
902 |
</table> <!-- /#requestspecific --> |
932 |
</table> <!-- /#requestspecific --> |
903 |
|
933 |
|
904 |
[% IF hiddencount %] |
934 |
[% IF hiddencount %] |
905 |
<form> |
935 |
<p class="hiddencount"> |
906 |
<p class="hiddencount"> |
936 |
<a href="request.pl?biblionumber=[% biblio.biblionumber | uri %]&borrowernumber=[% borrowernumber | uri %]&showallitems=1">Show all items ([% hiddencount | html %] hidden)</a> |
907 |
<a href="request.pl?biblionumber=[% biblio.biblionumber | uri %]&borrowernumber=[% borrowernumber | uri %]&showallitems=1">Show all items ([% hiddencount | html %] hidden)</a> |
937 |
</p> |
908 |
</p> |
|
|
909 |
</form> |
910 |
[% END # /IF hiddencount %] |
938 |
[% END # /IF hiddencount %] |
911 |
|
939 |
|
912 |
[% ELSE # /UNLESS multi_hold %] |
940 |
[% ELSE # /UNLESS multi_hold %] |
913 |
|
941 |
<fieldset class="rows"> |
914 |
<table id="requesttitles"> |
942 |
<legend>Hold details</legend> |
915 |
<tr> |
943 |
<form action="placerequest.pl" method="post" name="form" id="hold-request-form"> |
916 |
<th> </th> |
944 |
<input type="hidden" name="multi_holds" id="multi_holds" value="1" /> |
917 |
<th>Pickup location</th> |
945 |
<input type="hidden" name="request" value="any"/> |
918 |
<th>Title</th> |
946 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
919 |
[% UNLESS Koha.Preference('item-level_itypes') %] |
947 |
[% FOREACH biblioloo IN biblioloop %] |
920 |
<th>Item type</th> |
948 |
<input type="hidden" name="biblionumber" id="biblionumber" value="[% biblioloo.biblionumber | html %]"/> |
921 |
[% END %] |
949 |
[% UNLESS biblioloo.none_avail %] |
922 |
<th>Priority</th> |
950 |
<input type="hidden" name="holdable_bibs" id="holdable_bibs" value="[% biblioloo.biblionumber | html %]"/> |
923 |
<th>Information</th> |
951 |
<input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/> |
924 |
</tr> |
952 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
925 |
[% FOREACH biblioloo IN biblioloop %] |
|
|
926 |
[% IF ( biblioloo.warn ) %] |
927 |
<tr class="onissue"> |
928 |
[% ELSE %] |
929 |
<tr> |
930 |
[% END %] |
931 |
<td> |
932 |
[% UNLESS ( biblioloo.warn ) %] |
933 |
<input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/> |
934 |
[% END %] |
935 |
</td> |
936 |
<td> |
937 |
[% UNLESS ( biblioloo.none_avail || biblioloo.noitems ) %] |
938 |
<select name="pickup_[% biblioloo.biblionumber | html %]" |
939 |
class="multi_pickup_select" |
940 |
data-biblio-id="[% biblioloo.biblionumber | html %]" |
941 |
data-patron-id="[% patron.borrowernumber | html %]" |
942 |
data-pickup-locations='[% biblioloo.pickup_locations_codes.json | $raw %]'> |
943 |
<option value=""></option> |
944 |
[% FOREACH pickup_location IN biblioloo.pickup_locations %] |
945 |
<option value="[% pickup_location.branchcode | html %]">[% pickup_location.branchname | html %]</option> |
946 |
[% END %] |
947 |
</select> |
948 |
[% END %] |
953 |
[% END %] |
949 |
</td> |
954 |
[% END %] |
950 |
<td> |
955 |
|
951 |
<ul> |
956 |
<table id="requesttitles"> |
952 |
<li> |
957 |
<tr> |
953 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a> |
958 |
<th> </th> |
954 |
[% IF biblioloo.author %] by [% biblioloo.author | html %][% END %] |
959 |
<th>Pickup location</th> |
955 |
</li> |
960 |
<th>Title</th> |
956 |
[% IF ( biblioloo.publicationyear ) %] |
961 |
[% UNLESS Koha.Preference('item-level_itypes') %] |
|
|
962 |
<th>Item type</th> |
963 |
[% END %] |
964 |
<th>Priority</th> |
965 |
<th>Information</th> |
966 |
</tr> |
967 |
[% FOREACH biblioloo IN biblioloop %] |
968 |
[% IF ( biblioloo.warn ) %] |
969 |
<tr class="onissue"> |
970 |
[% ELSE %] |
971 |
<tr> |
972 |
[% END %] |
973 |
<td> |
974 |
[% UNLESS ( biblioloo.warn ) %] |
975 |
<input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/> |
976 |
[% END %] |
977 |
</td> |
978 |
<td> |
979 |
[% UNLESS ( biblioloo.none_avail || biblioloo.noitems ) %] |
980 |
<select name="pickup_[% biblioloo.biblionumber | html %]" |
981 |
class="multi_pickup_select" |
982 |
data-biblio-id="[% biblioloo.biblionumber | html %]" |
983 |
data-patron-id="[% patron.borrowernumber | html %]" |
984 |
data-pickup-locations='[% biblioloo.pickup_locations_codes.json | $raw %]'> |
985 |
<option value=""></option> |
986 |
[% FOREACH pickup_location IN biblioloo.pickup_locations %] |
987 |
<option value="[% pickup_location.branchcode | html %]">[% pickup_location.branchname | html %]</option> |
988 |
[% END %] |
989 |
</select> |
990 |
[% END %] |
991 |
</td> |
992 |
<td> |
993 |
<ul> |
957 |
<li> |
994 |
<li> |
958 |
<span class="label">Publication year:</span> [% biblioloo.publicationyear | html %] |
995 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a> |
|
|
996 |
[% IF biblioloo.author %] by [% biblioloo.author | html %][% END %] |
959 |
</li> |
997 |
</li> |
|
|
998 |
[% IF ( biblioloo.publicationyear ) %] |
999 |
<li> |
1000 |
<span class="label">Publication year:</span> [% biblioloo.publicationyear | html %] |
1001 |
</li> |
1002 |
[% END %] |
1003 |
</ul> |
1004 |
[% IF ( biblioloo.warn ) %] |
1005 |
<span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span> |
960 |
[% END %] |
1006 |
[% END %] |
961 |
</ul> |
|
|
962 |
[% IF ( biblioloo.warn ) %] |
963 |
<span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span> |
964 |
[% END %] |
965 |
</td> |
966 |
[% UNLESS Koha.Preference('item-level_itypes') %] |
967 |
<td> |
968 |
<img src="[% biblioloo.itemtype.image_location | html %]" alt="[% biblioloo.itemtype.translated_description | html %]" title="[% biblioloo.itemtype.translated_description | html %]" /> |
969 |
</td> |
1007 |
</td> |
970 |
[% END %] |
1008 |
[% UNLESS Koha.Preference('item-level_itypes') %] |
971 |
<td>[% biblioloo.rank | html %]</td> |
1009 |
<td> |
972 |
<td> |
1010 |
<img src="[% biblioloo.itemtype.image_location | html %]" alt="[% biblioloo.itemtype.translated_description | html %]" title="[% biblioloo.itemtype.translated_description | html %]" /> |
973 |
[% IF ( biblioloo.checked_previously ) %] |
1011 |
</td> |
974 |
<span>Patron has previously checked out this title</span><br/> |
|
|
975 |
[% END %] |
1012 |
[% END %] |
976 |
[% IF ( biblioloo.alreadyres ) %] |
1013 |
<td>[% biblioloo.rank | html %]</td> |
977 |
<ul> |
1014 |
<td> |
978 |
[% ELSE %] |
1015 |
[% IF ( biblioloo.checked_previously ) %] |
979 |
[% IF ( biblioloo.none_avail || biblioloo.noitems ) %] |
1016 |
<span>Patron has previously checked out this title</span><br/> |
|
|
1017 |
[% END %] |
1018 |
[% IF ( biblioloo.alreadyres ) %] |
980 |
<ul> |
1019 |
<ul> |
|
|
1020 |
[% ELSE %] |
1021 |
[% IF ( biblioloo.none_avail || biblioloo.noitems ) %] |
1022 |
<ul> |
1023 |
[% END %] |
981 |
[% END %] |
1024 |
[% END %] |
982 |
[% END %] |
|
|
983 |
|
1025 |
|
984 |
[% IF ( biblioloo.alreadyres ) %] |
1026 |
[% IF ( biblioloo.alreadyres ) %] |
985 |
<li> |
1027 |
<li> |
986 |
[% INCLUDE 'patron-title.inc' patron => patron no_title => 1 no_cardnumber => 1 hide_patron_infos_if_needed => 1 %] <strong>already has a hold</strong> on this item |
1028 |
[% INCLUDE 'patron-title.inc' patron => patron no_title => 1 no_cardnumber => 1 hide_patron_infos_if_needed => 1 %] <strong>already has a hold</strong> on this item |
987 |
</li> |
1029 |
</li> |
988 |
[% END %] |
1030 |
[% END %] |
989 |
[% IF ( biblioloo.none_avail || biblioloo.noitems ) %] |
|
|
990 |
<li> <strong>No items are available</strong> to be placed on hold</li> |
991 |
[% END %] |
992 |
|
993 |
[% IF ( biblioloo.alreadyres ) %] |
994 |
</ul> |
995 |
[% ELSE %] |
996 |
[% IF ( biblioloo.none_avail || biblioloo.noitems ) %] |
1031 |
[% IF ( biblioloo.none_avail || biblioloo.noitems ) %] |
|
|
1032 |
<li> <strong>No items are available</strong> to be placed on hold</li> |
1033 |
[% END %] |
1034 |
|
1035 |
[% IF ( biblioloo.alreadyres ) %] |
997 |
</ul> |
1036 |
</ul> |
|
|
1037 |
[% ELSE %] |
1038 |
[% IF ( biblioloo.none_avail || biblioloo.noitems ) %] |
1039 |
</ul> |
1040 |
[% END %] |
998 |
[% END %] |
1041 |
[% END %] |
999 |
[% END %] |
1042 |
</td> |
1000 |
</td> |
1043 |
</tr> |
1001 |
</tr> |
1044 |
[% END # /FOREACH biblioloo %] |
1002 |
[% END # /FOREACH biblioloo %] |
1045 |
</table> <!-- /#requesttitles --> |
1003 |
</table> <!-- /#requesttitles --> |
1046 |
</fieldset> |
1004 |
|
1047 |
|
1005 |
[% END # /UNLESS multi_hold %] |
1048 |
[% END # /UNLESS multi_hold %] |
1006 |
|
1049 |
|
Lines 1008-1034
Link Here
|
1008 |
[% IF ( patron AND patron.borrowernumber ) %] |
1051 |
[% IF ( patron AND patron.borrowernumber ) %] |
1009 |
[% IF ( multi_hold ) %] |
1052 |
[% IF ( multi_hold ) %] |
1010 |
[% IF ( override_required ) %] |
1053 |
[% IF ( override_required ) %] |
1011 |
<button type="submit" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place holds</button> |
1054 |
<button type="submit" id="hold_multi_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place holds</button> |
1012 |
[% ELSIF ( no_bibs_available ) %] |
1055 |
[% ELSIF ( no_bibs_available ) %] |
1013 |
<button type="submit" class="btn btn-primary btn-disabled" disabled="disabled">Place holds</button> |
1056 |
<button type="submit" id="hold_multi_btn" class="btn btn-primary btn-disabled" disabled="disabled">Place holds</button> |
1014 |
[% ELSIF ( none_available ) %] |
1057 |
[% ELSIF ( none_available ) %] |
1015 |
<button type="submit" class="btn btn-primary">Place holds</button> |
1058 |
<button type="submit" id="hold_multi_btn" class="btn btn-primary">Place holds</button> |
1016 |
[% ELSE %] |
1059 |
[% ELSE %] |
1017 |
<button type="submit" class="btn btn-primary" id="multi_hold_submit">Place holds</button> |
1060 |
<button type="submit" id="hold_multi_btn" class="btn btn-primary" id="multi_hold_submit">Place holds</button> |
1018 |
[% END %] |
1061 |
[% END %] |
1019 |
[% ELSE %] |
1062 |
[% ELSE %] |
1020 |
[% IF ( override_required ) %] |
1063 |
[% IF ( override_required ) %] |
1021 |
<button type="submit" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
1064 |
<button type="submit" id="hold_item_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
1022 |
[% ELSIF ( none_available ) %] |
1065 |
[% ELSIF ( none_available ) %] |
1023 |
<button type="submit" class="btn btn-primary btn-disabled" disabled="disabled">Place hold</button> |
1066 |
<button type="submit" id="hold_item_btn" class="btn btn-primary btn-disabled" disabled="disabled">Place hold</button> |
1024 |
[% ELSE %] |
1067 |
[% ELSE %] |
1025 |
<button type="submit" class="btn btn-primary">Place hold</button> |
1068 |
<button type="submit" id="hold_item_btn" class="btn btn-primary">Place hold</button> |
1026 |
[% END %] |
1069 |
[% END %] |
1027 |
[% END %] |
1070 |
[% END %] |
1028 |
[% END # /IF patron %] |
1071 |
[% END # /IF patron %] |
1029 |
</fieldset> <!-- /.action --> |
1072 |
</fieldset> <!-- /.action --> |
1030 |
</form> <!-- /#hold-request-form --> |
1073 |
</fieldset> <!-- /.rows --> |
1031 |
</fieldset> <!-- /.rows --> |
1074 |
</form> <!-- /#hold-request-form --> |
1032 |
[% END %] |
1075 |
[% END %] |
1033 |
|
1076 |
|
1034 |
[% UNLESS ( patron ) %] |
1077 |
[% UNLESS ( patron ) %] |
Lines 1346-1366
Link Here
|
1346 |
} |
1389 |
} |
1347 |
|
1390 |
|
1348 |
|
1391 |
|
1349 |
function ToggleHoldsToPlace() { |
|
|
1350 |
if ( $("#requestany").prop('checked') ) { |
1351 |
$("#holds_to_place_count").prop('disabled', false); |
1352 |
} else { |
1353 |
$("#holds_to_place_count").prop('disabled', true); |
1354 |
} |
1355 |
} |
1356 |
ToggleHoldsToPlace(); |
1392 |
ToggleHoldsToPlace(); |
1357 |
$("#requestany").on('change', function(){ |
1393 |
$("#requestany,.requestspecific[name='request'],.requestgrp").on('change', function(){ |
1358 |
ToggleHoldsToPlace(); |
1394 |
ToggleHoldsToPlace(); |
1359 |
}); |
1395 |
}); |
1360 |
|
1396 |
|
1361 |
[% IF Koha.Preference('UseBranchTransferLimits') %] |
1397 |
[% IF Koha.Preference('UseBranchTransferLimits') %] |
1362 |
$("#pickup").on('change', function(){ |
1398 |
$("#pickup,#pickup-next-avail,#pickup-item-group").on('change', function(){ |
1363 |
var pickup = $("#pickup").val(); |
1399 |
var pickup = $(this).val(); |
1364 |
var url = "?pickup=" + pickup; |
1400 |
var url = "?pickup=" + pickup; |
1365 |
url += "&borrowernumber=" + borrowernumber; |
1401 |
url += "&borrowernumber=" + borrowernumber; |
1366 |
url += "&biblionumber=" + biblionumbers[0]; |
1402 |
url += "&biblionumber=" + biblionumbers[0]; |
Lines 1373-1384
Link Here
|
1373 |
"sDom": '<"top pager"ilf>t', |
1409 |
"sDom": '<"top pager"ilf>t', |
1374 |
})); |
1410 |
})); |
1375 |
|
1411 |
|
1376 |
//Override fieldset styling for dataTables search box |
|
|
1377 |
$("div.top.pager").css("margin-left","1em"); |
1378 |
$(".dataTables_filter label").css({ |
1379 |
"width":"auto", |
1380 |
"margin-right":"0em" |
1381 |
}); |
1382 |
|
1412 |
|
1383 |
$("#club-request-form").on("submit", function() { |
1413 |
$("#club-request-form").on("submit", function() { |
1384 |
let $t = $(this); |
1414 |
let $t = $(this); |
Lines 1471-1477
Link Here
|
1471 |
} |
1501 |
} |
1472 |
}); |
1502 |
}); |
1473 |
|
1503 |
|
1474 |
$("#pickup").each( function () { |
1504 |
$("#pickup,#pickup-item-group,#pickup-next-avail").each( function () { |
1475 |
$(this).pickup_locations_dropdown(); |
1505 |
$(this).pickup_locations_dropdown(); |
1476 |
}); |
1506 |
}); |
1477 |
|
1507 |
|
Lines 1480-1498
Link Here
|
1480 |
}); |
1510 |
}); |
1481 |
}); |
1511 |
}); |
1482 |
|
1512 |
|
|
|
1513 |
function ToggleHoldsToPlace() { |
1514 |
if ( $("#requestany").prop('checked') ) { |
1515 |
$("#holds_to_place_count, #pickup-next-avail, #itemtype, #hold_any_btn").prop('disabled', false); |
1516 |
$(".requestspecific,.requestgrp").prop('checked', false); |
1517 |
$(".requestspecific","#requestspecific").prop('disabled',true); |
1518 |
$("#hold_item_btn, #hold_grp_btn, #pickup-item-group").prop("disabled", true ); |
1519 |
$("#hold_any_btn").prop("disabled", false ); |
1520 |
} else if( $(".requestspecific").prop('checked') ) { |
1521 |
$(".requestspecific","#requestspecific").prop('disabled',false); |
1522 |
$("#holds_to_place_count, #pickup-item-group, #pickup-next-avail #itemtype, #hold_any_btn").prop('disabled', true); |
1523 |
$("#hold_item_btn").prop("disabled", false ); |
1524 |
$("#hold_any_btn,#hold_grp_btn").prop("disabled", true ); |
1525 |
$("#requestany,.requestgrp").prop('checked', false); |
1526 |
} else { |
1527 |
$("#holds_to_place_count, #pickup-next-avail, #itemtype, #hold_any_btn").prop('disabled', true); |
1528 |
$("#hold_grp_btn, #pickup-item-group").prop("disabled", false ); |
1529 |
$(".requestspecific","#requestspecific").prop('disabled',true); |
1530 |
$("#hold_any_btn,#hold_item_btn").prop("disabled", true ); |
1531 |
$("#requestany,.requestspecific").prop('checked', false); |
1532 |
} |
1533 |
} |
1534 |
|
1483 |
function check( e, table ) { |
1535 |
function check( e, table ) { |
1484 |
|
1536 |
|
1485 |
var msg = ""; |
1537 |
var msg = ""; |
1486 |
|
1538 |
|
1487 |
if ( ! $("#requestany").is(":checked") ) { |
1539 |
if ( $(".requestspecific").is(":checked") ) { |
1488 |
// requestany not selected, go through the item-specific cases |
1540 |
// requestany not selected, go through the item-specific cases |
1489 |
if ( $('input[type="radio"]:checked').length > 0 ) { |
1541 |
var selected_item = $('#requestspecific input[type="radio"]:checked'); |
|
|
1542 |
if ( selected_item.length > 0 ) { |
1490 |
// got item-specific hold requests in the form! |
1543 |
// got item-specific hold requests in the form! |
1491 |
// verify they have a pickup location selected |
1544 |
// verify they have a pickup location selected |
1492 |
|
1545 |
|
1493 |
if (table.find('input[type="radio"]:checked') |
1546 |
if ( selected_item.closest('tr').find(".pickup_locations").val() == '' ) { |
1494 |
.closest('tr') |
|
|
1495 |
.find(".pickup_locations").val() === null) { |
1496 |
|
1547 |
|
1497 |
msg = _("- Please select a pickup location for the item" + "\n") |
1548 |
msg = _("- Please select a pickup location for the item" + "\n") |
1498 |
} |
1549 |
} |
Lines 1500-1507
Link Here
|
1500 |
else { |
1551 |
else { |
1501 |
msg = (_("- Please select an item to place a hold") + "\n"); |
1552 |
msg = (_("- Please select an item to place a hold") + "\n"); |
1502 |
} |
1553 |
} |
|
|
1554 |
} else if ( $("#requestgrp").is(":checked") ) { |
1555 |
var selected_group = $('#requestgroup input[type="radio"]:checked'); |
1556 |
if( selected_group.length > 0 ){ |
1557 |
if( $("#pickup-item-group").length < 1 || $("#pickup-item-grp").val() == "" ){ |
1558 |
msg = _("- Please select a pickup location for this hold" + "\n"); |
1559 |
} |
1560 |
} else { |
1561 |
msg = (_("- Please select an item group to place a hold") + "\n"); |
1562 |
} |
1503 |
} else { |
1563 |
} else { |
1504 |
if( $("#pickup").length < 1 || $("#pickup").val() == "" || $('#pickup').val() === null ){ |
1564 |
// Requesting next available |
|
|
1565 |
if( $("#pickup-next-avail").length < 1 || $("#pickup-next-avail").val() == "" || $('#pickup-next-avail').val() === null ){ |
1505 |
msg = _("- Please select a pickup location for this hold" + "\n"); |
1566 |
msg = _("- Please select a pickup location for this hold" + "\n"); |
1506 |
} |
1567 |
} |
1507 |
} |
1568 |
} |
Lines 1573-1600
Link Here
|
1573 |
$("button.warning").click(function() { |
1634 |
$("button.warning").click(function() { |
1574 |
return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") ); |
1635 |
return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") ); |
1575 |
}); |
1636 |
}); |
1576 |
$("#requestany").click(function() { |
|
|
1577 |
if(this.checked){ |
1578 |
$("input[name=checkitem]").each(function() { |
1579 |
$(this).prop("checked", false); |
1580 |
}); |
1581 |
} |
1582 |
}); |
1583 |
$("input[name=checkitem]").click(function() { |
1584 |
onechecked = 0; |
1585 |
$("input[name=checkitem]").each(function() { |
1586 |
if(this.checked){ |
1587 |
onechecked = 1; |
1588 |
} |
1589 |
}); |
1590 |
if(onechecked == 1){ |
1591 |
$("#requestany").prop("checked", false); |
1592 |
$("#holds_to_place_count").prop('disabled', true); |
1593 |
} else { |
1594 |
$("#requestany").prop("checked",true); |
1595 |
$("#holds_to_place_count").prop('disabled', false); |
1596 |
} |
1597 |
}); |
1598 |
var prev_rank_request; |
1637 |
var prev_rank_request; |
1599 |
$("select[name=rank-request]").on("focus", function() { |
1638 |
$("select[name=rank-request]").on("focus", function() { |
1600 |
prev_rank_request = $(this).val(); |
1639 |
prev_rank_request = $(this).val(); |