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