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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-6 / +6 lines)
Lines 449-455 Link Here
449
            </div>
449
            </div>
450
        [% END %]
450
        [% END %]
451
451
452
        [% IF ( no_reserves_allowed || exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted || recall ) %]
452
        [% IF ( no_reserves_allowed || exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || none_available_override || alreadypossession || ageRestricted || recall ) %]
453
            <div class="alert alert-warning">
453
            <div class="alert alert-warning">
454
                [% UNLESS ( multi_hold ) %]
454
                [% UNLESS ( multi_hold ) %]
455
                    <h3>Cannot place hold</h3>
455
                    <h3>Cannot place hold</h3>
Lines 472-478 Link Here
472
                            <li>[% INCLUDE 'patron-title.inc' patron => patron no_title => 1 no_cardnumber => 1 hide_patron_infos_if_needed => 1 %] <strong>already has a hold</strong> on this item.</li>
472
                            <li>[% INCLUDE 'patron-title.inc' patron => patron no_title => 1 no_cardnumber => 1 hide_patron_infos_if_needed => 1 %] <strong>already has a hold</strong> on this item.</li>
473
                        [% ELSIF ( ageRestricted ) %]
473
                        [% ELSIF ( ageRestricted ) %]
474
                            <li><strong>Age restricted</strong></li>
474
                            <li><strong>Age restricted</strong></li>
475
                        [% ELSIF ( none_available ) %]
475
                        [% ELSIF ( none_available || none_available_override ) %]
476
                            <li> <strong>No items are available</strong> to be placed on hold.</li>
476
                            <li> <strong>No items are available</strong> to be placed on hold.</li>
477
                        [% ELSIF ( maxreserves ) %]
477
                        [% ELSIF ( maxreserves ) %]
478
                            <li
478
                            <li
Lines 672-678 Link Here
672
                        <fieldset class="action">
672
                        <fieldset class="action">
673
                            [% IF ( patron.borrowernumber ) %]
673
                            [% IF ( patron.borrowernumber ) %]
674
                                [% IF ( override_required ) %]
674
                                [% IF ( override_required ) %]
675
                                    <button type="submit" id="hold_grp_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
675
                                    <button type="submit" id="hold_grp_btn" class="btn btn-primary"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
676
                                [% ELSIF ( none_available ) %]
676
                                [% ELSIF ( none_available ) %]
677
                                    <button type="submit" id="hold_grp_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button>
677
                                    <button type="submit" id="hold_grp_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button>
678
                                [% ELSE %]
678
                                [% ELSE %]
Lines 767-773 Link Here
767
                            <fieldset class="action">
767
                            <fieldset class="action">
768
                                [% IF ( patron.borrowernumber ) %]
768
                                [% IF ( patron.borrowernumber ) %]
769
                                    [% IF ( override_required ) %]
769
                                    [% IF ( override_required ) %]
770
                                        <button type="submit" id="hold_any_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
770
                                        <button type="submit" id="hold_any_btn" class="btn btn-primary"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
771
                                    [% ELSIF ( none_available ) %]
771
                                    [% ELSIF ( none_available ) %]
772
                                        <button type="submit" id="hold_any_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button>
772
                                        <button type="submit" id="hold_any_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button>
773
                                    [% ELSE %]
773
                                    [% ELSE %]
Lines 1017-1023 Link Here
1017
                        <fieldset class="action">
1017
                        <fieldset class="action">
1018
                            [% IF ( patron.borrowernumber ) %]
1018
                            [% IF ( patron.borrowernumber ) %]
1019
                                [% IF ( override_required ) %]
1019
                                [% IF ( override_required ) %]
1020
                                    <button type="submit" id="hold_item_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
1020
                                    <button type="submit" id="hold_item_btn" class="btn btn-primary"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
1021
                                [% ELSIF ( none_available ) %]
1021
                                [% ELSIF ( none_available ) %]
1022
                                    <button type="submit" id="hold_item_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button>
1022
                                    <button type="submit" id="hold_item_btn" disabled="disabled" class="btn btn-primary btn-disabled">Place hold</button>
1023
                                [% ELSE %]
1023
                                [% ELSE %]
Lines 1167-1173 Link Here
1167
                <fieldset class="action">
1167
                <fieldset class="action">
1168
                    [% IF ( patron AND patron.borrowernumber ) %]
1168
                    [% IF ( patron AND patron.borrowernumber ) %]
1169
                        [% IF ( override_required ) %]
1169
                        [% IF ( override_required ) %]
1170
                            <button type="submit" id="hold_multi_btn" class="btn btn-primary warning"><i class="fa fa-exclamation-triangle "></i> Place holds</button>
1170
                            <button type="submit" id="hold_multi_btn" class="btn btn-primary "><i class="fa fa-exclamation-triangle "></i> Place holds</button>
1171
                        [% ELSIF ( no_bibs_available ) %]
1171
                        [% ELSIF ( no_bibs_available ) %]
1172
                            <button type="submit" id="hold_multi_btn" class="btn btn-primary btn-disabled" disabled="disabled">Place holds</button>
1172
                            <button type="submit" id="hold_multi_btn" class="btn btn-primary btn-disabled" disabled="disabled">Place holds</button>
1173
                        [% ELSIF ( none_available ) %]
1173
                        [% ELSIF ( none_available ) %]
(-)a/reserve/request.pl (-1 / +10 lines)
Lines 391-396 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
391
            my $num_override        = 0;
391
            my $num_override        = 0;
392
            my $hiddencount         = 0;
392
            my $hiddencount         = 0;
393
            my $num_alreadyheld     = 0;
393
            my $num_alreadyheld     = 0;
394
            my $valid_items         = 0;
394
395
395
            # iterating through all items first to check if any of them available
396
            # iterating through all items first to check if any of them available
396
            # to pass this value further inside down to IsAvailableForItemLevelRequest to
397
            # to pass this value further inside down to IsAvailableForItemLevelRequest to
Lines 515-520 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
515
                        && IsAvailableForItemLevelRequest( $item_object, $patron, undef )
516
                        && IsAvailableForItemLevelRequest( $item_object, $patron, undef )
516
                        )
517
                        )
517
                    {
518
                    {
519
                        $valid_items = 1;
520
                    }
521
522
                    if ($valid_items) {
523
518
                        # Send the pickup locations count to the UI, the pickup locations will be pulled using the API
524
                        # Send the pickup locations count to the UI, the pickup locations will be pulled using the API
519
                        my $pickup_locations = $item_object->pickup_locations( { patron => $patron } );
525
                        my $pickup_locations = $item_object->pickup_locations( { patron => $patron } );
520
                        $item->{pickup_locations_count} = $pickup_locations->count;
526
                        $item->{pickup_locations_count} = $pickup_locations->count;
Lines 546-551 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
546
                            if ( @pickup_locations || C4::Context->preference('AllowHoldPolicyOverride') ) {
552
                            if ( @pickup_locations || C4::Context->preference('AllowHoldPolicyOverride') ) {
547
                                $num_items_available++;
553
                                $num_items_available++;
548
                                $item->{override} = 1;
554
                                $item->{override} = 1;
555
                                $num_override++;
549
556
550
                                my $default_pickup_location;
557
                                my $default_pickup_location;
551
558
Lines 590-595 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
590
            {
597
            {
591
                # That is, if all items require an override
598
                # That is, if all items require an override
592
                $template->param( override_required => 1 );
599
                $template->param( override_required => 1 );
600
                if ( $valid_items == 0 ) {
601
                    $template->param( none_available_override => 1 );
602
                }
593
            } elsif ( $num_items_available == 0 ) {
603
            } elsif ( $num_items_available == 0 ) {
594
                $template->param( none_available => 1 );
604
                $template->param( none_available => 1 );
595
                $biblioloopiter{warn}       = 1;
605
                $biblioloopiter{warn}       = 1;
596
- 

Return to bug 38412