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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-279 / +277 lines)
Lines 95-100 Link Here
95
        .icon-set-lowest::before {
95
        .icon-set-lowest::before {
96
            content: "\f04e";
96
            content: "\f04e";
97
        }
97
        }
98
        :disabled{
99
            opacity:0.5
100
        }
98
    </style>
101
    </style>
99
[% END %]
102
[% END %]
100
</head>
103
</head>
Lines 569-618 Link Here
569
                                    [% END %]
572
                                    [% END %]
570
                                </legend>
573
                                </legend>
571
                                <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
574
                                <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
572
                                <ol>
575
                                <fieldset class="enable_request_any disable_request_group disable_request_specific">
576
                                    <ol>
573
577
574
                                    <li>
575
                                        <label for="pickup">Pickup at:</label>
576
                                        <select name="pickup" id="pickup-next-avail"
577
                                                data-biblio-id="[% biblio.biblionumber | html %]"
578
                                                data-patron-id="[% patron.borrowernumber | html %]"
579
                                                data-pickup-location-source="biblio">
580
                                            [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
581
                                        </select>
582
                                    </li>
583
584
                                    [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
585
                                        <li>
578
                                        <li>
586
                                            <label for="itemtype">Request specific item type:</label>
579
                                            <label for="pickup">Pickup at:</label>
587
                                            <select name="itemtype" id="itemtype">
580
                                            <select name="pickup" id="pickup-next-avail"
588
                                                <option value="">Any item type</option>
581
                                                    data-biblio-id="[% biblio.biblionumber | html %]"
589
                                                [%- FOREACH itemtype IN available_itemtypes %]
582
                                                    data-patron-id="[% patron.borrowernumber | html %]"
590
                                                    <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
583
                                                    data-pickup-location-source="biblio">
591
                                                [%- END %]
584
                                                [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
592
                                            </select>
585
                                            </select>
593
                                        </li>
586
                                        </li>
594
                                    [% END %]
587
595
                                    [% IF remaining_holds_for_record > 1 %]
588
                                        [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
596
                                        <li>
589
                                            <li>
597
                                            <label for="holds_to_place_count">Holds to place (count)</label>
590
                                                <label for="itemtype">Request specific item type:</label>
598
                                            <input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" maxlength="[% remaining_holds_for_record | html %]" value="1" />
591
                                                <select name="itemtype" id="itemtype">
599
                                        </li>
592
                                                    <option value="">Any item type</option>
600
                                    [% ELSE %]
593
                                                    [%- FOREACH itemtype IN available_itemtypes %]
601
                                        <input type="hidden" name="holds_to_place_count" value="1" />
594
                                                        <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
602
                                    [% END %]
595
                                                    [%- END %]
603
                                </ol>
596
                                                </select>
597
                                            </li>
598
                                        [% END %]
599
                                        [% IF remaining_holds_for_record > 1 %]
600
                                            <li>
601
                                                <label for="holds_to_place_count">Holds to place (count)</label>
602
                                                <input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" maxlength="[% remaining_holds_for_record | html %]" value="1" />
603
                                            </li>
604
                                        [% ELSE %]
605
                                            <input type="hidden" name="holds_to_place_count" value="1" />
606
                                        [% END %]
607
                                    </ol>
604
608
605
609
606
                            <fieldset class="action">
610
                                <fieldset class="action">
607
                                [% IF ( patron.borrowernumber ) %]
611
                                    [% IF ( patron.borrowernumber ) %]
608
                                    [% IF ( override_required ) %]
612
                                        [% IF ( override_required ) %]
609
                                        <button type="submit" id="hold_any_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
613
                                            <button type="submit" id="hold_any_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
610
                                    [% ELSIF ( none_available ) %]
614
                                        [% ELSIF ( none_available ) %]
611
                                        <button type="submit" id="hold_any_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button>
615
                                            <button type="submit" id="hold_any_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button>
612
                                    [% ELSE %]
616
                                        [% ELSE %]
613
                                        <button type="submit" id="hold_any_btn" class="btn btn-primary">Place hold</button>
617
                                            <button type="submit" id="hold_any_btn" class="btn btn-primary">Place hold</button>
618
                                        [% END %]
614
                                    [% END %]
619
                                    [% END %]
615
                                [% END %]
620
                                </fieldset>
616
                            </fieldset>
621
                            </fieldset>
617
                        </fieldset>
622
                        </fieldset>
618
623
Lines 636-641 Link Here
636
                                [% END %]
641
                                [% END %]
637
                            </legend>
642
                            </legend>
638
643
644
                            <fieldset class="enable_request_group disable_request_any disable_request_specific">
639
                            [% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
645
                            [% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
640
                                <span class="error">
646
                                <span class="error">
641
                                    <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
647
                                    <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
Lines 701-707 Link Here
701
                                    </li>
707
                                    </li>
702
                                </ul>
708
                                </ul>
703
                            [% END %]
709
                            [% END %]
704
                            <button type="submit" id="hold_grp_btn" class="btn btn-primary warning">Place hold</button>
710
                                <fieldset class="action">
711
                                    <button type="submit" id="hold_grp_btn" class="btn btn-primary warning">Place hold</button>
712
                                </fieldset>
713
                            </fieldset>
705
                        </fieldset>
714
                        </fieldset>
706
                        [% END %]
715
                        [% END %]
707
                        <!-- /ItemGroup level holds -->
716
                        <!-- /ItemGroup level holds -->
Lines 721-961 Link Here
721
                                     <input type="radio" id="requestspecificitem" name="request" class="requestspecific"/>
730
                                     <input type="radio" id="requestspecificitem" name="request" class="requestspecific"/>
722
                                [% END %]
731
                                [% END %]
723
                            </legend>
732
                            </legend>
733
                            <fieldset class="enable_request_specific disable_request_any disable_request_group">
734
                                <ol>
735
                                    [% UNLESS Koha.Preference('item-level_itypes') %]
736
                                        <li>
737
                                            <span class="label">Item type:</span>
738
                                            [% biblio.itemtype.translated_description | html %]
739
                                        </li>
740
                                    [% END %]
724
741
725
                            <ol>
742
                                    [% IF ( biblio.biblioitem.publicationyear ) %]
726
                                [% UNLESS Koha.Preference('item-level_itypes') %]
743
                                        <li>
727
                                    <li>
744
                                            <span class="label">Publication year:</span>
728
                                        <span class="label">Item type:</span>
745
                                            [% biblio.biblioitem.publicationyear | html %]
729
                                        [% biblio_info.itemtype.translated_description | html %]
746
                                        </li>
730
                                    </li>
747
                                    [% END %]
731
                                [% END %]
748
                                </ol>
732
733
                                [% IF ( biblio_info.biblioitem.publicationyear ) %]
734
                                    <li>
735
                                        <span class="label">Publication year:</span>
736
                                        [% biblio_info.biblioitem.publicationyear | html %]
737
                                    </li>
738
                                [% END %]
739
                            </ol>
740
749
741
                            <table id="requestspecific">
750
                                <table id="requestspecific">
742
                                <thead>
751
                                    <thead>
743
                                    <tr>
752
                                        <tr>
744
                                        <th>Hold</th>
753
                                            <th>Hold</th>
745
                                        <th>Allowed pickup locations</th>
754
                                            <th>Allowed pickup locations</th>
746
                                        [% IF Koha.Preference('item-level_itypes') %]
755
                                            [% IF Koha.Preference('item-level_itypes') %]
747
                                            <th>Item type</th>
756
                                                <th>Item type</th>
748
                                        [% END %]
757
                                            [% END %]
749
                                        <th>Barcode</th>
758
                                            <th>Barcode</th>
750
                                        [% IF Koha.Preference('EnableItemGroupHolds') && biblio_info.object.item_groups.count %]
759
                                            [% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %]
751
                                            <th>Item group</th>
760
                                                <th>Item group</th>
752
                                        [% END %]
761
                                            [% END %]
753
                                        <th>Home library</th>
762
                                            <th>Home library</th>
754
                                        <th>Last location</th>
763
                                            <th>Last location</th>
755
                                        [% IF itemdata_ccode %]
764
                                            [% IF itemdata_ccode %]
756
                                            <th>Collection</th>
765
                                                <th>Collection</th>
757
                                        [% END %]
766
                                            [% END %]
758
                                        <th>Call number</th>
767
                                            <th>Call number</th>
759
                                        <th>Copy number</th>
768
                                            <th>Copy number</th>
760
                                        [% IF itemdata_enumchron %]
769
                                            [% IF itemdata_enumchron %]
761
                                            <th>Vol no.</th>
770
                                                <th>Vol no.</th>
762
                                        [% END %]
771
                                            [% END %]
763
                                        <th>Information</th>
772
                                            <th>Information</th>
764
                                    </tr>
773
                                        </tr>
765
                                </thead>
774
                                    </thead>
766
                                <tbody>
775
                                    <tbody>
767
                                    [% SET selected = 0 %]
776
                                        [% SET selected = 0 %]
768
                                    [% FOREACH itemloo IN biblio_info.itemloop %]
777
                                        [% FOREACH itemloo IN biblio.itemloop %]
769
                                        [% UNLESS ( itemloo.hide ) %]
778
                                            [% UNLESS ( itemloo.hide ) %]
770
                                            <tr class="[% itemloo.backgroundcolor | html %]">
779
                                                <tr class="[% itemloo.backgroundcolor | html %]">
771
                                                <td>
780
                                                    <td>
772
                                                    [% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
781
                                                        [% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
773
                                                        <span class="error">
782
                                                            <span class="error">
774
                                                            <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
783
                                                                <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
775
                                                            Hold must be record level
784
                                                                Hold must be record level
776
                                                        </span>
785
                                                            </span>
777
                                                    [% ELSIF force_hold_level == 'item_group' %]
786
                                                        [% ELSIF force_hold_level == 'item_group' %]
778
                                                        <span class="error">
787
                                                            <span class="error">
779
                                                            <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
788
                                                                <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
780
                                                            Hold must be item group level
789
                                                                Hold must be item group level
781
                                                        </span>
790
                                                            </span>
782
                                                    [% ELSIF ( itemloo.available ) %]
791
                                                        [% ELSIF ( itemloo.available ) %]
783
                                                        <input type="radio" name="checkitem" class="requestspecific" value="[% itemloo.itemnumber | html %]" />
792
                                                            <input type="radio" name="checkitem" class="requestspecific" value="[% itemloo.itemnumber | html %]" />
784
                                                    [% ELSIF ( itemloo.override ) %]
793
                                                        [% ELSIF ( itemloo.override ) %]
785
                                                        <input type="radio" name="checkitem" class="needsoverride requestspecific" value="[% itemloo.itemnumber | html %]" />
794
                                                            <input type="radio" name="checkitem" class="needsoverride requestspecific" value="[% itemloo.itemnumber | html %]" />
786
                                                        <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
795
                                                            <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
787
                                                    [% ELSE %]
796
                                                        [% ELSE %]
788
                                                        <span class="error">
797
                                                            <span class="error">
789
                                                            <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
798
                                                                <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
790
                                                            [% IF itemloo.not_holdable %]
799
                                                                [% IF itemloo.not_holdable %]
791
                                                                [% IF itemloo.not_holdable == 'damaged' %]
800
                                                                    [% IF itemloo.not_holdable == 'damaged' %]
792
                                                                    <span>Item damaged</span>
801
                                                                        <span>Item damaged</span>
793
                                                                [% ELSIF itemloo.not_holdable == 'ageRestricted' %]
802
                                                                    [% ELSIF itemloo.not_holdable == 'ageRestricted' %]
794
                                                                    <span>Age restricted</span>
803
                                                                        <span>Age restricted</span>
795
                                                                [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %]
804
                                                                    [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %]
796
                                                                    <span>Exceeded max holds per record</span>
805
                                                                        <span>Exceeded max holds per record</span>
797
                                                                [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %]
806
                                                                    [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %]
798
                                                                    <span>Daily hold limit reached for patron</span>
807
                                                                        <span>Daily hold limit reached for patron</span>
799
                                                                [% ELSIF itemloo.not_holdable == 'tooManyReserves' %]
808
                                                                    [% ELSIF itemloo.not_holdable == 'tooManyReserves' %]
800
                                                                    <span>Too many holds</span>
809
                                                                        <span>Too many holds</span>
801
                                                                [% ELSIF itemloo.not_holdable == 'notReservable' %]
810
                                                                    [% ELSIF itemloo.not_holdable == 'notReservable' %]
802
                                                                    <span>Not holdable</span>
811
                                                                        <span>Not holdable</span>
803
                                                                [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
812
                                                                    [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
804
                                                                    <span>Patron is from different library</span>
813
                                                                        <span>Patron is from different library</span>
805
                                                                [% ELSIF itemloo.not_holdable == 'branchNotInHoldGroup' %]
814
                                                                    [% ELSIF itemloo.not_holdable == 'branchNotInHoldGroup' %]
806
                                                                    <span>Cannot place hold from patron's library</span>
815
                                                                        <span>Cannot place hold from patron's library</span>
807
                                                                [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
816
                                                                    [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
808
                                                                    <span>Patron already has hold for this item</span>
817
                                                                        <span>Patron already has hold for this item</span>
809
                                                                [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
818
                                                                    [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
810
                                                                    <span>Cannot be transferred to pickup library</span>
819
                                                                        <span>Cannot be transferred to pickup library</span>
811
                                                                [% ELSIF itemloo.not_holdable == 'pickupNotInHoldGroup' %]
820
                                                                    [% ELSIF itemloo.not_holdable == 'pickupNotInHoldGroup' %]
812
                                                                    <span>Only pickup locations within the same hold group are allowed</span>
821
                                                                        <span>Only pickup locations within the same hold group are allowed</span>
813
                                                                [% ELSIF itemloo.not_holdable == 'noReservesAllowed' %]
822
                                                                    [% ELSIF itemloo.not_holdable == 'noReservesAllowed' %]
814
                                                                    <span>No holds are allowed on this item</span>
823
                                                                        <span>No holds are allowed on this item</span>
815
                                                                [% ELSIF itemloo.not_holdable == 'libraryNotPickupLocation' %]
824
                                                                    [% ELSIF itemloo.not_holdable == 'libraryNotPickupLocation' %]
816
                                                                    <span>Library is not a pickup location</span>
825
                                                                        <span>Library is not a pickup location</span>
817
                                                                [% ELSIF itemloo.not_holdable == 'no_valid_pickup_location' %]
826
                                                                    [% ELSIF itemloo.not_holdable == 'no_valid_pickup_location' %]
818
                                                                    <span>No valid pickup location</span>
827
                                                                        <span>No valid pickup location</span>
819
                                                                [% ELSIF itemloo.not_holdable == 'notforloan' %]
828
                                                                    [% ELSIF itemloo.not_holdable == 'notforloan' %]
820
                                                                    <span>Not for loan</span>
829
                                                                        <span>Not for loan</span>
821
                                                                [% ELSE %]
830
                                                                    [% ELSE %]
822
                                                                    <span>[% itemloo.not_holdable | html %]</span>
831
                                                                        <span>[% itemloo.not_holdable | html %]</span>
832
                                                                    [% END %]
823
                                                                [% END %]
833
                                                                [% END %]
834
                                                            </span>
835
                                                        [% END # /IF force_hold_level %]
836
                                                    </td>
837
                                                    <td>
838
                                                    [% IF (itemloo.pickup_locations_count > 0) || Koha.Preference('AllowHoldPolicyOverride') %]
839
                                                        <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations requestspecific" style="width:100%;"
840
                                                                data-item-id="[% itemloo.itemnumber | html %]"
841
                                                                data-patron-id="[% patron.borrowernumber | html %]"
842
                                                                data-pickup-location-source="item">
843
                                                        [% IF (itemloo.default_pickup_location) %]
844
                                                            <option value="[% itemloo.default_pickup_location.branchcode | html %]" selected="selected">[% itemloo.default_pickup_location.branchname | html %]</option>
845
                                                        [% END %]
846
                                                        </select>
847
                                                    [% END %]
848
                                                    </td>
849
                                                    [% IF Koha.Preference('item-level_itypes') %]
850
                                                        <td>
851
                                                            [% UNLESS ( noItemTypeImages ) %]
852
                                                                [% IF ( itemloo.itemtype.image_location) %]<img src="[% itemloo.itemtype.image_location | html %]" alt="" /> <br /> [% END %]
824
                                                            [% END %]
853
                                                            [% END %]
825
                                                        </span>
854
                                                            <span class="itypetext">[% itemloo.itemtype.translated_description | html %]</span>
826
                                                    [% END # /IF force_hold_level %]
855
                                                        </td>
827
                                                </td>
828
                                                <td>
829
<<<<<<< HEAD
830
                                                [% IF (itemloo.pickup_locations_count > 0) || Koha.Preference('AllowHoldPolicyOverride') %]
831
                                                    <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;"
832
=======
833
                                                [% IF (itemloo.pickup_locations_count > 0) || itemloo.override %]
834
                                                    <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations requestspecific" style="width:100%;"
835
>>>>>>> Bug 30579: Disentangle multi-hold and single bib forms
836
                                                            data-item-id="[% itemloo.itemnumber | html %]"
837
                                                            data-patron-id="[% patron.borrowernumber | html %]"
838
                                                            data-pickup-location-source="item">
839
                                                    [% IF (itemloo.default_pickup_location) %]
840
                                                        <option value="[% itemloo.default_pickup_location.branchcode | html %]" selected="selected">[% itemloo.default_pickup_location.branchname | html %]</option>
841
                                                    [% END %]
856
                                                    [% END %]
842
                                                    </select>
843
                                                [% END %]
844
                                                </td>
845
                                                [% IF Koha.Preference('item-level_itypes') %]
846
                                                    <td>
857
                                                    <td>
847
                                                        [% UNLESS ( noItemTypeImages ) %]
858
                                                        [% itemloo.barcode | html %]
848
                                                            [% IF ( itemloo.itemtype.image_location) %]<img src="[% itemloo.itemtype.image_location | html %]" alt="" /> <br /> [% END %]
849
                                                        [% END %]
850
                                                        <span class="itypetext">[% itemloo.itemtype.translated_description | html %]</span>
851
                                                    </td>
859
                                                    </td>
852
                                                [% END %]
860
                                                    [% IF Koha.Preference('EnableItemGroupHolds') && biblio.object.item_groups.count %]
853
                                                <td>
861
                                                        <td>
854
                                                    [% itemloo.barcode | html %]
862
                                                            [% itemloo.object.item_group.description | html %]
855
                                                </td>
863
                                                        </td>
856
                                                [% IF Koha.Preference('EnableItemGroupHolds') && biblio_info.object.item_groups.count %]
864
                                                    [% END %]
857
                                                    <td>
865
                                                    <td>
858
                                                        [% itemloo.object.item_group.description | html %]
866
                                                        [% Branches.GetName( itemloo.homebranch ) | html %]
859
                                                    </td>
867
                                                    </td>
860
                                                [% END %]
861
                                                <td>
862
                                                    [% Branches.GetName( itemloo.homebranch ) | html %]
863
                                                </td>
864
                                                <td>
865
                                                    [% Branches.GetName( itemloo.holdingbranch ) | html %]
866
                                                </td>
867
                                                [% IF itemdata_ccode %]
868
                                                    <td>
868
                                                    <td>
869
                                                        [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemloo.ccode ) | html %][% END %]
869
                                                        [% Branches.GetName( itemloo.holdingbranch ) | html %]
870
                                                    </td>
870
                                                    </td>
871
                                                [% END %]
871
                                                    [% IF itemdata_ccode %]
872
                                                <td>
872
                                                        <td>
873
                                                    [% itemloo.itemcallnumber | html %]
873
                                                            [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemloo.ccode ) | html %][% END %]
874
                                                </td>
874
                                                        </td>
875
                                                <td>
875
                                                    [% END %]
876
                                                    [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %]&nbsp;[% END %]
877
                                                </td>
878
                                                [% IF itemdata_enumchron %]
879
                                                    <td>
876
                                                    <td>
880
                                                        [% itemloo.enumchron | html %]
877
                                                        [% itemloo.itemcallnumber | html %]
881
                                                    </td>
878
                                                    </td>
882
                                                [% END %]
883
                                                [% IF ( itemloo.onloan ) %]
884
                                                    <td data-order="[% itemloo.date_due | html %]">
885
                                                        <span class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span>
886
                                                [% ELSE %]
887
                                                    <td>
879
                                                    <td>
888
                                                        [% IF ( itemloo.transfertwhen ) %]
880
                                                        [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %]&nbsp;[% END %]
889
                                                            <span>In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %],
881
                                                    </td>
890
                                                            to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | $KohaDates %]</span>
882
                                                    [% IF itemdata_enumchron %]
891
                                                        [% END %]
883
                                                        <td>
892
                                                [% END %]
884
                                                            [% itemloo.enumchron | html %]
885
                                                        </td>
886
                                                    [% END %]
887
                                                    [% IF ( itemloo.onloan ) %]
888
                                                        <td data-order="[% itemloo.date_due | html %]">
889
                                                            <span class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span>
890
                                                    [% ELSE %]
891
                                                        <td>
892
                                                            [% IF ( itemloo.transfertwhen ) %]
893
                                                                <span>In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %],
894
                                                                to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | $KohaDates %]</span>
895
                                                            [% END %]
896
                                                    [% END %]
893
897
894
                                                    [% IF ( itemloo.reservedate ) %]
898
                                                        [% IF ( itemloo.reservedate ) %]
895
                                                        [% IF ( itemloo.nocancel ) %]
899
                                                            [% IF ( itemloo.nocancel ) %]
896
                                                                <span>Can't be cancelled when item is in transit</span>
900
                                                                    <span>Can't be cancelled when item is in transit</span>
897
                                                        [% ELSE %]
898
                                                            [% IF ( itemloo.waitingdate ) %]
899
                                                                [% IF ( itemloo.canreservefromotherbranches ) %]
900
                                                                    <span>Waiting for [% INCLUDE 'patron-title.inc' patron=itemloo.ReservedFor %] at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since [% itemloo.waitingdate | $KohaDates %]</span>
901
                                                                [% ELSE %]
902
                                                                    <span>Waiting at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since [% itemloo.waitingdate | $KohaDates %]</span>
903
                                                                [% END %]
904
                                                            [% ELSE %]
901
                                                            [% ELSE %]
905
                                                                [% IF ( itemloo.canreservefromotherbranches ) %]
902
                                                                [% IF ( itemloo.waitingdate ) %]
906
                                                                    [% IF itemloo.reservedate %]
903
                                                                    [% IF ( itemloo.canreservefromotherbranches ) %]
907
                                                                        <span>On hold for [% INCLUDE 'patron-title.inc' patron=itemloo.ReservedFor %] expected at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since</span>
904
                                                                        <span>Waiting for [% INCLUDE 'patron-title.inc' patron=itemloo.ReservedFor %] at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since [% itemloo.waitingdate | $KohaDates %]</span>
908
                                                                    [% ELSE %]
905
                                                                    [% ELSE %]
909
                                                                        <span>On hold expected at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %]</span>
906
                                                                        <span>Waiting at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since [% itemloo.waitingdate | $KohaDates %]</span>
910
                                                                    [% END %]
907
                                                                    [% END %]
911
                                                                [% ELSIF itemloo.reservedate %]
912
                                                                    <span>On hold expected at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since [% itemloo.reservedate | $KohaDates %]</span>
913
                                                                [% ELSE %]
908
                                                                [% ELSE %]
914
                                                                    <span>On hold expected at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %]</span>
909
                                                                    [% IF ( itemloo.canreservefromotherbranches ) %]
910
                                                                        [% IF itemloo.reservedate %]
911
                                                                            <span>On hold for [% INCLUDE 'patron-title.inc' patron=itemloo.ReservedFor %] expected at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since</span>
912
                                                                        [% ELSE %]
913
                                                                            <span>On hold expected at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %]</span>
914
                                                                        [% END %]
915
                                                                    [% ELSIF itemloo.reservedate %]
916
                                                                        <span>On hold expected at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since [% itemloo.reservedate | $KohaDates %]</span>
917
                                                                    [% ELSE %]
918
                                                                        <span>On hold expected at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %]</span>
919
                                                                    [% END %]
915
                                                                [% END %]
920
                                                                [% END %]
916
                                                            [% END %]
921
                                                            [% END # /IF itemloo.nocancel %]
917
                                                        [% END # /IF itemloo.nocancel %]
922
                                                        [% ELSE %]
918
                                                    [% ELSE %]
923
                                                            Not on hold
919
                                                        Not on hold
924
                                                        [% END # /IF itemloo.reservedate %]
920
                                                    [% END # /IF itemloo.reservedate %]
921
925
922
                                                    [% IF itemloo.item_level_holds == "N" %]
926
                                                        [% IF itemloo.item_level_holds == "N" %]
923
                                                        <br/>Item level hold not allowed from OPAC
927
                                                            <br/>Item level hold not allowed from OPAC
924
                                                    [% ELSIF itemloo.item_level_holds == "F" %]
928
                                                        [% ELSIF itemloo.item_level_holds == "F" %]
925
                                                        <br/>Item level hold forced from OPAC
929
                                                            <br/>Item level hold forced from OPAC
926
                                                    [% END %]
930
                                                        [% END %]
927
931
928
                                                    [% IF ( itemloo.itemlost ) %]
932
                                                        [% IF ( itemloo.itemlost ) %]
929
                                                       <span class="lost">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => itemloo.itemlost ) | html %]</span>
933
                                                           <span class="lost">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => itemloo.itemlost ) | html %]</span>
930
                                                    [% END %]
934
                                                        [% END %]
931
935
932
                                                    [% IF ( itemloo.damaged ) %]
936
                                                        [% IF ( itemloo.damaged ) %]
933
                                                        <span class="dmg">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => itemloo.damaged ) | html %]</span>
937
                                                            <span class="dmg">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => itemloo.damaged ) | html %]</span>
934
                                                    [% END %]
938
                                                        [% END %]
935
939
936
                                                    [% IF ( itemloo.withdrawn ) %]
940
                                                        [% IF ( itemloo.withdrawn ) %]
937
                                                       <span class="wdn">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => itemloo.withdrawn ) | html %]</span>
941
                                                           <span class="wdn">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => itemloo.withdrawn ) | html %]</span>
938
                                                    [% END %]
942
                                                        [% END %]
939
943
940
                                                    [% IF ( itemloo.notforloan ) %]
944
                                                        [% IF ( itemloo.notforloan ) %]
941
                                                       <span class="nfl">Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemloo.notforloan ) | html %])</span>
945
                                                           <span class="nfl">Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemloo.notforloan ) | html %])</span>
942
                                                    [% ELSIF ( itemloo.notforloanitype ) %]
946
                                                        [% ELSIF ( itemloo.notforloanitype ) %]
943
                                                       <span class="nfl">Not for loan (Itemtype not for loan)</span>
947
                                                           <span class="nfl">Not for loan (Itemtype not for loan)</span>
944
                                                    [% END %]
948
                                                        [% END %]
945
                                                </td>
949
                                                    </td>
946
                                            </tr>
950
                                                </tr>
947
                                        [% END # / UNLESS itemloo.hide %]
951
                                            [% END # / UNLESS itemloo.hide %]
948
                                    [% END # /FOREACH itemloo %]
952
                                        [% END # /FOREACH itemloo %]
949
                                </tbody>
953
                                    </tbody>
950
                            </table> <!-- /#requestspecific -->
954
                                </table> <!-- /#requestspecific -->
951
955
952
                            [% IF hiddencount %]
956
                                [% IF hiddencount %]
953
                                <form method="get">
957
                                <form method="get">
954
                                    <p class="hiddencount">
958
                                    <p class="hiddencount">
955
                                        <a href="request.pl?biblionumber=[% biblio_info.biblionumber | uri %]&amp;borrowernumber=[% borrowernumber | uri %]&amp;showallitems=1">Show all items ([% hiddencount | html %] hidden)</a>
959
                                        <a href="request.pl?biblionumber=[% biblio.biblionumber | uri %]&amp;borrowernumber=[% borrowernumber | uri %]&amp;showallitems=1">Show all items ([% hiddencount | html %] hidden)</a>
956
                                    </p>
960
                                    </p>
957
                                </form>
961
                                </form>
958
                            [% END # /IF hiddencount %]
962
                                [% END # /IF hiddencount %]
963
                                <fieldset class="action">
964
                                    [% IF ( override_required ) %]
965
                                        <button type="submit" id="hold_item_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
966
                                    [% ELSIF ( none_available ) %]
967
                                        <button type="submit" id="hold_item_btn" class="btn btn-primary btn-disabled" disabled="disabled">Place hold</button>
968
                                    [% ELSE %]
969
                                        <button type="submit" id="hold_item_btn" class="btn btn-primary">Place hold</button>
970
                                    [% END %]
971
                                </fieldset> <!-- /.action -->
972
                            </fieldset>
973
                        </fieldset class="rows">
959
974
960
                        [% ELSE # /UNLESS multi_hold %]
975
                        [% ELSE # /UNLESS multi_hold %]
961
                            <fieldset class="rows">
976
                            <fieldset class="rows">
Lines 1064-1095 Link Here
1064
                                    [% END # /FOREACH biblioloo %]
1079
                                    [% END # /FOREACH biblioloo %]
1065
                                </table> <!-- /#requesttitles -->
1080
                                </table> <!-- /#requesttitles -->
1066
                            </fieldset>
1081
                            </fieldset>
1082
                            <fieldset class="action">
1083
                                [% IF ( patron AND patron.borrowernumber ) %]
1084
                                        [% IF ( override_required ) %]
1085
                                            <button type="submit" id="hold_multi_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place holds</button>
1086
                                        [% ELSIF ( no_bibs_available ) %]
1087
                                            <button type="submit" id="hold_multi_btn" class="btn btn-primary btn-disabled" disabled="disabled">Place holds</button>
1088
                                        [% ELSIF ( none_available ) %]
1089
                                            <button type="submit" id="hold_multi_btn" class="btn btn-primary">Place holds</button>
1090
                                        [% ELSE %]
1091
                                            <button type="submit" id="hold_multi_btn" class="btn btn-primary" id="multi_hold_submit">Place holds</button>
1092
                                        [% END %]
1093
                                [% END # /IF patron %]
1094
                            </fieldset> <!-- /.action -->
1067
1095
1068
                        [% END # /UNLESS multi_hold %]
1096
                        [% END # /UNLESS multi_hold %]
1069
1097
1070
                        <fieldset class="action">
1071
                            [% IF ( patron AND patron.borrowernumber ) %]
1072
                                [% IF ( multi_hold ) %]
1073
                                    [% IF ( override_required ) %]
1074
                                        <button type="submit" id="hold_multi_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place holds</button>
1075
                                    [% ELSIF ( no_bibs_available ) %]
1076
                                        <button type="submit" id="hold_multi_btn" class="btn btn-primary btn-disabled" disabled="disabled">Place holds</button>
1077
                                    [% ELSIF ( none_available ) %]
1078
                                        <button type="submit" id="hold_multi_btn" class="btn btn-primary">Place holds</button>
1079
                                    [% ELSE %]
1080
                                        <button type="submit" id="hold_multi_btn" class="btn btn-primary" id="multi_hold_submit">Place holds</button>
1081
                                    [% END %]
1082
                                [% ELSE %]
1083
                                    [% IF ( override_required ) %]
1084
                                        <button type="submit" id="hold_item_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
1085
                                    [% ELSIF ( none_available ) %]
1086
                                        <button type="submit" id="hold_item_btn" class="btn btn-primary btn-disabled" disabled="disabled">Place hold</button>
1087
                                    [% ELSE %]
1088
                                        <button type="submit" id="hold_item_btn" class="btn btn-primary">Place hold</button>
1089
                                    [% END %]
1090
                                [% END %]
1091
                            [% END # /IF patron %]
1092
                        </fieldset> <!-- /.action -->
1093
                    </fieldset> <!-- /.rows -->
1098
                    </fieldset> <!-- /.rows -->
1094
                </form> <!-- /#hold-request-form -->
1099
                </form> <!-- /#hold-request-form -->
1095
            [% END %]
1100
            [% END %]
Lines 1555-1576 Link Here
1555
1560
1556
        function ToggleHoldsToPlace() {
1561
        function ToggleHoldsToPlace() {
1557
            if ( $("#requestany").prop('checked') ) {
1562
            if ( $("#requestany").prop('checked') ) {
1558
                $("#holds_to_place_count, #pickup-next-avail, #itemtype, #hold_any_btn").prop('disabled', false);
1563
                $(".disable_request_any").prop('disabled',true);
1564
                $(".enable_request_any").prop('disabled',false);
1559
                $(".requestspecific,.requestgrp").prop('checked', false);
1565
                $(".requestspecific,.requestgrp").prop('checked', false);
1560
                $(".requestspecific","#requestspecific").prop('disabled',true);
1561
                $("#hold_item_btn, #hold_grp_btn, #pickup-item-group").prop("disabled", true );
1562
                $("#hold_any_btn").prop("disabled", false );
1563
            } else if( $(".requestspecific").prop('checked') ) {
1566
            } else if( $(".requestspecific").prop('checked') ) {
1564
                $(".requestspecific","#requestspecific").prop('disabled',false);
1567
                $(".disable_request_specific").prop('disabled',true);
1565
                $("#holds_to_place_count, #pickup-item-group, #pickup-next-avail #itemtype, #hold_any_btn").prop('disabled', true);
1568
                $(".enable_request_specific").prop('disabled',false);
1566
                $("#hold_item_btn").prop("disabled", false );
1567
                $("#hold_any_btn,#hold_grp_btn").prop("disabled", true );
1568
                $("#requestany,.requestgrp").prop('checked', false);
1569
                $("#requestany,.requestgrp").prop('checked', false);
1569
            } else {
1570
            } else {
1570
                $("#holds_to_place_count, #pickup-next-avail, #itemtype, #hold_any_btn").prop('disabled', true);
1571
                $(".disable_request_group").prop('disabled',true);
1571
                $("#hold_grp_btn, #pickup-item-group").prop("disabled", false );
1572
                $(".enable_request_group").prop('disabled',false);
1572
                $(".requestspecific","#requestspecific").prop('disabled',true);
1573
                $("#hold_any_btn,#hold_item_btn").prop("disabled", true );
1574
                $("#requestany,.requestspecific").prop('checked', false);
1573
                $("#requestany,.requestspecific").prop('checked', false);
1575
            }
1574
            }
1576
        }
1575
        }
1577
- 

Return to bug 30579