Lines 488-559
Link Here
|
488 |
<div class="dialog alert hide holdalert"> |
488 |
<div class="dialog alert hide holdalert"> |
489 |
</div> |
489 |
</div> |
490 |
|
490 |
|
491 |
<fieldset class="rows"> |
491 |
[% UNLESS ( multi_hold ) %] |
492 |
<legend>Hold details</legend> |
|
|
493 |
<form action="placerequest.pl" method="post" name="form" id="hold-request-form"> |
492 |
<form action="placerequest.pl" method="post" name="form" id="hold-request-form"> |
494 |
[% INCLUDE 'csrf-token.inc' %] |
493 |
[% INCLUDE 'csrf-token.inc' %] |
495 |
|
|
|
496 |
<input type="hidden" name="op" value="cud-placerequest" /> |
494 |
<input type="hidden" name="op" value="cud-placerequest" /> |
497 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
495 |
<fieldset class="rows"> |
498 |
[% FOREACH biblionumber IN biblionumbers %] |
496 |
<legend>Hold details</legend> |
499 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
497 |
|
500 |
[% END %] |
498 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
501 |
[% IF ( multi_hold ) %] |
499 |
[% FOREACH biblionumber IN biblionumbers %] |
502 |
<input type="hidden" name="multi_holds" id="multi_holds" value="1" /> |
500 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
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 hide_patron_infos_if_needed => 1 %] |
510 |
[% INCLUDE 'patron-title.inc' patron => patron no_title => 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> |
622 |
|
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 |
<th>Holdable items</th> |
671 |
</tr> |
672 |
</thead> |
673 |
<tbody> |
674 |
[% FOREACH g IN biblio.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
675 |
[% IF g.items.count %] |
676 |
<tr> |
677 |
<td> |
678 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" 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 |
<td> |
684 |
[% FOREACH i IN g.items %] |
685 |
<div><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% i.biblionumber | uri %]#item[% i.itemnumber | uri %]">[% i.barcode | html %]</a></div> |
686 |
[% END %] |
687 |
</td> |
688 |
</tr> |
689 |
[% ELSE %] |
690 |
<tr> |
691 |
<td> |
692 |
<input id="item_group_id_[% g.id | html %]" class="requestgrp" type="radio" name="item_group_id" value="[% g.id | html %]" disabled="disabled" /> |
693 |
</td> |
694 |
<td> |
695 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
696 |
</td> |
697 |
<td> |
698 |
<div class="error">No holdable items in this item group.</div> |
699 |
</td> |
700 |
</tr> |
701 |
[% END %] |
702 |
[% END %] |
703 |
</tbody> |
704 |
</table> |
705 |
</li> |
706 |
</ul> |
707 |
[% END %] |
708 |
<button type="submit" id="hold_grp_btn" class="btn btn-primary warning">Place hold</button> |
709 |
</fieldset> |
710 |
[% END %] |
711 |
<!-- /ItemGroup level holds --> |
625 |
|
712 |
|
626 |
[% biblio_info = biblioloop.0 %] |
713 |
|
|
|
714 |
<fieldset class="rows"> |
715 |
<legend> |
716 |
<label class="inline"> |
717 |
Place a hold on a specific item |
718 |
</label> |
719 |
[% IF force_hold_level == 'item' %] |
720 |
<input type="radio" name="request" class="requestspecific" checked="checked" disabled='disabled'/> |
721 |
<span class="error"><em>(Required)</em></span> |
722 |
[% ELSIF force_hold_level == 'record' || force_hold_level == 'item_group' %] |
723 |
<input type="radio" name="request" class="requestspecific" disabled='disabled'/> |
724 |
[% ELSE %] |
725 |
<input type="radio" name="request" class="requestspecific"/> |
726 |
[% END %] |
727 |
</legend> |
627 |
|
728 |
|
628 |
<ol> |
729 |
<ol> |
629 |
[% UNLESS Koha.Preference('item-level_itypes') %] |
730 |
[% UNLESS Koha.Preference('item-level_itypes') %] |
Lines 641-717
Link Here
|
641 |
[% END %] |
742 |
[% END %] |
642 |
</ol> |
743 |
</ol> |
643 |
|
744 |
|
644 |
<!-- ItemGroup level holds --> |
|
|
645 |
[% IF Koha.Preference('EnableItemGroupHolds') && biblio_info.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 |
<th>Holdable items</th> |
670 |
</tr> |
671 |
</thead> |
672 |
<tbody> |
673 |
[% FOREACH g IN biblio_info.object.item_groups.search({}, { order_by => ['display_order'] }) %] |
674 |
[% IF g.items.count %] |
675 |
<tr> |
676 |
<td> |
677 |
<input id="item_group_id_[% g.id | html %]" 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 |
<td> |
683 |
[% FOREACH i IN g.items %] |
684 |
<div><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% i.biblionumber | uri %]#item[% i.itemnumber | uri %]">[% i.barcode | html %]</a></div> |
685 |
[% END %] |
686 |
</td> |
687 |
</tr> |
688 |
[% ELSE %] |
689 |
<tr> |
690 |
<td> |
691 |
<input id="item_group_id_[% g.id | html %]" type="radio" name="item_group_id" value="[% g.id | html %]" disabled="disabled" /> |
692 |
</td> |
693 |
<td> |
694 |
<label for="item_group_id_[% g.id | html %]">[% g.description | html %]</label> |
695 |
</td> |
696 |
<td> |
697 |
<div class="error">No holdable items in this item group.</div> |
698 |
</td> |
699 |
</tr> |
700 |
[% END %] |
701 |
[% END %] |
702 |
</tbody> |
703 |
</table> |
704 |
[% END %] |
705 |
[% END %] |
706 |
<!-- /ItemGroup level holds --> |
707 |
|
708 |
<h2 style="padding: 0 1em;"> |
709 |
Place a hold on a specific item |
710 |
[% IF force_hold_level == 'item' %] |
711 |
<span class="error"><em>(Required)</em></span> |
712 |
[% END %] |
713 |
</h2> |
714 |
|
715 |
<table id="requestspecific"> |
745 |
<table id="requestspecific"> |
716 |
<thead> |
746 |
<thead> |
717 |
<tr> |
747 |
<tr> |
Lines 754-762
Link Here
|
754 |
Hold must be item group level |
784 |
Hold must be item group level |
755 |
</span> |
785 |
</span> |
756 |
[% ELSIF ( itemloo.available ) %] |
786 |
[% ELSIF ( itemloo.available ) %] |
757 |
<input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" /> |
787 |
<input type="radio" name="checkitem" class="requestspecific" value="[% itemloo.itemnumber | html %]" /> |
758 |
[% ELSIF ( itemloo.override ) %] |
788 |
[% ELSIF ( itemloo.override ) %] |
759 |
<input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" /> |
789 |
<input type="radio" name="checkitem" class="needsoverride requestspecific" value="[% itemloo.itemnumber | html %]" /> |
760 |
<i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i> |
790 |
<i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i> |
761 |
[% ELSE %] |
791 |
[% ELSE %] |
762 |
<span class="error"> |
792 |
<span class="error"> |
Lines 800-807
Link Here
|
800 |
[% END # /IF force_hold_level %] |
830 |
[% END # /IF force_hold_level %] |
801 |
</td> |
831 |
</td> |
802 |
<td> |
832 |
<td> |
|
|
833 |
<<<<<<< HEAD |
803 |
[% IF (itemloo.pickup_locations_count > 0) || Koha.Preference('AllowHoldPolicyOverride') %] |
834 |
[% IF (itemloo.pickup_locations_count > 0) || Koha.Preference('AllowHoldPolicyOverride') %] |
804 |
<select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;" |
835 |
<select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;" |
|
|
836 |
======= |
837 |
[% IF (itemloo.pickup_locations_count > 0) || itemloo.override %] |
838 |
<select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations requestspecific" style="width:100%;" |
839 |
>>>>>>> Bug 30579: Disentangle multi-hold and single bib forms |
805 |
data-item-id="[% itemloo.itemnumber | html %]" |
840 |
data-item-id="[% itemloo.itemnumber | html %]" |
806 |
data-patron-id="[% patron.borrowernumber | html %]" |
841 |
data-patron-id="[% patron.borrowernumber | html %]" |
807 |
data-pickup-location-source="item"> |
842 |
data-pickup-location-source="item"> |
Lines 927-1023
Link Here
|
927 |
[% END # /IF hiddencount %] |
962 |
[% END # /IF hiddencount %] |
928 |
|
963 |
|
929 |
[% ELSE # /UNLESS multi_hold %] |
964 |
[% ELSE # /UNLESS multi_hold %] |
930 |
|
965 |
<fieldset class="rows"> |
931 |
<table id="requesttitles"> |
966 |
<legend>Hold details</legend> |
932 |
<tr> |
967 |
<form action="placerequest.pl" method="post" name="form" id="hold-request-form"> |
933 |
<th> </th> |
968 |
<input type="hidden" name="multi_holds" id="multi_holds" value="1" /> |
934 |
<th>Pickup location</th> |
969 |
<input type="hidden" name="request" value="any"/> |
935 |
<th>Title</th> |
970 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
936 |
[% UNLESS Koha.Preference('item-level_itypes') %] |
971 |
[% FOREACH biblioloo IN biblioloop %] |
937 |
<th>Item type</th> |
972 |
<input type="hidden" name="biblionumber" id="biblionumber" value="[% biblioloo.biblionumber | html %]"/> |
938 |
[% END %] |
973 |
[% UNLESS biblioloo.none_avail %] |
939 |
<th>Priority</th> |
974 |
<input type="hidden" name="holdable_bibs" id="holdable_bibs" value="[% biblioloo.biblionumber | html %]"/> |
940 |
<th>Information</th> |
975 |
<input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/> |
941 |
</tr> |
976 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
942 |
[% FOREACH biblioloo IN biblioloop %] |
|
|
943 |
[% IF ( biblioloo.warn ) %] |
944 |
<tr class="onissue"> |
945 |
[% ELSE %] |
946 |
<tr> |
947 |
[% END %] |
948 |
<td> |
949 |
[% UNLESS ( biblioloo.warn ) %] |
950 |
<input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/> |
951 |
[% END %] |
952 |
</td> |
953 |
<td> |
954 |
[% UNLESS ( biblioloo.none_avail || biblioloo.noitems ) %] |
955 |
<select name="pickup_[% biblioloo.biblionumber | html %]" |
956 |
class="multi_pickup_select" |
957 |
data-biblio-id="[% biblioloo.biblionumber | html %]" |
958 |
data-patron-id="[% patron.borrowernumber | html %]" |
959 |
data-pickup-locations='[% biblioloo.pickup_locations_codes.json | $raw %]'> |
960 |
<option value=""></option> |
961 |
[% FOREACH pickup_location IN biblioloo.pickup_locations %] |
962 |
<option value="[% pickup_location.branchcode | html %]">[% pickup_location.branchname | html %]</option> |
963 |
[% END %] |
964 |
</select> |
965 |
[% END %] |
977 |
[% END %] |
966 |
</td> |
978 |
[% END %] |
967 |
<td> |
979 |
|
968 |
<ul> |
980 |
<table id="requesttitles"> |
969 |
<li> |
981 |
<tr> |
970 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a> |
982 |
<th> </th> |
971 |
[% IF biblioloo.author %] by [% biblioloo.author | html %][% END %] |
983 |
<th>Pickup location</th> |
972 |
</li> |
984 |
<th>Title</th> |
973 |
[% IF ( biblioloo.publicationyear ) %] |
985 |
[% UNLESS Koha.Preference('item-level_itypes') %] |
|
|
986 |
<th>Item type</th> |
987 |
[% END %] |
988 |
<th>Priority</th> |
989 |
<th>Information</th> |
990 |
</tr> |
991 |
[% FOREACH biblioloo IN biblioloop %] |
992 |
[% IF ( biblioloo.warn ) %] |
993 |
<tr class="onissue"> |
994 |
[% ELSE %] |
995 |
<tr> |
996 |
[% END %] |
997 |
<td> |
998 |
[% UNLESS ( biblioloo.warn ) %] |
999 |
<input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/> |
1000 |
[% END %] |
1001 |
</td> |
1002 |
<td> |
1003 |
[% UNLESS ( biblioloo.none_avail || biblioloo.noitems ) %] |
1004 |
<select name="pickup_[% biblioloo.biblionumber | html %]" |
1005 |
class="multi_pickup_select" |
1006 |
data-biblio-id="[% biblioloo.biblionumber | html %]" |
1007 |
data-patron-id="[% patron.borrowernumber | html %]" |
1008 |
data-pickup-locations='[% biblioloo.pickup_locations_codes.json | $raw %]'> |
1009 |
<option value=""></option> |
1010 |
[% FOREACH pickup_location IN biblioloo.pickup_locations %] |
1011 |
<option value="[% pickup_location.branchcode | html %]">[% pickup_location.branchname | html %]</option> |
1012 |
[% END %] |
1013 |
</select> |
1014 |
[% END %] |
1015 |
</td> |
1016 |
<td> |
1017 |
<ul> |
974 |
<li> |
1018 |
<li> |
975 |
<span class="label">Publication year:</span> [% biblioloo.publicationyear | html %] |
1019 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a> |
|
|
1020 |
[% IF biblioloo.author %] by [% biblioloo.author | html %][% END %] |
976 |
</li> |
1021 |
</li> |
|
|
1022 |
[% IF ( biblioloo.publicationyear ) %] |
1023 |
<li> |
1024 |
<span class="label">Publication year:</span> [% biblioloo.publicationyear | html %] |
1025 |
</li> |
1026 |
[% END %] |
1027 |
</ul> |
1028 |
[% IF ( biblioloo.warn ) %] |
1029 |
<span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span> |
977 |
[% END %] |
1030 |
[% END %] |
978 |
</ul> |
|
|
979 |
[% IF ( biblioloo.warn ) %] |
980 |
<span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span> |
981 |
[% END %] |
982 |
</td> |
983 |
[% UNLESS Koha.Preference('item-level_itypes') %] |
984 |
<td> |
985 |
<img src="[% biblioloo.itemtype.image_location | html %]" alt="[% biblioloo.itemtype.translated_description | html %]" title="[% biblioloo.itemtype.translated_description | html %]" /> |
986 |
</td> |
1031 |
</td> |
987 |
[% END %] |
1032 |
[% UNLESS Koha.Preference('item-level_itypes') %] |
988 |
<td>[% biblioloo.rank | html %]</td> |
1033 |
<td> |
989 |
<td> |
1034 |
<img src="[% biblioloo.itemtype.image_location | html %]" alt="[% biblioloo.itemtype.translated_description | html %]" title="[% biblioloo.itemtype.translated_description | html %]" /> |
990 |
[% IF ( biblioloo.checked_previously ) %] |
1035 |
</td> |
991 |
<span>Patron has previously checked out this title</span><br/> |
|
|
992 |
[% END %] |
1036 |
[% END %] |
993 |
[% IF ( biblioloo.alreadyres ) %] |
1037 |
<td>[% biblioloo.rank | html %]</td> |
994 |
<ul> |
1038 |
<td> |
995 |
[% ELSE %] |
1039 |
[% IF ( biblioloo.checked_previously ) %] |
996 |
[% IF ( biblioloo.none_avail || biblioloo.noitems ) %] |
1040 |
<span>Patron has previously checked out this title</span><br/> |
|
|
1041 |
[% END %] |
1042 |
[% IF ( biblioloo.alreadyres ) %] |
997 |
<ul> |
1043 |
<ul> |
|
|
1044 |
[% ELSE %] |
1045 |
[% IF ( biblioloo.none_avail || biblioloo.noitems ) %] |
1046 |
<ul> |
1047 |
[% END %] |
998 |
[% END %] |
1048 |
[% END %] |
999 |
[% END %] |
|
|
1000 |
|
1001 |
[% IF ( biblioloo.alreadyres ) %] |
1002 |
<li> |
1003 |
[% 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 |
1004 |
</li> |
1005 |
[% END %] |
1006 |
[% IF ( biblioloo.none_avail || biblioloo.noitems ) %] |
1007 |
<li> <strong>No items are available</strong> to be placed on hold</li> |
1008 |
[% END %] |
1009 |
|
1049 |
|
1010 |
[% IF ( biblioloo.alreadyres ) %] |
1050 |
[% IF ( biblioloo.alreadyres ) %] |
1011 |
</ul> |
1051 |
<li> |
1012 |
[% ELSE %] |
1052 |
[% 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 |
|
|
1053 |
</li> |
1054 |
[% END %] |
1013 |
[% IF ( biblioloo.none_avail || biblioloo.noitems ) %] |
1055 |
[% IF ( biblioloo.none_avail || biblioloo.noitems ) %] |
|
|
1056 |
<li> <strong>No items are available</strong> to be placed on hold</li> |
1057 |
[% END %] |
1058 |
|
1059 |
[% IF ( biblioloo.alreadyres ) %] |
1014 |
</ul> |
1060 |
</ul> |
|
|
1061 |
[% ELSE %] |
1062 |
[% IF ( biblioloo.none_avail || biblioloo.noitems ) %] |
1063 |
</ul> |
1064 |
[% END %] |
1015 |
[% END %] |
1065 |
[% END %] |
1016 |
[% END %] |
1066 |
</td> |
1017 |
</td> |
1067 |
</tr> |
1018 |
</tr> |
1068 |
[% END # /FOREACH biblioloo %] |
1019 |
[% END # /FOREACH biblioloo %] |
1069 |
</table> <!-- /#requesttitles --> |
1020 |
</table> <!-- /#requesttitles --> |
1070 |
</fieldset> |
1021 |
|
1071 |
|
1022 |
[% END # /UNLESS multi_hold %] |
1072 |
[% END # /UNLESS multi_hold %] |
1023 |
|
1073 |
|
Lines 1025-1051
Link Here
|
1025 |
[% IF ( patron AND patron.borrowernumber ) %] |
1075 |
[% IF ( patron AND patron.borrowernumber ) %] |
1026 |
[% IF ( multi_hold ) %] |
1076 |
[% IF ( multi_hold ) %] |
1027 |
[% IF ( override_required ) %] |
1077 |
[% IF ( override_required ) %] |
1028 |
<button type="submit" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place holds</button> |
1078 |
<button type="submit" id="hold_multi_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place holds</button> |
1029 |
[% ELSIF ( no_bibs_available ) %] |
1079 |
[% ELSIF ( no_bibs_available ) %] |
1030 |
<button type="submit" class="btn btn-primary btn-disabled" disabled="disabled">Place holds</button> |
1080 |
<button type="submit" id="hold_multi_btn" class="btn btn-primary btn-disabled" disabled="disabled">Place holds</button> |
1031 |
[% ELSIF ( none_available ) %] |
1081 |
[% ELSIF ( none_available ) %] |
1032 |
<button type="submit" class="btn btn-primary">Place holds</button> |
1082 |
<button type="submit" id="hold_multi_btn" class="btn btn-primary">Place holds</button> |
1033 |
[% ELSE %] |
1083 |
[% ELSE %] |
1034 |
<button type="submit" class="btn btn-primary" id="multi_hold_submit">Place holds</button> |
1084 |
<button type="submit" id="hold_multi_btn" class="btn btn-primary" id="multi_hold_submit">Place holds</button> |
1035 |
[% END %] |
1085 |
[% END %] |
1036 |
[% ELSE %] |
1086 |
[% ELSE %] |
1037 |
[% IF ( override_required ) %] |
1087 |
[% IF ( override_required ) %] |
1038 |
<button type="submit" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
1088 |
<button type="submit" id="hold_item_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button> |
1039 |
[% ELSIF ( none_available ) %] |
1089 |
[% ELSIF ( none_available ) %] |
1040 |
<button type="submit" class="btn btn-primary btn-disabled" disabled="disabled">Place hold</button> |
1090 |
<button type="submit" id="hold_item_btn" class="btn btn-primary btn-disabled" disabled="disabled">Place hold</button> |
1041 |
[% ELSE %] |
1091 |
[% ELSE %] |
1042 |
<button type="submit" class="btn btn-primary">Place hold</button> |
1092 |
<button type="submit" id="hold_item_btn" class="btn btn-primary">Place hold</button> |
1043 |
[% END %] |
1093 |
[% END %] |
1044 |
[% END %] |
1094 |
[% END %] |
1045 |
[% END # /IF patron %] |
1095 |
[% END # /IF patron %] |
1046 |
</fieldset> <!-- /.action --> |
1096 |
</fieldset> <!-- /.action --> |
1047 |
</form> <!-- /#hold-request-form --> |
1097 |
</fieldset> <!-- /.rows --> |
1048 |
</fieldset> <!-- /.rows --> |
1098 |
</form> <!-- /#hold-request-form --> |
1049 |
[% END %] |
1099 |
[% END %] |
1050 |
|
1100 |
|
1051 |
[% UNLESS ( patron ) %] |
1101 |
[% UNLESS ( patron ) %] |
Lines 1385-1405
Link Here
|
1385 |
} |
1435 |
} |
1386 |
|
1436 |
|
1387 |
|
1437 |
|
1388 |
function ToggleHoldsToPlace() { |
|
|
1389 |
if ( $("#requestany").prop('checked') ) { |
1390 |
$("#holds_to_place_count").prop('disabled', false); |
1391 |
} else { |
1392 |
$("#holds_to_place_count").prop('disabled', true); |
1393 |
} |
1394 |
} |
1395 |
ToggleHoldsToPlace(); |
1438 |
ToggleHoldsToPlace(); |
1396 |
$("#requestany").on('change', function(){ |
1439 |
$("#requestany,.requestspecific[name='request'],.requestgrp").on('change', function(){ |
1397 |
ToggleHoldsToPlace(); |
1440 |
ToggleHoldsToPlace(); |
1398 |
}); |
1441 |
}); |
1399 |
|
1442 |
|
1400 |
[% IF Koha.Preference('UseBranchTransferLimits') %] |
1443 |
[% IF Koha.Preference('UseBranchTransferLimits') %] |
1401 |
$("#pickup").on('change', function(){ |
1444 |
$("#pickup,#pickup-next-avail,#pickup-item-group").on('change', function(){ |
1402 |
var pickup = $("#pickup").val(); |
1445 |
var pickup = $(this).val(); |
1403 |
var url = "?pickup=" + pickup; |
1446 |
var url = "?pickup=" + pickup; |
1404 |
url += "&borrowernumber=" + borrowernumber; |
1447 |
url += "&borrowernumber=" + borrowernumber; |
1405 |
url += "&biblionumber=" + biblionumbers[0]; |
1448 |
url += "&biblionumber=" + biblionumbers[0]; |
Lines 1412-1423
Link Here
|
1412 |
"dom": '<"top pager"ilf>t', |
1455 |
"dom": '<"top pager"ilf>t', |
1413 |
})); |
1456 |
})); |
1414 |
|
1457 |
|
1415 |
//Override fieldset styling for dataTables search box |
|
|
1416 |
$("div.top.pager").css("margin-left","1em"); |
1417 |
$(".dataTables_filter label").css({ |
1418 |
"width":"auto", |
1419 |
"margin-right":"0em" |
1420 |
}); |
1421 |
|
1458 |
|
1422 |
$("#club-request-form").on("submit", function() { |
1459 |
$("#club-request-form").on("submit", function() { |
1423 |
let $t = $(this); |
1460 |
let $t = $(this); |
Lines 1510-1516
Link Here
|
1510 |
} |
1547 |
} |
1511 |
}); |
1548 |
}); |
1512 |
|
1549 |
|
1513 |
$("#pickup").each( function () { |
1550 |
$("#pickup,#pickup-item-group,#pickup-next-avail").each( function () { |
1514 |
$(this).pickup_locations_dropdown(); |
1551 |
$(this).pickup_locations_dropdown(); |
1515 |
}); |
1552 |
}); |
1516 |
|
1553 |
|
Lines 1519-1537
Link Here
|
1519 |
}); |
1556 |
}); |
1520 |
}); |
1557 |
}); |
1521 |
|
1558 |
|
|
|
1559 |
function ToggleHoldsToPlace() { |
1560 |
if ( $("#requestany").prop('checked') ) { |
1561 |
$("#holds_to_place_count, #pickup-next-avail, #itemtype, #hold_any_btn").prop('disabled', false); |
1562 |
$(".requestspecific,.requestgrp").prop('checked', false); |
1563 |
$(".requestspecific","#requestspecific").prop('disabled',true); |
1564 |
$("#hold_item_btn, #hold_grp_btn, #pickup-item-group").prop("disabled", true ); |
1565 |
$("#hold_any_btn").prop("disabled", false ); |
1566 |
} else if( $(".requestspecific").prop('checked') ) { |
1567 |
$(".requestspecific","#requestspecific").prop('disabled',false); |
1568 |
$("#holds_to_place_count, #pickup-item-group, #pickup-next-avail #itemtype, #hold_any_btn").prop('disabled', true); |
1569 |
$("#hold_item_btn").prop("disabled", false ); |
1570 |
$("#hold_any_btn,#hold_grp_btn").prop("disabled", true ); |
1571 |
$("#requestany,.requestgrp").prop('checked', false); |
1572 |
} else { |
1573 |
$("#holds_to_place_count, #pickup-next-avail, #itemtype, #hold_any_btn").prop('disabled', true); |
1574 |
$("#hold_grp_btn, #pickup-item-group").prop("disabled", false ); |
1575 |
$(".requestspecific","#requestspecific").prop('disabled',true); |
1576 |
$("#hold_any_btn,#hold_item_btn").prop("disabled", true ); |
1577 |
$("#requestany,.requestspecific").prop('checked', false); |
1578 |
} |
1579 |
} |
1580 |
|
1522 |
function check( e, table ) { |
1581 |
function check( e, table ) { |
1523 |
|
1582 |
|
1524 |
var msg = ""; |
1583 |
var msg = ""; |
1525 |
|
1584 |
|
1526 |
if ( ! $("#requestany").is(":checked") ) { |
1585 |
if ( $(".requestspecific").is(":checked") ) { |
1527 |
// requestany not selected, go through the item-specific cases |
1586 |
// requestany not selected, go through the item-specific cases |
1528 |
if ( $('input[type="radio"]:checked').length > 0 ) { |
1587 |
var selected_item = $('#requestspecific input[type="radio"]:checked'); |
|
|
1588 |
if ( selected_item.length > 0 ) { |
1529 |
// got item-specific hold requests in the form! |
1589 |
// got item-specific hold requests in the form! |
1530 |
// verify they have a pickup location selected |
1590 |
// verify they have a pickup location selected |
1531 |
|
1591 |
|
1532 |
if (table.find('input[type="radio"]:checked') |
1592 |
if ( selected_item.closest('tr').find(".pickup_locations").val() == '' ) { |
1533 |
.closest('tr') |
|
|
1534 |
.find(".pickup_locations").val() === null) { |
1535 |
|
1593 |
|
1536 |
msg = _("- Please select a pickup location for the item" + "\n") |
1594 |
msg = _("- Please select a pickup location for the item" + "\n") |
1537 |
} |
1595 |
} |
Lines 1539-1546
Link Here
|
1539 |
else { |
1597 |
else { |
1540 |
msg = (_("- Please select an item to place a hold") + "\n"); |
1598 |
msg = (_("- Please select an item to place a hold") + "\n"); |
1541 |
} |
1599 |
} |
|
|
1600 |
} else if ( $("#requestgrp").is(":checked") ) { |
1601 |
var selected_group = $('#requestgroup input[type="radio"]:checked'); |
1602 |
if( selected_group.length > 0 ){ |
1603 |
if( $("#pickup-item-group").length < 1 || $("#pickup-item-grp").val() == "" ){ |
1604 |
msg = _("- Please select a pickup location for this hold" + "\n"); |
1605 |
} |
1606 |
} else { |
1607 |
msg = (_("- Please select an item group to place a hold") + "\n"); |
1608 |
} |
1542 |
} else { |
1609 |
} else { |
1543 |
if( $("#pickup").length < 1 || $("#pickup").val() == "" || $('#pickup').val() === null ){ |
1610 |
// Requesting next available |
|
|
1611 |
if( $("#pickup-next-avail").length < 1 || $("#pickup-next-avail").val() == "" || $('#pickup-next-avail').val() === null ){ |
1544 |
msg = _("- Please select a pickup location for this hold" + "\n"); |
1612 |
msg = _("- Please select a pickup location for this hold" + "\n"); |
1545 |
} |
1613 |
} |
1546 |
} |
1614 |
} |
Lines 1612-1639
Link Here
|
1612 |
$("button.warning").click(function() { |
1680 |
$("button.warning").click(function() { |
1613 |
return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") ); |
1681 |
return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") ); |
1614 |
}); |
1682 |
}); |
1615 |
$("#requestany").click(function() { |
|
|
1616 |
if(this.checked){ |
1617 |
$("input[name=checkitem]").each(function() { |
1618 |
$(this).prop("checked", false); |
1619 |
}); |
1620 |
} |
1621 |
}); |
1622 |
$("input[name=checkitem]").click(function() { |
1623 |
onechecked = 0; |
1624 |
$("input[name=checkitem]").each(function() { |
1625 |
if(this.checked){ |
1626 |
onechecked = 1; |
1627 |
} |
1628 |
}); |
1629 |
if(onechecked == 1){ |
1630 |
$("#requestany").prop("checked", false); |
1631 |
$("#holds_to_place_count").prop('disabled', true); |
1632 |
} else { |
1633 |
$("#requestany").prop("checked",true); |
1634 |
$("#holds_to_place_count").prop('disabled', false); |
1635 |
} |
1636 |
}); |
1637 |
var prev_rank_request; |
1683 |
var prev_rank_request; |
1638 |
$("select[name=rank-request]").on("focus", function() { |
1684 |
$("select[name=rank-request]").on("focus", function() { |
1639 |
prev_rank_request = $(this).val(); |
1685 |
prev_rank_request = $(this).val(); |