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

(-)a/Koha/REST/V1/Illrequests.pm (-1 / +9 lines)
Lines 52-58 sub list { Link Here
52
    }
52
    }
53
53
54
    # Get all requests
54
    # Get all requests
55
    my @requests = Koha::Illrequests->as_list;
55
    # If necessary, only get those from a specified patron
56
    my @requests;
57
    if ($args->{borrowernumber}) {
58
        @requests = Koha::Illrequests->search(
59
            { borrowernumber => $args->{borrowernumber} }
60
        );
61
    } else {
62
        @requests = Koha::Illrequests->as_list;
63
    }
56
64
57
    # Identify patrons & branches that
65
    # Identify patrons & branches that
58
    # we're going to need and get them
66
    # we're going to need and get them
(-)a/ill/ill-requests.pl (-3 / +2 lines)
Lines 236-248 if ( $backends_available ) { Link Here
236
        my $active_filters = [];
236
        my $active_filters = [];
237
        foreach my $filter(@{$possible_filters}) {
237
        foreach my $filter(@{$possible_filters}) {
238
            if ($params->{$filter}) {
238
            if ($params->{$filter}) {
239
                push @{$active_filters},
239
                push @{$active_filters}, "$filter=$params->{$filter}";
240
                    { name => $filter, value => $params->{$filter}};
241
            }
240
            }
242
        }
241
        }
243
        if (scalar @{$active_filters} > 0) {
242
        if (scalar @{$active_filters} > 0) {
244
            $template->param(
243
            $template->param(
245
                prefilters => $active_filters
244
                prefilters => join(",", @{$active_filters})
246
            );
245
            );
247
        }
246
        }
248
247
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-1 / +4 lines)
Lines 37-42 Link Here
37
            'patron'
37
            'patron'
38
        ];
38
        ];
39
39
40
        var prefilters = '[% prefilters %]';
41
40
        // Expanded fields
42
        // Expanded fields
41
        // This is auto populated
43
        // This is auto populated
42
        var expanded = {};
44
        var expanded = {};
Lines 246-253 Link Here
246
248
247
        // Get our data from the API and process it prior to passing
249
        // Get our data from the API and process it prior to passing
248
        // it to datatables
250
        // it to datatables
251
        var filterParam = prefilters ? '&' + prefilters : '';
249
        var ajax = $.ajax(
252
        var ajax = $.ajax(
250
            '/api/v1/illrequests?embed=metadata,patron,capabilities,library,comments'
253
            '/api/v1/illrequests?embed=metadata,patron,capabilities,library,comments'
254
            + filterParam
251
            ).done(function() {
255
            ).done(function() {
252
                var data = JSON.parse(ajax.responseText);
256
                var data = JSON.parse(ajax.responseText);
253
                // Make a copy, we'll be removing columns next and need
257
                // Make a copy, we'll be removing columns next and need
254
- 

Return to bug 21460