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

(-)a/Koha/Ticket.pm (+10 lines)
Lines 196-201 sub strings_map { Link Here
196
            }
196
            }
197
        );
197
        );
198
198
199
        # Fall back to TICKET_RESOLUTION as needed
200
        if ( !$av->count ) {
201
            $av = Koha::AuthorisedValues->search(
202
                {
203
                    category         => 'TICKET_RESOLUTION',
204
                    authorised_value => $self->status,
205
                }
206
            );
207
        }
208
199
        my $status_str =
209
        my $status_str =
200
              $av->count
210
              $av->count
201
            ? $params->{public}
211
            ? $params->{public}
(-)a/Koha/Ticket/Update.pm (+10 lines)
Lines 85-90 sub strings_map { Link Here
85
            }
85
            }
86
        );
86
        );
87
87
88
        # Fall back to TICKET_RESOLUTION as needed
89
        if ( !$av->count ) {
90
            $av = Koha::AuthorisedValues->search(
91
                {
92
                    category         => 'TICKET_RESOLUTION',
93
                    authorised_value => $self->status,
94
                }
95
            );
96
        }
97
88
        my $status_str =
98
        my $status_str =
89
              $av->count
99
              $av->count
90
            ? $params->{public}
100
            ? $params->{public}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/display_ticket.inc (-1 / +17 lines)
Lines 1-5 Link Here
1
[% USE AuthorisedValues %]
1
[% USE AuthorisedValues %]
2
[% SET status = AuthorisedValues.GetAuthValueDropbox('TICKET_STATUS') %]
2
[% SET status = AuthorisedValues.GetAuthValueDropbox('TICKET_STATUS') %]
3
[% SET resolutions = AuthorisedValues.GetAuthValueDropbox('TICKET_RESOLUTION') %]
3
<!-- Display updates concern modal -->
4
<!-- Display updates concern modal -->
4
<div class="modal" id="ticketDetailsModal" tabindex="-1" role="dialog" aria-labelledby="ticketDetailsLabel">
5
<div class="modal" id="ticketDetailsModal" tabindex="-1" role="dialog" aria-labelledby="ticketDetailsLabel">
5
    <div class="modal-dialog modal-lg" role="document">
6
    <div class="modal-dialog modal-lg" role="document">
Lines 25-31 Link Here
25
            </div> <!-- /.modal-body -->
26
            </div> <!-- /.modal-body -->
26
            <div class="modal-footer">
27
            <div class="modal-footer">
27
                <input type="hidden" name="ticket_id" id="ticket_id">
28
                <input type="hidden" name="ticket_id" id="ticket_id">
28
                <button type="button" class="btn btn-default" id="resolveTicket">Resolve <i id="resolve-spinner" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i></button>
29
                [% IF resolutions.count %]
30
                <div class="btn-group">
31
                  <button type="button" class="btn btn-danger dropdown-toggle" id="resolveTicket" data-toggle="dropdown" aria-expanded="false">
32
                    Resolve <span class="caret"></span> <i id="resolve-spinner" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i>
33
                  </button>
34
                  <ul class="dropdown-menu">
35
                    [% FOR resolution IN resolutions %]
36
                    <li>
37
                      <a class="dropdown-item resolveSubmit" type="button" data-resolution="[% resolution.authorised_value | html %]">[% resolution.lib | html_entity %]</a>
38
                    </li>
39
                    [% END %]
40
                  </ul>
41
                </div>
42
                [% ELSE %]
43
                <button type="button" class="btn btn-danger resolveSubmit" id="resolveTicket">Resolve <i id="resolve-spinner" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i></button>
44
                [% END %]
29
                [% IF status.count %]
45
                [% IF status.count %]
30
                <div class="btn-group">
46
                <div class="btn-group">
31
                  <button type="button" class="btn btn-primary" id="updateTicket">Update <i id="comment-spinner" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i></button>
47
                  <button type="button" class="btn btn-primary" id="updateTicket">Update <i id="comment-spinner" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i></button>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt (-1 / +5 lines)
Lines 166-175 Link Here
166
                        "render": function(data, type, row, meta) {
166
                        "render": function(data, type, row, meta) {
167
                            let result = '';
167
                            let result = '';
168
                            if (row.resolved_date) {
168
                            if (row.resolved_date) {
169
                                result += _("Resolved by:") + ' <span>' + $patron_to_html(row.resolver, {
169
                                result += _("Resolved by") + ' <span>' + $patron_to_html(row.resolver, {
170
                                    display_cardnumber: false,
170
                                    display_cardnumber: false,
171
                                    url: true
171
                                    url: true
172
                                }) + '</span>';
172
                                }) + '</span>';
173
                                if (row.status) {
174
                                    result += ' ' + _("as") + ' ';
175
                                    result += row._strings.status ? escape_str(row._strings.status.str) : "";
176
                                }
173
                                result += '<span class="clearfix">' + $datetime(row.resolved_date) + '</span>';
177
                                result += '<span class="clearfix">' + $datetime(row.resolved_date) + '</span>';
174
                            } else {
178
                            } else {
175
                                if (row.status) {
179
                                if (row.status) {
(-)a/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js (-2 / +3 lines)
Lines 130-142 $(document).ready(function () { Link Here
130
            });
130
            });
131
    });
131
    });
132
132
133
    $("#ticketDetailsModal").on("click", "#resolveTicket", function (e) {
133
    $("#ticketDetailsModal").on("click", ".resolveSubmit", function (e) {
134
        let clicked = $(this);
134
        let ticket_id = $("#ticket_id").val();
135
        let ticket_id = $("#ticket_id").val();
135
        let params = {
136
        let params = {
136
            public: $("#public").is(":checked"),
137
            public: $("#public").is(":checked"),
137
            message: $("#update_message").val(),
138
            message: $("#update_message").val(),
138
            user_id: logged_in_user_borrowernumber,
139
            user_id: logged_in_user_borrowernumber,
139
            state: "resolved",
140
            state: "resolved",
141
            status: clicked.data("resolution"),
140
        };
142
        };
141
143
142
        $("#resolve-spinner").show();
144
        $("#resolve-spinner").show();
143
- 

Return to bug 32435