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

(-)a/Koha/Illrequest.pm (-3 / +23 lines)
Lines 495-500 sub _core_status_graph { Link Here
495
            ui_method_name => 'Check out',
495
            ui_method_name => 'Check out',
496
            needs_prefs    => [ 'CirculateILL' ],
496
            needs_prefs    => [ 'CirculateILL' ],
497
            needs_perms    => [ 'user_circulate_circulate_remaining_permissions' ],
497
            needs_perms    => [ 'user_circulate_circulate_remaining_permissions' ],
498
            # An array of functions that all must return true
499
            needs_all      => [ sub { my $r = shift;  return $r->biblio; } ],
498
            method         => 'check_out',
500
            method         => 'check_out',
499
            next_actions   => [ ],
501
            next_actions   => [ ],
500
            ui_method_icon => 'fa-upload',
502
            ui_method_icon => 'fa-upload',
Lines 1049-1054 sub requires_moderation { Link Here
1049
    return $require_moderation->{$self->status};
1051
    return $require_moderation->{$self->status};
1050
}
1052
}
1051
1053
1054
=head3 biblio
1055
1056
    my $biblio = $request->biblio;
1057
1058
For a given request, return the biblio associated with it,
1059
or undef if none exists
1060
1061
=cut
1062
1063
sub biblio {
1064
    my ( $self ) = @_;
1065
1066
    return if !$self->biblio_id;
1067
1068
    return Koha::Biblios->find({
1069
        biblionumber => $self->biblio_id
1070
    });
1071
}
1072
1052
=head3 check_out
1073
=head3 check_out
1053
1074
1054
    my $stage_summary = $request->check_out;
1075
    my $stage_summary = $request->check_out;
Lines 1072-1080 sub check_out { Link Here
1072
        {},
1093
        {},
1073
        { order_by => ['branchcode'] }
1094
        { order_by => ['branchcode'] }
1074
    );
1095
    );
1075
    my $biblio = Koha::Biblios->find({
1096
    my $biblio = $self->biblio;
1076
        biblionumber => $self->biblio_id
1097
1077
    });
1078
    # Find all statistical patrons
1098
    # Find all statistical patrons
1079
    my $statistical_patrons = Koha::Patrons->search(
1099
    my $statistical_patrons = Koha::Patrons->search(
1080
        { 'category_type' => 'x' },
1100
        { 'category_type' => 'x' },
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-2 / +8 lines)
Lines 441-448 Link Here
441
                        [% FOREACH action IN request.available_actions %]
441
                        [% FOREACH action IN request.available_actions %]
442
                            [% needs_prefs = action.needs_prefs.size ? action.needs_prefs : [] %]
442
                            [% needs_prefs = action.needs_prefs.size ? action.needs_prefs : [] %]
443
                            [% needs_perms = action.needs_perms.size ? action.needs_perms : [] %]
443
                            [% needs_perms = action.needs_perms.size ? action.needs_perms : [] %]
444
                            [% needs_all = action.needs_all.size ? action.needs_all : [] %]
444
                            [% has_prefs_count = 0 %]
445
                            [% has_prefs_count = 0 %]
445
                            [% has_perms_count = 0 %]
446
                            [% has_perms_count = 0 %]
447
                            [% has_all_count = 0 %]
446
                            [% FOREACH pref IN needs_prefs %]
448
                            [% FOREACH pref IN needs_prefs %]
447
                                [% IF Koha.Preference(pref) %]
449
                                [% IF Koha.Preference(pref) %]
448
                                    [% has_prefs_count = has_prefs_count + 1 %]
450
                                    [% has_prefs_count = has_prefs_count + 1 %]
Lines 454-460 Link Here
454
                                    [% has_perms_count = has_perms_count + 1 %]
456
                                    [% has_perms_count = has_perms_count + 1 %]
455
                                [% END %]
457
                                [% END %]
456
                            [% END %]
458
                            [% END %]
457
                            [% NEXT IF has_prefs_count < needs_prefs.size || has_perms_count < needs_perms.size %]
459
                            [% FOREACH func IN needs_all %]
460
                                [% IF func(request) %]
461
                                    [% has_all_count = has_all_count + 1 %]
462
                                [% END %]
463
                            [% END %]
464
                            [% NEXT IF has_prefs_count < needs_prefs.size || has_perms_count < needs_perms.size || has_all_count < needs_all.size %]
458
                            [% IF action.method == 'migrate' %]
465
                            [% IF action.method == 'migrate' %]
459
                                [% IF backends.size > 2 %]
466
                                [% IF backends.size > 2 %]
460
                                    <div class="dropdown btn-group">
467
                                    <div class="dropdown btn-group">
461
- 

Return to bug 23112