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 507-707 Link Here
507
[% END %]
507
[% END %]
508
508
509
[% UNLESS ( patron ) %]
509
[% UNLESS ( patron ) %]
510
[% IF ( reserveloop ) %]
510
    [% IF ( reserveloop ) %]
511
<form name="T[% time | html %]" action="modrequest.pl" method="post">
511
        <form name="T[% time %]" action="modrequest.pl" method="post">
512
  [% IF ( multi_hold ) %]
512
            [% IF ( multi_hold ) %]
513
    <input type = "hidden" name="multi_hold" value="1"/>
513
                <input type = "hidden" name="multi_hold" value="1"/>
514
    <input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
514
                <input type = "hidden" name="biblionumbers" value="[% biblionumbers %]"/>
515
  [% END %]
516
517
<fieldset class="rows left">
518
<legend>Existing holds</legend>
519
520
[% FOREACH biblioloo IN biblioloop %]
521
522
    [% IF ( biblioloo.reserveloop ) %]
523
    <table>
524
      [% IF ( multi_hold ) %]
525
          <caption><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | html %]">[% biblioloo.title | html %]</a></caption>
526
      [% END %]
527
      <tr>
528
        [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
529
            <th>Priority</th>
530
	        <th>&nbsp;</th>
531
        [% ELSE %]
532
            <th>Delete?</th>
533
        [% END %]
534
        <th>Patron</th>
535
        <th>Notes</th>
536
        <th>Date</th>
537
	<th>Expiration</th>
538
        <th>Pickup library</th>
539
        <th>Details</th>
540
        [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
541
            <th><img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Toggle set to lowest priority" /></th>
542
        [% END %]
543
	<th>&nbsp;</th>
544
    [% IF SuspendHoldsIntranet %]<th>&nbsp;</th><!-- Suspend Holds Column Header -->[% END %]
545
      </tr>
546
  [% FOREACH reserveloo IN biblioloo.reserveloop %]
547
        <tr>
548
        <td>
549
          <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id | html %]" />
550
          <input type="hidden" name="borrowernumber" value="[% reserveloo.borrowernumber | html %]" />
551
          <input type="hidden" name="biblionumber" value="[% reserveloo.biblionumber | html %]" />
552
          <select name="rank-request">
553
              [% IF ( reserveloo.found ) %]
554
                  [% IF ( reserveloo.intransit ) %]
555
                      <option value="T" selected="selected">In transit</option>
556
                  [% ELSE %]
557
                      <option value="W" selected="selected">Waiting</option>
558
                  [% END %]
559
              [% END %]
560
561
              [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
562
                  [% FOREACH optionloo IN reserveloo.optionloop %]
563
                      [% IF ( optionloo.selected ) %]
564
                          <option value="[% optionloo.num | html %]" selected="selected">[% optionloo.num | html %]</option>
565
                      [% ELSE %]
566
                          <option value="[% optionloo.num | html %]">[% optionloo.num | html %]</option>
567
                      [% END %]
568
                  [% END %]
569
              [% ELSIF !reserveloo.found %]
570
                  <option value="[% reserveloo.priority | html %]" selected="selected">[% reserveloo.priority | html %]</option>
571
              [% END %]
572
              <option value="del">del</option>
573
          </select>
574
        </td>
575
576
     [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
577
        <td style="white-space:nowrap;">
578
            <a title="Move hold up" href="request.pl?action=move&amp;where=up&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;date=[% reserveloo.date | html %]">
579
            <img src="[% interface | html %]/[% theme | html %]/img/go-up.png" alt="Go up" />
580
                </a>
581
582
                <a title="Move hold to top" href="request.pl?action=move&amp;where=top&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;date=[% reserveloo.date | html %]">
583
                    <img src="[% interface | html %]/[% theme | html %]/img/go-top.png" alt="Go top" />
584
                </a>
585
586
                <a title="Move hold to bottom" href="request.pl?action=move&amp;where=bottom&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;date=[% reserveloo.date | html %]">
587
                    <img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Go bottom" />
588
                </a>
589
590
                <a title="Move hold down" href="request.pl?action=move&amp;where=down&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;date=[% reserveloo.date | html %]">
591
                    <img src="[% interface | html %]/[% theme | html %]/img/go-down.png" alt="Go down" />
592
                </a>
593
        </td>
594
    [% END %]
595
596
        <td>
597
          [% INCLUDE 'patron-title.inc' patron=reserveloo.patron hide_patron_infos_if_needed=1 %]
598
        </td>
599
        <td>[% reserveloo.notes | html %]</td>
600
        <td>[% reserveloo.date | html %]</td>
601
        <td>[% reserveloo.expirationdate | html %]</td>
602
        <td>
603
    [% IF ( reserveloo.found ) %]
604
    	[% IF ( reserveloo.atdestination ) %]
605
            [% IF ( reserveloo.found ) %]
606
                Item waiting at <b> [% reserveloo.wbrname | html %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode | html %]" /> since [% reserveloo.waiting_date | $KohaDates %]
607
            [% ELSE %]
608
                Waiting to be pulled <input type="hidden" name="pickup" value="[% reserveloo.wbrcode | html %]" />
609
            [% END %]
515
            [% END %]
610
          [% ELSE %]
611
            Item being transferred to <b> [% reserveloo.wbrname | html %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode | html %]" />
612
         [% END %]
613
    [% ELSE %]
614
        [% IF Koha.Preference('IndependentBranches') && Branches.all().size == 1 %]
615
            [% Branches.GetName(reserveloo.branchcode) | html %] <input type="hidden" name="pickup" value="[% reserveloo.branchcode | html %]" />
616
        [% ELSE %]
617
            <select name="pickup">
618
                [% PROCESS options_for_libraries libraries => Branches.all({ search_params => { pickup_location => 1 }, selected => reserveloo.branchcode }) %]
619
            </select>
620
        [% END %]
621
    [% END %]
622
        </td>
623
        <td>
624
    [% IF ( reserveloo.found ) %]
625
          <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reserveloo.biblionumber | html %]">
626
                [% IF ( reserveloo.barcodenumber ) %]
627
                    [% reserveloo.barcodenumber | html %]
628
                    <input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber | html %]" />
629
                [% ELSE %]
630
                    No barcode
631
                [% END %]
632
          </a>
633
    [% ELSE %]
634
            [% IF ( reserveloo.item_level_hold ) %]
635
                <i>Only item
636
                <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reserveloo.biblionumber | html %]">
637
                     [% IF ( reserveloo.barcodenumber ) %]
638
                         [% reserveloo.barcodenumber | html %]
639
                        <input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber | html %]" />
640
                    [% ELSE %]
641
                        No barcode
642
                    [% END %]
643
                </a>
644
                </i>
645
            [% ELSE %]
646
                [% IF reserveloo.itemtype %]
647
                    <i>Next available [% ItemTypes.GetDescription( reserveloo.itemtype ) | html %] item</i>
648
                [% ELSE %]
649
                    <i>Next available</i>
650
                [% END %]
651
                 <input type="hidden" name="itemnumber" value="" />
652
            [% END %]
653
    [% END %]
654
        </td>
655
656
    [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
657
	<td>
658
                <a title="Toggle lowest priority" href="request.pl?action=setLowestPriority&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;date=[% reserveloo.date | html %]">
659
			[% IF ( reserveloo.lowestPriority ) %]
660
                        <img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Unset lowest priority" />
661
		        [% ELSE %]
662
                        <img src="[% interface | html %]/[% theme | html %]/img/go-down.png" alt="Set to lowest priority" />
663
		        [% END %]
664
		</a>
665
	</td>
666
    [% END %]
667
668
	<td>
669
        <a class="cancel-hold" title="Cancel hold" href="request.pl?action=cancel&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;reserve_id=[% reserveloo.reserve_id | html %]&amp;date=[% reserveloo.date | html %]">
670
                    <img src="[% interface | html %]/[% theme | html %]/img/x.png" alt="Cancel" />
671
                </a>
672
	</td>
673
674
        [% IF SuspendHoldsIntranet %]
675
	<td>
676
        [% UNLESS ( reserveloo.found ) %]
677
            <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 | html %]&amp;borrowernumber=[% reserveloo.borrowernumber | html %]&amp;biblionumber=[% reserveloo.biblionumber | html %]&amp;date=[% reserveloo.date | html %]&amp;suspend_until=' + $('#suspend_until_[% reserveloo.reserve_id | html %]').val()" />
678
516
679
            [% IF AutoResumeSuspendedHolds %]
517
            <fieldset class="rows left">
680
                <label for="suspend_until_[% reserveloo.reserve_id | html %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label>
518
                <legend>Existing holds</legend>
681
                <input name="suspend_until" id="suspend_until_[% reserveloo.reserve_id | html %]" size="10" value="[% reserveloo.suspend_until | $KohaDates %]" class="datepicker suspend_until_datepicker" />
682
                <a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.reserve_id | html %]').value='';">Clear date</a>
683
            [% ELSE %]
684
                <input type="hidden" name="suspend_until" id="suspend_until_[% reserveloo.reserve_id | html %]" value=""/>
685
            [% END %]
686
	[% ELSE %]
687
		<input type="hidden" name="suspend_until" value="" />
688
	[% END %]
689
	</td>
690
        [% END # IF SuspendHoldsIntranet %]
691
692
      </tr>
693
519
694
  [% END %] <!-- existing reserveloop -->
520
                [% FOREACH biblioloo IN biblioloop %]
695
     </table>
521
                    [% IF ( biblioloo.reserveloop ) %]
696
  [% END %]<!-- /reserveloop -->
522
                        <table>
697
[% END %]<!-- /biblioloop -->
523
                            [% IF ( multi_hold ) %]
524
                                <caption><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber %]">[% biblioloo.title |html %]</a></caption>
525
                            [% END %]
698
526
699
<fieldset class="action">
527
                            <tr>
700
  <input type="submit" name="submit" value="Update hold(s)" />
528
                                [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
701
</fieldset>
529
                                    <th>Priority</th>
702
</fieldset>
530
                                    <th>&nbsp;</th>
703
</form>
531
                                [% ELSE %]
704
[% END %]
532
                                    <th>Delete?</th>
533
                                [% END %]
534
                                <th>Patron</th>
535
                                <th>Notes</th>
536
                                <th>Date</th>
537
                                <th>Expiration</th>
538
                                <th>Pickup library</th>
539
                                <th>Details</th>
540
                                [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
541
                                    <th><img src="[% interface %]/[% theme %]/img/go-bottom.png" alt="Toggle set to lowest priority" /></th>
542
                                [% END %]
543
                                <th>&nbsp;</th>
544
                                [% IF SuspendHoldsIntranet %]<th>&nbsp;</th><!-- Suspend Holds Column Header -->[% END %]
545
                            </tr>
546
547
                            [% FOREACH reserveloo IN biblioloo.reserveloop %]
548
                                <tr>
549
                                    <td>
550
                                        <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id %]" />
551
                                        <input type="hidden" name="borrowernumber" value="[% reserveloo.borrowernumber %]" />
552
                                        <input type="hidden" name="biblionumber" value="[% reserveloo.biblionumber %]" />
553
                                        <select name="rank-request">
554
                                            [% IF ( reserveloo.found ) %]
555
                                                [% IF ( reserveloo.intransit ) %]
556
                                                    <option value="T" selected="selected">In transit</option>
557
                                                [% ELSE %]
558
                                                    <option value="W" selected="selected">Waiting</option>
559
                                                [% END %]
560
                                            [% END %]
561
562
                                            [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
563
                                                [% FOREACH optionloo IN reserveloo.optionloop %]
564
                                                    [% IF ( optionloo.selected ) %]
565
                                                        <option value="[% optionloo.num %]" selected="selected">[% optionloo.num %]</option>
566
                                                    [% ELSE %]
567
                                                        <option value="[% optionloo.num %]">[% optionloo.num %]</option>
568
                                                    [% END %]
569
                                                [% END %]
570
                                            [% ELSIF !reserveloo.found %]
571
                                                <option value="[% reserveloo.priority %]" selected="selected">[% reserveloo.priority %]</option>
572
                                            [% END %]
573
574
                                            <option value="del">del</option>
575
                                        </select>
576
                                    </td>
577
578
                                    [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
579
                                        <td style="white-space:nowrap;">
580
                                            <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 %]">
581
                                                <img src="[% interface %]/[% theme %]/img/go-up.png" alt="Go up" />
582
                                            </a>
583
584
                                            <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 %]">
585
                                                <img src="[% interface %]/[% theme %]/img/go-top.png" alt="Go top" />
586
                                            </a>
587
588
                                            <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 %]">
589
                                                <img src="[% interface %]/[% theme %]/img/go-bottom.png" alt="Go bottom" />
590
                                            </a>
591
592
                                            <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 %]">
593
                                                <img src="[% interface %]/[% theme %]/img/go-down.png" alt="Go down" />
594
                                            </a>
595
                                        </td>
596
                                    [% END %]
597
598
                                    <td>
599
                                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrowernumber %]" >
600
                                            [% IF ( reserveloo.hidename ) %]
601
                                                [% reserveloo.cardnumber (reserveloo.borrowernumber) %]
602
                                            [% ELSE %]
603
                                                [% reserveloo.firstname %] [% reserveloo.surname %]
604
                                            [% END %]
605
                                        </a>
606
                                    </td>
607
608
                                    <td>[% reserveloo.notes %]</td>
609
                                    <td>[% reserveloo.date %]</td>
610
                                    <td>[% reserveloo.expirationdate %]</td>
611
612
                                    <td>
613
                                        [% IF ( reserveloo.found ) %]
614
                                            [% IF ( reserveloo.atdestination ) %]
615
                                                [% IF ( reserveloo.found ) %]
616
                                                    Item waiting at <b> [% reserveloo.wbrname %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" /> since [% reserveloo.waiting_date | $KohaDates %]
617
                                                [% ELSE %]
618
                                                    Waiting to be pulled <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" />
619
                                                [% END %]
620
                                            [% ELSE %]
621
                                                Item being transferred to <b> [% reserveloo.wbrname %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" />
622
                                            [% END %]
623
                                        [% ELSE %]
624
                                            [% IF Koha.Preference('IndependentBranches') && Branches.all().size == 1 %]
625
                                                [% Branches.GetName(reserveloo.branchcode) %] <input type="hidden" name="pickup" value="[% reserveloo.branchcode %]" />
626
                                            [% ELSE %]
627
                                                <select name="pickup">
628
                                                    [% PROCESS options_for_libraries libraries => Branches.all( selected => reserveloo.branchcode ) %]
629
                                                </select>
630
                                            [% END %]
631
                                        [% END %]
632
                                    </td>
633
634
                                    <td>
635
                                        [% IF ( reserveloo.found ) %]
636
                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reserveloo.biblionumber %]">
637
                                                [% IF ( reserveloo.barcodenumber ) %]
638
                                                    [% reserveloo.barcodenumber %]
639
                                                    <input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber %]" />
640
                                                [% ELSE %]
641
                                                    No barcode
642
                                                [% END %]
643
                                            </a>
644
                                        [% ELSE %]
645
                                            [% IF ( reserveloo.item_level_hold ) %]
646
                                                <i>
647
                                                    Only item
648
                                                    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reserveloo.biblionumber %]">
649
                                                        [% IF ( reserveloo.barcodenumber ) %]
650
                                                            [% reserveloo.barcodenumber %]
651
                                                            <input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber %]" />
652
                                                        [% ELSE %]
653
                                                            No barcode
654
                                                        [% END %]
655
                                                    </a>
656
                                                </i>
657
                                            [% ELSE %]
658
                                                [% IF reserveloo.itemtype %]
659
                                                    <i>Next available [% ItemTypes.GetDescription( reserveloo.itemtype ) %] item</i>
660
                                                [% ELSE %]
661
                                                    <i>Next available</i>
662
                                                [% END %]
663
664
                                                <input type="hidden" name="itemnumber" value="" />
665
                                            [% END %]
666
                                        [% END %]
667
                                    </td>
668
669
                                    [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
670
                                        <td>
671
                                            <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 %]">
672
                                                [% IF ( reserveloo.lowestPriority ) %]
673
                                                    <img src="[% interface %]/[% theme %]/img/go-bottom.png" alt="Unset lowest priority" />
674
                                                [% ELSE %]
675
                                                    <img src="[% interface %]/[% theme %]/img/go-down.png" alt="Set to lowest priority" />
676
                                                [% END %]
677
                                            </a>
678
                                        </td>
679
                                    [% END %]
680
681
                                    <td>
682
                                        <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 %]">
683
                                            <img src="[% interface %]/[% theme %]/img/x.png" alt="Cancel" />
684
                                        </a>
685
                                    </td>
686
687
                                    [% IF SuspendHoldsIntranet %]
688
                                        <td>
689
                                            [% UNLESS ( reserveloo.found ) %]
690
                                                <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()" />
691
692
                                                [% IF AutoResumeSuspendedHolds %]
693
                                                    <label for="suspend_until_[% reserveloo.reserve_id %]">[% IF ( reserveloo.suspend ) %] on [% ELSE %] until [% END %]</label>
694
                                                    <input name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" size="10" value="[% reserveloo.suspend_until | $KohaDates %]" class="datepicker suspend_until_datepicker" />
695
                                                    <a href='#' onclick="document.getElementById('suspend_until_[% reserveloo.reserve_id %]').value='';">Clear date</a>
696
                                                [% ELSE %]
697
                                                    <input type="hidden" name="suspend_until" id="suspend_until_[% reserveloo.reserve_id %]" value=""/>
698
                                                [% END %]
699
700
                                            [% ELSE %]
701
                                                <input type="hidden" name="suspend_until" value="" />
702
                                            [% END %]
703
                                        </td>
704
                                    [% END # IF SuspendHoldsIntranet %]
705
706
                                </tr>
707
708
                            [% END %] <!-- existing reserveloop -->
709
                        </table>
710
                    [% END %]<!-- /reserveloop -->
711
                [% END %]<!-- /biblioloop -->
712
713
                <fieldset class="action">
714
                    <input type="submit" name="submit" value="Update hold(s)" />
715
                </fieldset>
716
            </fieldset>
717
        </form>
718
    [% END %]
705
[% END %]
719
[% END %]
706
</div>
720
</div>
707
</div>
721
</div>
708
- 

Return to bug 19469