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

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

Return to bug 19469