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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-273 / +314 lines)
Lines 434-461 Link Here
434
                <div class="dialog alert hide holdalert">
434
                <div class="dialog alert hide holdalert">
435
                </div>
435
                </div>
436
436
437
                <fieldset class="rows">
437
                [% UNLESS ( multi_hold ) %]
438
                    <legend>Hold details</legend>
438
                    <fieldset class="rows">
439
                    <form action="placerequest.pl" method="post" name="form" id="hold-request-form">
439
                        <legend>Hold details</legend>
440
                        <form action="placerequest.pl" method="post" name="form" id="hold-request-form">
440
441
441
                        <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
442
                            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
442
                        <input type="hidden" name="type" value="str8" />
443
                            <input type="hidden" name="type" value="str8" />
443
444
444
                        [% FOREACH biblionumber IN biblionumbers %]
445
                            [% FOREACH biblionumber IN biblionumbers %]
445
                        <input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/>
446
                            <input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/>
446
                        [% END %]
447
                        [% IF ( multi_hold ) %]
448
                            <input type="hidden" name="multi_holds" id="multi_holds" value="1" />
449
                            <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
450
                            <input type="hidden" name="request" value="any"/>
451
                            [% FOREACH biblioloo IN biblioloop %]
452
                                <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
453
                                <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
454
                            [% END %]
447
                            [% END %]
455
                        [% ELSE %]
456
                            <input type="hidden" name="title" value="[% biblio.title | html %]" />
448
                            <input type="hidden" name="title" value="[% biblio.title | html %]" />
457
                            <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
449
                            <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
458
                        [% END # /IF multi_hold %]
459
450
460
                        <ol>
451
                        <ol>
461
                            <li>
452
                            <li>
Lines 466-528 Link Here
466
                                    Not defined yet
457
                                    Not defined yet
467
                                [% END %]
458
                                [% END %]
468
                            </li>
459
                            </li>
469
460
                            <li>
470
                            [% UNLESS ( multi_hold ) %]
461
                                <span class="label">Estimated priority:</span>
471
                                <li>
462
                                <strong>[% fixedRank | html %]</strong>
472
                                    <span class="label">Estimated priority:</span>
463
                            </li>
473
                                    <strong>[% fixedRank | html %]</strong>
474
                                </li>
475
                            [% END %]
476
477
                            <li>
464
                            <li>
478
                                <label for="holdnotes">Notes:</label>
465
                                <label for="holdnotes">Notes:</label>
479
                                <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
466
                                <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
480
                            </li>
467
                            </li>
481
                            <li>
468
                            <li>
482
                                <label for="pickup">Pickup at:</label>
469
                                <label for="pickup">Pickup at:</label>
483
                            [% UNLESS ( multi_hold ) %]
484
                                <select name="pickup" id="pickup"
470
                                <select name="pickup" id="pickup"
485
                                        data-biblio-id="[% biblio.biblionumber | html %]"
471
                                        data-biblio-id="[% biblio.biblionumber | html %]"
486
                                        data-patron-id="[% patron.borrowernumber | html %]"
472
                                        data-patron-id="[% patron.borrowernumber | html %]"
487
                                        data-pickup-location-source="biblio">
473
                                        data-pickup-location-source="biblio">
488
                                    [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
474
                                    [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
489
                            [% ELSE %]
490
                                <select name="pickup" id="pickup_multi" data-patron-id="[% patron.borrowernumber | html %]">
491
                                    <option value="" selected="selected"></option>
492
                                [% FOREACH pickup_location IN multi_pickup_locations %]
493
                                    <option value="[% pickup_location.branchcode | html %]">[% pickup_location.branchname | html %]</option>
494
                                [% END %]
495
                            [% END %]
496
                                </select>
475
                                </select>
497
                            </li>
476
                            </li>
498
477
                            [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
499
                            [% UNLESS ( multi_hold ) %]
478
                                <li>
500
                                [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
479
                                    <label for="itemtype">Request specific item type:</label>
501
                                    <li>
480
                                    <select name="itemtype" id="itemtype">
502
                                        <label for="itemtype">Request specific item type:</label>
481
                                        <option value="">Any item type</option>
503
                                        <select name="itemtype" id="itemtype">
482
                                        [%- FOREACH itemtype IN available_itemtypes %]
504
                                            <option value="">Any item type</option>
483
                                            <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
505
                                            [%- FOREACH itemtype IN available_itemtypes %]
484
                                        [%- END %]
506
                                                <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
485
                                    </select>
507
                                            [%- END %]
486
                                </li>
508
                                        </select>
487
                            [% END %]
509
                                    </li>
510
                                [% END %]
511
                            [% END # /UNLESS multi_hold %]
512
513
                            [% IF ( reserve_in_future ) %]
488
                            [% IF ( reserve_in_future ) %]
514
                                <li>
489
                                <li>
515
                                    <label for="from">Hold starts on date:</label>
490
                                    <label for="from">Hold starts on date:</label>
516
                                    <input id="reserve_date" name="reserve_date" id="from" size="10" type="text" data-date_to="expiration_date" class="flatpickr" data-flatpickr-futuredate="true" />
491
                                    <input id="reserve_date" name="reserve_date" id="from" size="10" type="text" data-date_to="expiration_date" class="flatpickr" data-flatpickr-futuredate="true" />
517
                                </li>
492
                                </li>
518
                            [% END %]
493
                            [% END %]
519
520
                            <li>
521
                                <label for="to">Hold expires on date:</label>
522
                                <input id="expiration_date" name="expiration_date" id="to" size="10" type="text" class="flatpickr" data-flatpickr-futuredate="true" />
523
                            </li>
524
525
                            [% UNLESS ( multi_hold ) %]
526
                                <li>
494
                                <li>
527
                                    <label for="requestany">Hold next available item </label>
495
                                    <label for="requestany">Hold next available item </label>
528
                                    [% IF force_hold_level == 'item' %]
496
                                    [% IF force_hold_level == 'item' %]
Lines 544-789 Link Here
544
                                [% ELSE %]
512
                                [% ELSE %]
545
                                    <input type="hidden" name="holds_to_place_count" value="1" />
513
                                    <input type="hidden" name="holds_to_place_count" value="1" />
546
                                [% END %]
514
                                [% END %]
547
                            [% END # /UNLESS multi_hold %]
548
515
516
                            <li>
517
                                <label for="to">Hold expires on date:</label>
518
                                <input id="expiration_date" name="expiration_date" id="to" size="10" type="text" class="flatpickr" data-flatpickr-futuredate="true" />
519
                            </li>
549
                            <li id="non_priority_list_item">
520
                            <li id="non_priority_list_item">
550
                                <label for="non_priority">Non priority hold:</label>
521
                                <label for="non_priority">Non priority hold:</label>
551
                                <input name="non_priority" id="non_priority" type="checkbox" />
522
                                <input name="non_priority" id="non_priority" type="checkbox" />
552
                                <span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span>
523
                                <span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span>
553
                            </li>
524
                            </li>
554
                        </ol>
525
                        </ol>
555
526
                        <fieldset class="action">
556
                        [% UNLESS ( multi_hold ) %]
527
                            [% IF ( patron.borrowernumber ) %]
557
                            <fieldset class="action">
528
                                [% IF ( override_required ) %]
558
                                [% IF ( patron.borrowernumber ) %]
529
                                    <button type="submit" class="btn btn-default warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
559
                                    [% IF ( override_required ) %]
530
                                [% ELSIF ( none_available ) %]
560
                                        <button type="submit" class="btn btn-default warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
531
                                    <button type="submit" disabled="disabled" class="btn btn-default btn-disabled">Place hold</button>
561
                                    [% ELSIF ( none_available ) %]
532
                                [% ELSE %]
562
                                        <button type="submit" disabled="disabled" class="btn btn-default btn-disabled">Place hold</button>
533
                                    <button type="submit" class="btn btn-default">Place hold</button>
563
                                    [% ELSE %]
564
                                        <button type="submit" class="btn btn-default">Place hold</button>
565
                                    [% END %]
566
                                [% END %]
534
                                [% END %]
567
                            </fieldset>
535
                            [% END %]
536
                        </fieldset>
568
537
569
                            [% biblio = biblioloop.0 %]
538
                        [% biblio = biblioloop.0 %]
570
539
571
                            <ol>
540
                        <ol>
572
                                [% UNLESS Koha.Preference('item-level_itypes') %]
541
                            [% UNLESS Koha.Preference('item-level_itypes') %]
573
                                    <li>
542
                                <li>
574
                                        <span class="label">Item typeX:</span>
543
                                    <span class="label">Item typeX:</span>
575
                                        [% biblio.itemtype.translated_description | html %]
544
                                    [% biblio.itemtype.translated_description | html %]
576
                                    </li>
545
                                </li>
577
                                [% END %]
546
                            [% END %]
578
547
579
                                [% IF ( biblio.biblioitem.publicationyear ) %]
548
                            [% IF ( biblio.biblioitem.publicationyear ) %]
580
                                    <li>
549
                                <li>
581
                                        <span class="label">Publication year:</span>
550
                                    <span class="label">Publication year:</span>
582
                                        [% biblio.biblioitem.publicationyear | html %]
551
                                    [% biblio.biblioitem.publicationyear | html %]
583
                                    </li>
552
                                </li>
584
                                [% END %]
553
                            [% END %]
585
                            </ol>
554
                        </ol>
586
555
587
                            <h2 style="padding: 0 1em;">
556
                        <h2 style="padding: 0 1em;">
588
                                Place a hold on a specific item
557
                            Place a hold on a specific item
589
                                [% IF force_hold_level == 'item' %]
558
                            [% IF force_hold_level == 'item' %]
590
                                     <span class="error"><em>(Required)</em></span>
559
                                 <span class="error"><em>(Required)</em></span>
591
                                [% END %]
560
                            [% END %]
592
                            </h2>
561
                        </h2>
593
562
594
                            <table id="requestspecific">
563
                        <table id="requestspecific">
595
                                <thead>
564
                            <thead>
596
                                    <tr>
565
                                <tr>
597
                                        <th>Hold</th>
566
                                    <th>Hold</th>
598
                                        <th>Allowed pickup locations</th>
567
                                    <th>Allowed pickup locations</th>
599
                                        [% IF Koha.Preference('item-level_itypes') %]
568
                                    [% IF Koha.Preference('item-level_itypes') %]
600
                                            <th>Item type</th>
569
                                        <th>Item type</th>
601
                                        [% END %]
570
                                    [% END %]
602
                                        <th>Barcode</th>
571
                                    <th>Barcode</th>
603
                                        <th>Home library</th>
572
                                    <th>Home library</th>
604
                                        <th>Last location</th>
573
                                    <th>Last location</th>
605
                                        [% IF itemdata_ccode %]
574
                                    [% IF itemdata_ccode %]
606
                                            <th>Collection</th>
575
                                        <th>Collection</th>
607
                                        [% END %]
576
                                    [% END %]
608
                                        <th>Call number</th>
577
                                    <th>Call number</th>
609
                                        <th>Copy number</th>
578
                                    <th>Copy number</th>
610
                                        [% IF itemdata_enumchron %]
579
                                    [% IF itemdata_enumchron %]
611
                                            <th>Vol no.</th>
580
                                        <th>Vol no.</th>
612
                                        [% END %]
581
                                    [% END %]
613
                                        <th>Information</th>
582
                                    <th>Information</th>
614
                                    </tr>
583
                                </tr>
615
                                </thead>
584
                            </thead>
616
                                <tbody>
585
                            <tbody>
617
                                    [% SET selected = 0 %]
586
                                [% SET selected = 0 %]
618
                                    [% FOREACH itemloo IN biblio.itemloop %]
587
                                [% FOREACH itemloo IN biblio.itemloop %]
619
                                        [% UNLESS ( itemloo.hide ) %]
588
                                    [% UNLESS ( itemloo.hide ) %]
620
                                            <tr class="[% itemloo.backgroundcolor | html %]">
589
                                        <tr class="[% itemloo.backgroundcolor | html %]">
621
                                                <td>
590
                                            <td>
622
                                                    [% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
591
                                                [% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
623
                                                        <span class="error">
592
                                                    <span class="error">
624
                                                            <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
593
                                                        <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
625
                                                            Hold must be record level
594
                                                        Hold must be record level
626
                                                        </span>
595
                                                    </span>
627
                                                    [% ELSIF ( itemloo.available ) %]
596
                                                [% ELSIF ( itemloo.available ) %]
628
                                                        <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" />
597
                                                    <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" />
629
                                                    [% ELSIF ( itemloo.override ) %]
598
                                                [% ELSIF ( itemloo.override ) %]
630
                                                        <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" />
599
                                                    <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" />
631
                                                        <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
600
                                                    <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
632
                                                    [% ELSE %]
601
                                                [% ELSE %]
633
                                                        <span class="error">
602
                                                    <span class="error">
634
                                                            <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
603
                                                        <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
635
                                                            [% IF itemloo.not_holdable %]
604
                                                        [% IF itemloo.not_holdable %]
636
                                                                [% IF itemloo.not_holdable == 'damaged' %]
605
                                                            [% IF itemloo.not_holdable == 'damaged' %]
637
                                                                    <span>Item damaged</span>
606
                                                                <span>Item damaged</span>
638
                                                                [% ELSIF itemloo.not_holdable == 'ageRestricted' %]
607
                                                            [% ELSIF itemloo.not_holdable == 'ageRestricted' %]
639
                                                                    <span>Age restricted</span>
608
                                                                <span>Age restricted</span>
640
                                                                [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %]
609
                                                            [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %]
641
                                                                    <span>Exceeded max holds per record</span>
610
                                                                <span>Exceeded max holds per record</span>
642
                                                                [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %]
611
                                                            [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %]
643
                                                                    <span>Daily hold limit reached for patron</span>
612
                                                                <span>Daily hold limit reached for patron</span>
644
                                                                [% ELSIF itemloo.not_holdable == 'tooManyReserves' %]
613
                                                            [% ELSIF itemloo.not_holdable == 'tooManyReserves' %]
645
                                                                    <span>Too many holds</span>
614
                                                                <span>Too many holds</span>
646
                                                                [% ELSIF itemloo.not_holdable == 'notReservable' %]
615
                                                            [% ELSIF itemloo.not_holdable == 'notReservable' %]
647
                                                                    <span>Not holdable</span>
616
                                                                <span>Not holdable</span>
648
                                                                [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
617
                                                            [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
649
                                                                    <span>Patron is from different library</span>
618
                                                                <span>Patron is from different library</span>
650
                                                                [% ELSIF itemloo.not_holdable == 'branchNotInHoldGroup' %]
619
                                                            [% ELSIF itemloo.not_holdable == 'branchNotInHoldGroup' %]
651
                                                                    <span>Cannot place hold from patron's library</span>
620
                                                                <span>Cannot place hold from patron's library</span>
652
                                                                [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
621
                                                            [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
653
                                                                    <span>Patron already has hold for this item</span>
622
                                                                <span>Patron already has hold for this item</span>
654
                                                                [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
623
                                                            [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
655
                                                                    <span>Cannot be transferred to pickup library</span>
624
                                                                <span>Cannot be transferred to pickup library</span>
656
                                                                [% ELSIF itemloo.not_holdable == 'pickupNotInHoldGroup' %]
625
                                                            [% ELSIF itemloo.not_holdable == 'pickupNotInHoldGroup' %]
657
                                                                    <span>Only pickup locations within the same hold group are allowed</span>
626
                                                                <span>Only pickup locations within the same hold group are allowed</span>
658
                                                                [% ELSIF itemloo.not_holdable == 'noReservesAllowed' %]
627
                                                            [% ELSIF itemloo.not_holdable == 'noReservesAllowed' %]
659
                                                                    <span>No reserves are allowed on this item</span>
628
                                                                <span>No reserves are allowed on this item</span>
660
                                                                [% ELSIF itemloo.not_holdable == 'libraryNotPickupLocation' %]
629
                                                            [% ELSIF itemloo.not_holdable == 'libraryNotPickupLocation' %]
661
                                                                    <span>Library is not a pickup location</span>
630
                                                                <span>Library is not a pickup location</span>
662
                                                                [% ELSIF itemloo.not_holdable == 'no_valid_pickup_location' %]
631
                                                            [% ELSIF itemloo.not_holdable == 'no_valid_pickup_location' %]
663
                                                                    <span>No valid pickup location</span>
632
                                                                <span>No valid pickup location</span>
664
                                                                [% ELSE %]
633
                                                            [% ELSE %]
665
                                                                    <span>[% itemloo.not_holdable | html %]</span>
634
                                                                <span>[% itemloo.not_holdable | html %]</span>
666
                                                                [% END %]
667
                                                            [% END %]
635
                                                            [% END %]
668
                                                        </span>
669
                                                    [% END # /IF force_hold_level %]
670
                                                </td>
671
                                                <td>
672
                                                [% IF (itemloo.pickup_locations_count > 0) %]
673
                                                    <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;"
674
                                                            data-item-id="[% itemloo.itemnumber | html %]"
675
                                                            data-patron-id="[% patron.borrowernumber | html %]"
676
                                                            data-pickup-location-source="item">
677
                                                    [% IF (itemloo.default_pickup_location) %]
678
                                                        <option value="[% itemloo.default_pickup_location.branchcode | html %]" selected="selected">[% itemloo.default_pickup_location.branchname | html %]</option>
679
                                                    [% END %]
680
                                                    </select>
681
                                                [% END %]
682
                                                </td>
683
                                                [% IF Koha.Preference('item-level_itypes') %]
684
                                                    <td>
685
                                                        [% UNLESS ( noItemTypeImages ) %]
686
                                                            [% IF ( itemloo.itemtype.image_location) %]<img src="[% itemloo.itemtype.image_location | html %]" alt="" /> <br /> [% END %]
687
                                                        [% END %]
636
                                                        [% END %]
688
                                                        [% itemloo.itemtype.translated_description | html %]
637
                                                    </span>
689
                                                    </td>
638
                                                [% END # /IF force_hold_level %]
639
                                            </td>
640
                                            <td>
641
                                            [% IF (itemloo.pickup_locations_count > 0) %]
642
                                                <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;"
643
                                                        data-item-id="[% itemloo.itemnumber | html %]"
644
                                                        data-patron-id="[% patron.borrowernumber | html %]"
645
                                                        data-pickup-location-source="item">
646
                                                [% IF (itemloo.default_pickup_location) %]
647
                                                    <option value="[% itemloo.default_pickup_location.branchcode | html %]" selected="selected">[% itemloo.default_pickup_location.branchname | html %]</option>
690
                                                [% END %]
648
                                                [% END %]
649
                                                </select>
650
                                            [% END %]
651
                                            </td>
652
                                            [% IF Koha.Preference('item-level_itypes') %]
691
                                                <td>
653
                                                <td>
692
                                                    [% itemloo.barcode | html %]
654
                                                    [% UNLESS ( noItemTypeImages ) %]
693
                                                </td>
655
                                                        [% IF ( itemloo.itemtype.image_location) %]<img src="[% itemloo.itemtype.image_location | html %]" alt="" /> <br /> [% END %]
694
                                                <td>
656
                                                    [% END %]
695
                                                    [% Branches.GetName( itemloo.homebranch ) | html %]
657
                                                    [% itemloo.itemtype.translated_description | html %]
696
                                                </td>
658
                                                </td>
659
                                            [% END %]
660
                                            <td>
661
                                                [% itemloo.barcode | html %]
662
                                            </td>
663
                                            <td>
664
                                                [% Branches.GetName( itemloo.homebranch ) | html %]
665
                                            </td>
666
                                            <td>
667
                                                [% Branches.GetName( itemloo.holdingbranch ) | html %]
668
                                            </td>
669
                                            [% IF itemdata_ccode %]
697
                                                <td>
670
                                                <td>
698
                                                    [% Branches.GetName( itemloo.holdingbranch ) | html %]
671
                                                    [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemloo.ccode ) | html %][% END %]
699
                                                </td>
672
                                                </td>
700
                                                [% IF itemdata_ccode %]
673
                                            [% END %]
701
                                                    <td>
674
                                            <td>
702
                                                        [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemloo.ccode ) | html %][% END %]
675
                                                [% itemloo.itemcallnumber | html %]
703
                                                    </td>
676
                                            </td>
704
                                                [% END %]
677
                                            <td>
678
                                                [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %]&nbsp;[% END %]
679
                                            </td>
680
                                            [% IF itemdata_enumchron %]
705
                                                <td>
681
                                                <td>
706
                                                    [% itemloo.itemcallnumber | html %]
682
                                                    [% itemloo.enumchron | html %]
707
                                                </td>
683
                                                </td>
684
                                            [% END %]
685
                                            [% IF ( itemloo.onloan ) %]
686
                                                <td data-order="[% itemloo.date_due | html %]">
687
                                                    <span class="checkedout">Due [% itemloo.date_due | $KohaDates  as_due_date => 1 %]</span>
688
                                            [% ELSE %]
708
                                                <td>
689
                                                <td>
709
                                                    [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %]&nbsp;[% END %]
690
                                                    [% IF ( itemloo.transfertwhen ) %]
710
                                                </td>
691
                                                        In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %],
711
                                                [% IF itemdata_enumchron %]
692
                                                        to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %]
712
                                                    <td>
693
                                                    [% END %]
713
                                                        [% itemloo.enumchron | html %]
694
                                            [% END %]
714
                                                    </td>
715
                                                [% END %]
716
                                                [% IF ( itemloo.onloan ) %]
717
                                                    <td data-order="[% itemloo.date_due | html %]">
718
                                                        <span class="checkedout">Due [% itemloo.date_due | $KohaDates  as_due_date => 1 %]</span>
719
                                                [% ELSE %]
720
                                                    <td>
721
                                                        [% IF ( itemloo.transfertwhen ) %]
722
                                                            In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %],
723
                                                            to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %]
724
                                                        [% END %]
725
                                                [% END %]
726
695
727
                                                    [% IF ( itemloo.reservedate ) %]
696
                                                [% IF ( itemloo.reservedate ) %]
728
                                                        [% IF ( itemloo.nocancel ) %]
697
                                                    [% IF ( itemloo.nocancel ) %]
729
                                                                Can't be cancelled when item is in transit
698
                                                            Can't be cancelled when item is in transit
699
                                                    [% ELSE %]
700
                                                        [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %]
701
                                                        [% IF ( itemloo.canreservefromotherbranches ) %]
702
                                                            for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedFor.borrowernumber | uri %]">[% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %]</a>
703
                                                        [% END %]
704
                                                        [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %]
705
                                                        [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since
706
                                                        [% IF ( itemloo.waitingdate ) %]
707
                                                            [% itemloo.waitingdate | $KohaDates %]
730
                                                        [% ELSE %]
708
                                                        [% ELSE %]
731
                                                            [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %]
709
                                                            [% IF ( itemloo.reservedate ) %]
732
                                                            [% IF ( itemloo.canreservefromotherbranches ) %]
710
                                                                [% itemloo.reservedate | html %]
733
                                                                for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedFor.borrowernumber | uri %]">[% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %]</a>
734
                                                            [% END %]
711
                                                            [% END %]
735
                                                            [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %]
712
                                                        [% END %].
736
                                                            [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since
713
                                                        <a class="info cancel-hold" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber | html %]&amp;CancelBorrowerNumber=[% itemloo.ReservedFor.borrowernumber | html %]&amp;CancelItemnumber=[% itemloo.itemnumber | html %]">Cancel hold</a>
737
                                                            [% IF ( itemloo.waitingdate ) %]
714
                                                    [% END # /IF itemloo.nocancel %]
738
                                                                [% itemloo.waitingdate | $KohaDates %]
715
                                                [% ELSE %]
739
                                                            [% ELSE %]
716
                                                    Not on hold
740
                                                                [% IF ( itemloo.reservedate ) %]
717
                                                [% END # /IF itemloo.reservedate %]
741
                                                                    [% itemloo.reservedate | html %]
742
                                                                [% END %]
743
                                                            [% END %].
744
                                                            <a class="info cancel-hold" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber | html %]&amp;CancelBorrowerNumber=[% itemloo.ReservedFor.borrowernumber | html %]&amp;CancelItemnumber=[% itemloo.itemnumber | html %]">Cancel hold</a>
745
                                                        [% END # /IF itemloo.nocancel %]
746
                                                    [% ELSE %]
747
                                                        Not on hold
748
                                                    [% END # /IF itemloo.reservedate %]
749
718
750
                                                    [% IF itemloo.item_level_holds == "N" %]
719
                                                [% IF itemloo.item_level_holds == "N" %]
751
                                                        <br/>Item level hold not allowed from OPAC
720
                                                    <br/>Item level hold not allowed from OPAC
752
                                                    [% ELSIF itemloo.item_level_holds == "F" %]
721
                                                [% ELSIF itemloo.item_level_holds == "F" %]
753
                                                        <br/>Item level hold forced from OPAC
722
                                                    <br/>Item level hold forced from OPAC
754
                                                    [% END %]
723
                                                [% END %]
755
724
756
                                                    [% IF ( itemloo.itemlost ) %]
725
                                                [% IF ( itemloo.itemlost ) %]
757
                                                       <span class="lost">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => itemloo.itemlost ) | html %]</span>
726
                                                   <span class="lost">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => itemloo.itemlost ) | html %]</span>
758
                                                    [% END %]
727
                                                [% END %]
759
728
760
                                                    [% IF ( itemloo.damaged ) %]
729
                                                [% IF ( itemloo.damaged ) %]
761
                                                        <span class="dmg">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => itemloo.damaged ) | html %]</span>
730
                                                    <span class="dmg">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => itemloo.damaged ) | html %]</span>
762
                                                    [% END %]
731
                                                [% END %]
763
732
764
                                                    [% IF ( itemloo.withdrawn ) %]
733
                                                [% IF ( itemloo.withdrawn ) %]
765
                                                       <span class="wdn">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => itemloo.withdrawn ) | html %]</span>
734
                                                   <span class="wdn">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => itemloo.withdrawn ) | html %]</span>
766
                                                    [% END %]
735
                                                [% END %]
736
737
                                                [% IF ( itemloo.notforloan ) %]
738
                                                   <span class="nfl">Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemloo.notforloan ) | html %])</span>
739
                                                [% END %]
740
                                            </td>
741
                                        </tr>
742
                                    [% END # / UNLESS itemloo.hide %]
743
                                [% END # /FOREACH itemloo %]
744
                            </tbody>
745
                        </table> <!-- /#requestspecific -->
746
747
                        [% IF hiddencount %]
748
                            <form>
749
                                <p class="hiddencount">
750
                                    <a href="request.pl?biblionumber=[% biblio.biblionumber | uri %]&amp;borrowernumber=[% borrowernumber | uri %]&amp;showallitems=1">Show all items ([% biblio.hiddencount | html %] hidden)</a>
751
                                </p>
752
                            </form>
753
                        [% END # /IF hiddencount %]
754
755
                            <fieldset class="action">
756
                                [% IF ( patron AND patron.borrowernumber ) %]
757
                                    [% IF ( override_required ) %]
758
                                        <button type="submit" class="btn btn-default warning"><i class="fa fa-exclamation-triangle "></i> Place holds</button>
759
                                    [% ELSIF ( none_available ) %]
760
                                        <button class="btn btn-default" type="submit">Place holds</button>
761
                                    [% ELSE %]
762
                                        <button type="submit" class="btn btn-default">Place hold</button>
763
                                    [% END %]
764
                                [% END # /IF patron %]
765
                            </fieldset> <!-- /.action -->
766
                        </form> <!-- /#hold-request-form -->
767
                    </fieldset> <!-- /.rows -->
768
                [% ELSE # Multi-hold %]
769
                    <fieldset class="rows">
770
                        <legend>Hold details</legend>
771
                        <form action="placerequest.pl" method="post" name="form" id="hold-request-form">
772
773
                            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
774
                            <input type="hidden" name="type" value="str8" />
775
776
                            [% FOREACH biblionumber IN biblionumbers %]
777
                            <input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/>
778
                            [% END %]
779
                                <input type="hidden" name="multi_holds" id="multi_holds" value="1" />
780
                                <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
781
                                <input type="hidden" name="request" value="any"/>
782
                                [% FOREACH biblioloo IN biblioloop %]
783
                                    <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
784
                                    <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
785
                                [% END %]
786
787
                        <ol>
788
789
                            <li>
790
                                <span class="label">Patron:</span>
791
                                [% IF ( patron.borrowernumber ) %]
792
                                    <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a>
793
                                [% ELSE %]
794
                                    Not defined yet
795
                                [% END %]
796
                            </li>
797
798
                            <li>
799
                                <label for="holdnotes">Notes:</label>
800
                                <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
801
                            </li>
802
                            <li>
803
                                <label for="pickup">Pickup at:</label>
804
                                <select name="pickup" id="pickup_multi" data-patron-id="[% patron.borrowernumber | html %]">
805
                                    <option value="" selected="selected"></option>
806
                                [% FOREACH pickup_location IN multi_pickup_locations %]
807
                                    <option value="[% pickup_location.branchcode | html %]">[% pickup_location.branchname | html %]</option>
808
                                [% END %]
809
                                </select>
810
                            </li>
811
812
813
                            [% IF ( reserve_in_future ) %]
814
                                <li>
815
                                    <label for="from">Hold starts on date:</label>
816
                                    <input id="reserve_date" name="reserve_date" id="from" size="10" type="text" data-date_to="expiration_date" class="flatpickr" data-flatpickr-futuredate="true" />
817
                                </li>
818
                            [% END %]
819
820
                            <li>
821
                                <label for="to">Hold expires on date:</label>
822
                                <input id="expiration_date" name="expiration_date" id="to" size="10" type="text" class="flatpickr" data-flatpickr-futuredate="true" />
823
                            </li>
824
825
826
                            <li id="non_priority_list_item">
827
                                <label for="non_priority">Non priority hold:</label>
828
                                <input name="non_priority" id="non_priority" type="checkbox" />
829
                                <span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span>
830
                            </li>
831
                        </ol>
767
832
768
                                                    [% IF ( itemloo.notforloan ) %]
769
                                                       <span class="nfl">Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemloo.notforloan ) | html %])</span>
770
                                                    [% END %]
771
                                                </td>
772
                                            </tr>
773
                                        [% END # / UNLESS itemloo.hide %]
774
                                    [% END # /FOREACH itemloo %]
775
                                </tbody>
776
                            </table> <!-- /#requestspecific -->
777
778
                            [% IF hiddencount %]
779
                                <form>
780
                                    <p class="hiddencount">
781
                                        <a href="request.pl?biblionumber=[% biblio.biblionumber | uri %]&amp;borrowernumber=[% borrowernumber | uri %]&amp;showallitems=1">Show all items ([% biblio.hiddencount | html %] hidden)</a>
782
                                    </p>
783
                                </form>
784
                            [% END # /IF hiddencount %]
785
786
                        [% ELSE # /UNLESS multi_hold %]
787
833
788
                            <table id="requesttitles">
834
                            <table id="requesttitles">
789
                                <tr>
835
                                <tr>
Lines 877-883 Link Here
877
                                [% END # /FOREACH biblioloo %]
923
                                [% END # /FOREACH biblioloo %]
878
                            </table> <!-- /#requesttitles -->
924
                            </table> <!-- /#requesttitles -->
879
925
880
                        [% END # /UNLESS multi_hold %]
881
926
882
                        <fieldset class="action">
927
                        <fieldset class="action">
883
                            [% IF ( patron AND patron.borrowernumber ) %]
928
                            [% IF ( patron AND patron.borrowernumber ) %]
Lines 886-902 Link Here
886
                                [% ELSIF ( none_available ) %]
931
                                [% ELSIF ( none_available ) %]
887
                                    <button class="btn btn-default" type="submit">Place holds</button>
932
                                    <button class="btn btn-default" type="submit">Place holds</button>
888
                                [% ELSE %]
933
                                [% ELSE %]
889
                                    [% IF ( multi_hold ) %]
934
                                    <button type="submit" class="btn btn-default" id="multi_hold_submit">Place holds</button>
890
                                        <button type="submit" class="btn btn-default" id="multi_hold_submit">Place holds</button>
891
                                    [% ELSE %]
892
                                        <button type="submit" class="btn btn-default">Place hold</button>
893
                                    [% END %]
894
                                [% END %]
935
                                [% END %]
895
                            [% END # /IF patron %]
936
                            [% END # /IF patron %]
896
                        </fieldset> <!-- /.action -->
937
                        </fieldset> <!-- /.action -->
897
                    </form> <!-- /#hold-request-form -->
938
                    </form> <!-- /#hold-request-form -->
898
                </fieldset> <!-- /.rows -->
939
                </fieldset> <!-- /.rows -->
899
            [% END %]
940
                [% END %]
941
                [% END %]
900
942
901
            [% UNLESS ( patron ) %]
943
            [% UNLESS ( patron ) %]
902
                [% UNLESS borrowers %]
944
                [% UNLESS borrowers %]
903
- 

Return to bug 30579