View | Details | Raw Unified | Return to bug 19469
Collapse All | Expand All

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

Return to bug 19469