Lines 1-3
Link Here
|
|
|
1 |
[% USE Dumper %] |
1 |
[% USE Koha %] |
2 |
[% USE Koha %] |
2 |
[% USE KohaDates %] |
3 |
[% USE KohaDates %] |
3 |
[% USE Branches %] |
4 |
[% USE Branches %] |
Lines 700-893
function checkMultiHold() {
Link Here
|
700 |
|
701 |
|
701 |
[% FOREACH biblioloo IN biblioloop %] |
702 |
[% FOREACH biblioloo IN biblioloop %] |
702 |
[% IF ( biblioloo.reserveloop ) %] |
703 |
[% IF ( biblioloo.reserveloop ) %] |
703 |
<table> |
704 |
[% IF ( multi_hold ) %] |
704 |
[% IF ( multi_hold ) %] |
705 |
<h3> |
705 |
<caption><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber %]">[% biblioloo.title |html %]</a></caption> |
706 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber %]"> |
706 |
[% END %] |
707 |
[% biblioloo.title | html %] |
707 |
|
708 |
</a> |
708 |
<tr> |
709 |
</h3> |
709 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
710 |
[% END %] |
710 |
<th>Priority</th> |
|
|
711 |
<th> </th> |
712 |
[% ELSE %] |
713 |
<th>Delete?</th> |
714 |
[% END %] |
715 |
<th>Patron</th> |
716 |
<th>Notes</th> |
717 |
<th>Date</th> |
718 |
<th>Expiration</th> |
719 |
<th>Pickup library</th> |
720 |
<th>Details</th> |
721 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
722 |
<th><img src="[% interface %]/[% theme %]/img/go-bottom.png" alt="Toggle set to lowest priority" /></th> |
723 |
[% END %] |
724 |
<th> </th> |
725 |
[% IF SuspendHoldsIntranet %]<th> </th><!-- Suspend Holds Column Header -->[% END %] |
726 |
</tr> |
727 |
|
728 |
[% FOREACH reserveloo IN biblioloo.reserveloop %] |
729 |
<tr> |
730 |
<td> |
731 |
<input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id %]" /> |
732 |
<input type="hidden" name="borrowernumber" value="[% reserveloo.borrowernumber %]" /> |
733 |
<input type="hidden" name="biblionumber" value="[% reserveloo.biblionumber %]" /> |
734 |
<select name="rank-request"> |
735 |
[% IF ( reserveloo.found ) %] |
736 |
[% IF ( reserveloo.intransit ) %] |
737 |
<option value="T" selected="selected">In transit</option> |
738 |
[% ELSE %] |
739 |
<option value="W" selected="selected">Waiting</option> |
740 |
[% END %] |
741 |
[% END %] |
742 |
|
743 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
744 |
[% FOREACH optionloo IN reserveloo.optionloop %] |
745 |
[% IF ( optionloo.selected ) %] |
746 |
<option value="[% optionloo.num %]" selected="selected">[% optionloo.num %]</option> |
747 |
[% ELSE %] |
748 |
<option value="[% optionloo.num %]">[% optionloo.num %]</option> |
749 |
[% END %] |
750 |
[% END %] |
751 |
[% ELSIF !reserveloo.found %] |
752 |
<option value="[% reserveloo.priority %]" selected="selected">[% reserveloo.priority %]</option> |
753 |
[% END %] |
754 |
|
711 |
|
755 |
<option value="del">del</option> |
712 |
[% IF Koha.Preference('HoldsSplitQueue') == 'branch' %] |
756 |
</select> |
713 |
[% SET branchcodes = [] %] |
757 |
</td> |
|
|
758 |
|
714 |
|
759 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
715 |
[% FOREACH h IN biblioloo.reserveloop %] |
760 |
<td style="white-space:nowrap;"> |
716 |
[% branchcodes.push( h.branchcode ) %] |
761 |
<a title="Move hold up" href="request.pl?action=move&where=up&borrowernumber=[% reserveloo.borrowernumber %]&biblionumber=[% reserveloo.biblionumber %]&reserve_id=[% reserveloo.reserve_id %]&date=[% reserveloo.date %]"> |
717 |
[% END %] |
762 |
<img src="[% interface %]/[% theme %]/img/go-up.png" alt="Go up" /> |
718 |
[% branchcodes = branchcodes.unique %] |
763 |
</a> |
|
|
764 |
|
719 |
|
765 |
<a title="Move hold to top" href="request.pl?action=move&where=top&borrowernumber=[% reserveloo.borrowernumber %]&biblionumber=[% reserveloo.biblionumber %]&reserve_id=[% reserveloo.reserve_id %]&date=[% reserveloo.date %]"> |
720 |
[% FOREACH b IN branchcodes.sort %] |
766 |
<img src="[% interface %]/[% theme %]/img/go-top.png" alt="Go top" /> |
721 |
[% SET holds_by_branch = [] %] |
767 |
</a> |
722 |
[% FOREACH h IN biblioloo.reserveloop %] |
|
|
723 |
[% IF h.branchcode == b %] |
724 |
[% holds_by_branch.push( h ) %] |
725 |
[% END %] |
726 |
[% END %] |
727 |
<fieldset> |
728 |
<legend>[% Branches.GetName( b ) %]</legend> |
729 |
[% INCLUDE holds_table.inc holds=holds_by_branch %] |
730 |
</fieldset> |
731 |
[% END %] |
732 |
[% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %] |
733 |
[% SET itemtypes = [] %] |
768 |
|
734 |
|
769 |
<a title="Move hold to bottom" href="request.pl?action=move&where=bottom&borrowernumber=[% reserveloo.borrowernumber %]&biblionumber=[% reserveloo.biblionumber %]&reserve_id=[% reserveloo.reserve_id %]&date=[% reserveloo.date %]"> |
735 |
[% FOREACH h IN biblioloo.reserveloop %] |
770 |
<img src="[% interface %]/[% theme %]/img/go-bottom.png" alt="Go bottom" /> |
736 |
[% itemtypes.push( h.itemtype ) %] |
771 |
</a> |
737 |
[% END %] |
|
|
738 |
[% itemtypes = itemtypes.unique %] |
772 |
|
739 |
|
773 |
<a title="Move hold down" href="request.pl?action=move&where=down&borrowernumber=[% reserveloo.borrowernumber %]&biblionumber=[% reserveloo.biblionumber %]&reserve_id=[% reserveloo.reserve_id %]&date=[% reserveloo.date %]"> |
740 |
[% FOREACH i IN itemtypes.sort %] |
774 |
<img src="[% interface %]/[% theme %]/img/go-down.png" alt="Go down" /> |
741 |
[% SET holds_by_itemtype = [] %] |
775 |
</a> |
742 |
[% FOREACH h IN biblioloo.reserveloop %] |
776 |
</td> |
743 |
[% IF h.itemtype == i %] |
|
|
744 |
[% holds_by_itemtype.push( h ) %] |
777 |
[% END %] |
745 |
[% END %] |
|
|
746 |
[% END %] |
778 |
|
747 |
|
779 |
<td> |
748 |
<fieldset> |
780 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrowernumber %]" > |
749 |
[% IF i %] |
781 |
[% IF ( reserveloo.hidename ) %] |
750 |
<legend>[% ItemTypes.GetDescription( i ) %]</legend> |
782 |
[% reserveloo.cardnumber (reserveloo.borrowernumber) %] |
751 |
[% ELSE %] |
783 |
[% ELSE %] |
752 |
<legend>Any item type</legend> |
784 |
[% reserveloo.firstname %] [% reserveloo.surname %] |
753 |
[% END %] |
785 |
[% END %] |
754 |
[% INCLUDE holds_table.inc holds=holds_by_itemtype %] |
786 |
</a> |
755 |
</fieldset> |
787 |
</td> |
756 |
[% END %] |
788 |
|
757 |
[% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %] |
789 |
<td>[% reserveloo.notes %]</td> |
758 |
[% SET branchcodes = [] %] |
790 |
<td>[% reserveloo.date %]</td> |
|
|
791 |
<td>[% reserveloo.expirationdate %]</td> |
792 |
|
793 |
<td> |
794 |
[% IF ( reserveloo.found ) %] |
795 |
[% IF ( reserveloo.atdestination ) %] |
796 |
[% IF ( reserveloo.found ) %] |
797 |
Item waiting at <b> [% reserveloo.wbrname %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" /> since [% reserveloo.waiting_date | $KohaDates %] |
798 |
[% ELSE %] |
799 |
Waiting to be pulled <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" /> |
800 |
[% END %] |
801 |
[% ELSE %] |
802 |
Item being transferred to <b> [% reserveloo.wbrname %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" /> |
803 |
[% END %] |
804 |
[% ELSE %] |
805 |
[% IF Koha.Preference('IndependentBranches') && Branches.all().size == 1 %] |
806 |
[% Branches.GetName(reserveloo.branchcode) %] <input type="hidden" name="pickup" value="[% reserveloo.branchcode %]" /> |
807 |
[% ELSE %] |
808 |
<select name="pickup"> |
809 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => reserveloo.branchcode ) %] |
810 |
</select> |
811 |
[% END %] |
812 |
[% END %] |
813 |
</td> |
814 |
|
815 |
<td> |
816 |
[% IF ( reserveloo.found ) %] |
817 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reserveloo.biblionumber %]"> |
818 |
[% IF ( reserveloo.barcodenumber ) %] |
819 |
[% reserveloo.barcodenumber %] |
820 |
<input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber %]" /> |
821 |
[% ELSE %] |
822 |
No barcode |
823 |
[% END %] |
824 |
</a> |
825 |
[% ELSE %] |
826 |
[% IF ( reserveloo.item_level_hold ) %] |
827 |
<i> |
828 |
Only item |
829 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reserveloo.biblionumber %]"> |
830 |
[% IF ( reserveloo.barcodenumber ) %] |
831 |
[% reserveloo.barcodenumber %] |
832 |
<input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber %]" /> |
833 |
[% ELSE %] |
834 |
No barcode |
835 |
[% END %] |
836 |
</a> |
837 |
</i> |
838 |
[% ELSE %] |
839 |
[% IF reserveloo.itemtype %] |
840 |
<i>Next available [% ItemTypes.GetDescription( reserveloo.itemtype ) %] item</i> |
841 |
[% ELSE %] |
842 |
<i>Next available</i> |
843 |
[% END %] |
844 |
|
759 |
|
845 |
<input type="hidden" name="itemnumber" value="" /> |
760 |
[% FOREACH h IN biblioloo.reserveloop %] |
846 |
[% END %] |
761 |
[% branchcodes.push( h.branchcode ) %] |
|
|
762 |
[% END %] |
763 |
[% branchcodes = branchcodes.unique %] |
764 |
|
765 |
[% FOREACH b IN branchcodes.sort %] |
766 |
<fieldset class="contrast"> |
767 |
<legend>[% Branches.GetName( b ) %]</legend> |
768 |
[% SET holds_by_branch = [] %] |
769 |
[% FOREACH h IN biblioloo.reserveloop %] |
770 |
[% IF h.branchcode == b %] |
771 |
[% holds_by_branch.push( h ) %] |
847 |
[% END %] |
772 |
[% END %] |
848 |
</td> |
|
|
849 |
|
850 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
851 |
<td> |
852 |
<a title="Toggle lowest priority" href="request.pl?action=setLowestPriority&borrowernumber=[% reserveloo.borrowernumber %]&biblionumber=[% reserveloo.biblionumber %]&reserve_id=[% reserveloo.reserve_id %]&date=[% reserveloo.date %]"> |
853 |
[% IF ( reserveloo.lowestPriority ) %] |
854 |
<img src="[% interface %]/[% theme %]/img/go-bottom.png" alt="Unset lowest priority" /> |
855 |
[% ELSE %] |
856 |
<img src="[% interface %]/[% theme %]/img/go-down.png" alt="Set to lowest priority" /> |
857 |
[% END %] |
858 |
</a> |
859 |
</td> |
860 |
[% END %] |
773 |
[% END %] |
861 |
|
774 |
|
862 |
<td> |
775 |
[% SET itemtypes = [] %] |
863 |
<a class="cancel-hold" title="Cancel hold" href="request.pl?action=cancel&borrowernumber=[% reserveloo.borrowernumber %]&biblionumber=[% reserveloo.biblionumber %]&reserve_id=[% reserveloo.reserve_id %]&date=[% reserveloo.date %]"> |
776 |
[% FOREACH h IN holds_by_branch %] |
864 |
<img src="[% interface %]/[% theme %]/img/x.png" alt="Cancel" /> |
777 |
[% itemtypes.push( h.itemtype ) %] |
865 |
</a> |
778 |
[% END %] |
866 |
</td> |
779 |
[% itemtypes = itemtypes.unique %] |
867 |
|
|
|
868 |
[% IF SuspendHoldsIntranet %] |
869 |
<td> |
870 |
[% UNLESS ( reserveloo.found ) %] |
871 |
<input type="button" value="[% IF ( reserveloo.suspend ) %]Unsuspend[% ELSE %]Suspend[% END %]" onclick="window.location.href='request.pl?action=toggleSuspend&reserve_id=[% reserveloo.reserve_id %]&borrowernumber=[% reserveloo.borrowernumber %]&biblionumber=[% reserveloo.biblionumber %]&date=[% reserveloo.date %]&suspend_until=' + $('#suspend_until_[% reserveloo.reserve_id %]').val()" /> |
872 |
|
873 |
[% IF AutoResumeSuspendedHolds %] |
874 |
<label for="suspend_until_[% reserveloo.reserve_id %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label> |
875 |
<input name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" size="10" value="[% reserveloo.suspend_until | $KohaDates %]" class="datepicker suspend_until_datepicker" /> |
876 |
<a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.reserve_id %]').value='';">Clear date</a> |
877 |
[% ELSE %] |
878 |
<input type="hidden" name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" value=""/> |
879 |
[% END %] |
880 |
|
780 |
|
|
|
781 |
[% FOREACH i IN itemtypes.sort %] |
782 |
<fieldset class="standard"> |
783 |
[% IF i %] |
784 |
<legend>[% ItemTypes.GetDescription( i ) %]</legend> |
881 |
[% ELSE %] |
785 |
[% ELSE %] |
882 |
<input type="hidden" name="suspend_until" value="" /> |
786 |
<legend>Any item type</legend> |
883 |
[% END %] |
787 |
[% END %] |
884 |
</td> |
|
|
885 |
[% END # IF SuspendHoldsIntranet %] |
886 |
|
788 |
|
887 |
</tr> |
789 |
[% SET holds_by_itemtype = [] %] |
|
|
790 |
[% FOREACH h IN holds_by_branch %] |
791 |
[% IF h.itemtype == i %] |
792 |
[% holds_by_itemtype.push( h ) %] |
793 |
[% END %] |
794 |
[% END %] |
795 |
[% INCLUDE holds_table.inc holds=holds_by_itemtype %] |
796 |
</fieldset> |
797 |
[% END %] |
798 |
</fieldset> |
799 |
[% END %] |
800 |
[% ELSE %] |
801 |
[% INCLUDE holds_table.inc holds=biblioloo.reserveloop %] |
802 |
[% END %] |
888 |
|
803 |
|
889 |
[% END %] <!-- existing reserveloop --> |
|
|
890 |
</table> |
891 |
[% END %]<!-- /reserveloop --> |
804 |
[% END %]<!-- /reserveloop --> |
892 |
[% END %]<!-- /biblioloop --> |
805 |
[% END %]<!-- /biblioloop --> |
893 |
|
806 |
|