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

(-)a/.gitignore (+2 lines)
Lines 19-24 koha-tmpl/intranet-tmpl/prog/css/calendar.css Link Here
19
koha-tmpl/intranet-tmpl/prog/css/calendar-rtl.css
19
koha-tmpl/intranet-tmpl/prog/css/calendar-rtl.css
20
koha-tmpl/intranet-tmpl/prog/css/holds.css
20
koha-tmpl/intranet-tmpl/prog/css/holds.css
21
koha-tmpl/intranet-tmpl/prog/css/holds-rtl.css
21
koha-tmpl/intranet-tmpl/prog/css/holds-rtl.css
22
koha-tmpl/intranet-tmpl/prog/css/ill-requests.css
23
koha-tmpl/intranet-tmpl/prog/css/ill-requests-rtl.css
22
koha-tmpl/intranet-tmpl/prog/css/installer.css
24
koha-tmpl/intranet-tmpl/prog/css/installer.css
23
koha-tmpl/intranet-tmpl/prog/css/installer-rtl.css
25
koha-tmpl/intranet-tmpl/prog/css/installer-rtl.css
24
koha-tmpl/intranet-tmpl/prog/css/mainpage.css
26
koha-tmpl/intranet-tmpl/prog/css/mainpage.css
(-)a/ill/ill-requests.pl (-4 / +5 lines)
Lines 503-512 if ($backends_available) { Link Here
503
}
503
}
504
504
505
$template->param(
505
$template->param(
506
    backends => $backends,
506
    backends    => $backends,
507
    types    => [ "Book", "Article", "Journal" ],
507
    types       => [ "Book", "Article", "Journal" ],
508
    op       => $op,
508
    op          => $op,
509
    branches => Koha::Libraries->search,
509
    branches    => Koha::Libraries->search,
510
    illreq_tabs => C4::Context->yaml_preference('ILLRequestsTabs'),
510
);
511
);
511
512
512
output_html_with_http_headers( $cgi, $cookie, $template->output );
513
output_html_with_http_headers( $cgi, $cookie, $template->output );
(-)a/koha-tmpl/intranet-tmpl/prog/css/src/ill-requests.scss (+16 lines)
Line 0 Link Here
1
form#illfilter_form div.ms-parent button.ms-choice span.placeholder {
2
    background-color: transparent;
3
    cursor: default;
4
}
5
6
form#illfilter_form div.ms-parent button.ms-choice {
7
    height: calc(1.5em + .75rem + 2px);
8
}
9
10
form#illfilter_form div.ms-parent div.ms-drop input[type="checkbox"] {
11
    margin-left: -1.25rem
12
}
13
14
form#illfilter_form div.ms-parent div.ms-drop ul > li {
15
    padding: .25rem 8px;
16
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/ill-filter.inc (-1 / +1 lines)
Lines 19-25 Link Here
19
            </li>
19
            </li>
20
            <li>
20
            <li>
21
                <label for="illfilter_status">Status:</label>
21
                <label for="illfilter_status">Status:</label>
22
                <select name="illfilter_status" id="illfilter_status"> </select>
22
                <select name="illfilter_status" id="illfilter_status" multiple="multiple"> </select>
23
            </li>
23
            </li>
24
            <li>
24
            <li>
25
                <label for="illfilter_dateplaced_start">Date placed between:</label>
25
                <label for="illfilter_dateplaced_start">Date placed between:</label>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table-strings.inc (-1 lines)
Lines 3-9 Link Here
3
    var ill_borrower_details = _("View patron details");
3
    var ill_borrower_details = _("View patron details");
4
    var ill_manage = _("Manage request");
4
    var ill_manage = _("Manage request");
5
    var ill_manage_select_backend_first = _("Select a backend first");
5
    var ill_manage_select_backend_first = _("Select a backend first");
6
    var ill_all_statuses = _("All statuses");
7
    var ill_all_status_aliases = _("All status aliases");
6
    var ill_all_status_aliases = _("All status aliases");
8
    var ill_no_status_alias = _("No status alias");
7
    var ill_no_status_alias = _("No status alias");
9
    var ill_status_aliases = _("Status aliases");
8
    var ill_status_aliases = _("Status aliases");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (+15 lines)
Lines 16-21 Link Here
16
    [% END %]</title
16
    [% END %]</title
17
>
17
>
18
[% INCLUDE 'doc-head-close.inc' %]
18
[% INCLUDE 'doc-head-close.inc' %]
19
[% Asset.css("css/ill-requests.css") | $raw %]
20
[% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.min.css") | $raw %]
19
</head>
21
</head>
20
22
21
<body id="illrequests" class="ill">
23
<body id="illrequests" class="ill">
Lines 835-840 Link Here
835
                    [% END %]
837
                    [% END %]
836
                </h1>
838
                </h1>
837
                <div id="results" class="page-section">
839
                <div id="results" class="page-section">
840
                    [% WRAPPER tabs id= "ill-list-tabs" %]
841
                        [% WRAPPER tabs_nav %]
842
                            [% WRAPPER tab_item tabname= "ill-list-tab-all" bt_active= 1 %]
843
                                <span>All</span>
844
                            [% END %]
845
                            [% FOREACH illreq_tab IN illreq_tabs %]
846
                                [% WRAPPER tab_item tabname= "ill-list-tab-${loop.index}" %]
847
                                    <span data-statuses="[% illreq_tab.status.join('|') | html %]">[% illreq_tab.name | html %]</span>
848
                                [% END %]
849
                            [% END %]
850
                        [% END # /WRAPPER tabs_nav %]
851
                    [% END %]
838
                    <h2>Details for all requests</h2>
852
                    <h2>Details for all requests</h2>
839
                    [% INCLUDE 'ill-list-table.inc' %]
853
                    [% INCLUDE 'ill-list-table.inc' %]
840
                </div>
854
                </div>
Lines 1132-1137 Link Here
1132
    [% IF op == 'generic_confirm' && Koha.Preference('ILLCheckAvailability') %]
1146
    [% IF op == 'generic_confirm' && Koha.Preference('ILLCheckAvailability') %]
1133
        [% Asset.js("js/ill-availability-partner.js") | $raw %]
1147
        [% Asset.js("js/ill-availability-partner.js") | $raw %]
1134
    [% END %]
1148
    [% END %]
1149
    [% Asset.js("lib/jquery/plugins/multiple-select/multiple-select.min.js") | $raw %]
1135
[% END %]
1150
[% END %]
1136
<!-- prettier-ignore-start -->
1151
<!-- prettier-ignore-start -->
1137
[% TRY %]
1152
[% TRY %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js (-5 / +28 lines)
Lines 17-22 $(document).ready(function () { Link Here
17
        $("#addcomment").toggleClass("content_hidden");
17
        $("#addcomment").toggleClass("content_hidden");
18
    });
18
    });
19
19
20
    $("div#ill-list-tabs a[id^='ill-list-tab'").on("click", function (e) {
21
        e.preventDefault();
22
        var select_status_el = $("form#illfilter_form select#illfilter_status");
23
        var tab_statuses = $(this).children('span').attr("data-statuses");
24
        if (tab_statuses) {
25
            tab_statuses.split('|').forEach((select_status_option) => {
26
                if ($("#illfilter_status option[value='"+select_status_option+"']").length === 0) {
27
                    select_status_el.append($('<option>', {
28
                        value: select_status_option,
29
                        text: select_status_option // how to access status.str when no ILL requests with that status exist?
30
                    }));
31
                }
32
            })
33
            select_status_el.val(tab_statuses.split('|')).trigger("change");
34
        } else {
35
            select_status_el.val("").trigger("change");
36
        }
37
        filter();
38
    });
39
20
    // Filter partner list
40
    // Filter partner list
21
    // Record the list of all options
41
    // Record the list of all options
22
    var ill_partner_options = $("#partners > option");
42
    var ill_partner_options = $("#partners > option");
Lines 116-122 $(document).ready(function () { Link Here
116
                subquery_and.push(patronquery);
136
                subquery_and.push(patronquery);
117
            }
137
            }
118
138
119
            if (status) {
139
            if (status && status.length > 0) {
120
                subquery_and.push({ "me.status": { "=": status } });
140
                subquery_and.push({ "me.status": { "=": status } });
121
            }
141
            }
122
            if (status_alias) {
142
            if (status_alias) {
Lines 544-552 $(document).ready(function () { Link Here
544
564
545
    function addStatusOptions(statuses) {
565
    function addStatusOptions(statuses) {
546
        $("#illfilter_status").children().remove();
566
        $("#illfilter_status").children().remove();
547
        $("#illfilter_status").append(
548
            '<option value="">' + ill_all_statuses + "</option>"
549
        );
550
        statuses
567
        statuses
551
            .sort((a, b) => a.str.localeCompare(b.str))
568
            .sort((a, b) => a.str.localeCompare(b.str))
552
            .forEach(function (status) {
569
            .forEach(function (status) {
Lines 558-563 $(document).ready(function () { Link Here
558
                        "</option>"
575
                        "</option>"
559
                );
576
                );
560
            });
577
            });
578
        $("select#illfilter_status").multipleSelect( {
579
            placeholder: _("Please select ..."),
580
            selectAllText: _("Select all"),
581
            allSelected: _("All selected"),
582
            countSelected: _("# of % selected"),
583
            noMatchesFound: _("No matches found"),
584
        } );
561
    }
585
    }
562
586
563
    function addStatusAliasOptions(status_aliases) {
587
    function addStatusAliasOptions(status_aliases) {
564
- 

Return to bug 30200