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