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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/hold-group.tt (-1 / +1 lines)
Lines 20-26 Link Here
20
                    [% biblio = hold.biblio %]
20
                    [% biblio = hold.biblio %]
21
                    <tr>
21
                    <tr>
22
                        <td>
22
                        <td>
23
                            <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio.biblionumber | uri %]"> [% biblio.title | html %] </a>
23
                            <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio.biblionumber | uri %]" data-hold-id="[% hold.reserve_id | uri %]" class="hold-group-entry"> [% biblio.title | html %] </a>
24
                            [% IF (hold.is_hold_group_target) %]
24
                            [% IF (hold.is_hold_group_target) %]
25
                                <br /><span class="fw-bold fst-italic">(target of hold group)</span>
25
                                <br /><span class="fw-bold fst-italic">(target of hold group)</span>
26
                            [% END %]
26
                            [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/hold-group.js (-1 / +32 lines)
Lines 3-8 $(document).ready(function () { Link Here
3
        var href = $(this).attr("href");
3
        var href = $(this).attr("href");
4
        $("#hold-group-modal .modal-body").load(href + " #main");
4
        $("#hold-group-modal .modal-body").load(href + " #main");
5
        $("#hold-group-modal").modal("show");
5
        $("#hold-group-modal").modal("show");
6
        if (holds_table_patron_page()) {
7
            append_select_group_holds_button();
8
        }
6
        return false;
9
        return false;
7
    });
10
    });
11
    $("body").on("click", "button#select-group-holds", function () {
12
        let group_hold_ids = $(".hold-group-entry")
13
            .map(function () {
14
                return $(this).data("hold-id");
15
            })
16
            .get();
17
18
        $(".select_hold").each(function () {
19
            var $this = $(this);
20
            if (
21
                group_hold_ids.includes($this.data("id")) !==
22
                $this.prop("checked")
23
            ) {
24
                $this.click();
25
            }
26
        });
27
    });
28
29
    function append_select_group_holds_button() {
30
        var button = document.createElement("button");
31
        button.type = "button";
32
        button.className = "btn btn-primary";
33
        button.id = "select-group-holds";
34
        button.dataset.bsDismiss = "modal";
35
        button.innerHTML = _("Select group holds");
36
        if (!$("#select-group-holds").length) {
37
            $("#hold-group-modal .modal-footer").prepend(button);
38
        }
39
    }
8
});
40
});
9
- 

Return to bug 40552