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