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

(-)a/ill/ill-requests.pl (-2 / +9 lines)
Lines 167-174 if ( $backends_available ) { Link Here
167
                value   => {}
167
                value   => {}
168
            };
168
            };
169
            $template->param(
169
            $template->param(
170
                whole   => $backend_result,
170
                whole          => $backend_result,
171
                request => $request
171
                request        => $request,
172
                status_aliases => scalar Koha::AuthorisedValues->search(
173
                    { category => 'ILLSTATUS' }
174
                )
172
            );
175
            );
173
        } else {
176
        } else {
174
            # Commit:
177
            # Commit:
Lines 179-184 if ( $backends_available ) { Link Here
179
            $request->price_paid($params->{price_paid});
182
            $request->price_paid($params->{price_paid});
180
            $request->notesopac($params->{notesopac});
183
            $request->notesopac($params->{notesopac});
181
            $request->notesstaff($params->{notesstaff});
184
            $request->notesstaff($params->{notesstaff});
185
            my $alias = ($params->{status_alias} =~ /\d/) ?
186
                $params->{status_alias} :
187
                undef;
188
            $request->status_alias($alias);
182
            $request->store;
189
            $request->store;
183
            my $backend_result = {
190
            my $backend_result = {
184
                error   => 0,
191
                error   => 0,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-10 / +35 lines)
Lines 192-198 Link Here
192
                                <li class="status">
192
                                <li class="status">
193
                                    <label class="status">Status:</label>
193
                                    <label class="status">Status:</label>
194
                                    [% stat = request.status %]
194
                                    [% stat = request.status %]
195
                                    [% request.capabilities.$stat.name | html %]
195
                                    [% current_alias = request.status_alias %]
196
                                    <select id="status_alias" name="status_alias">
197
                                        [% IF !current_alias %]
198
                                        <option value="" selected>
199
                                        [% ELSE %]
200
                                        <option value="">
201
                                        [% END %]
202
                                            [% request.capabilities.$stat.name | html %]
203
                                        </option>
204
                                        [% FOREACH alias IN status_aliases %]
205
                                            [% IF alias.id == current_alias %]
206
                                            <option value="[% alias.id %]" selected>
207
                                            [% ELSE %]
208
                                            <option value="[% alias.id %]">
209
                                            [% END %]
210
                                                [% alias.authorised_value | html %]
211
                                            </option>
212
                                        [% END %]
213
                                    </select>
196
                                </li>
214
                                </li>
197
                                <li class="updated">
215
                                <li class="updated">
198
                                    <label class="updated">Last updated:</label>
216
                                    <label class="updated">Last updated:</label>
Lines 326-332 Link Here
326
                                    </li>
344
                                    </li>
327
                                    <li class="status">
345
                                    <li class="status">
328
                                        <span class="label status">Status:</span>
346
                                        <span class="label status">Status:</span>
329
                                        [% request.capabilities.$req_status.name | html %]
347
                                        [% IF request.statusalias %]
348
                                            [% request.statusalias.authorised_value | html %]
349
                                        [% ELSE %]
350
                                            [% request.capabilities.$req_status.name | html%]
351
                                        [% END %]
330
                                    </li>
352
                                    </li>
331
                                    <li class="updated">
353
                                    <li class="updated">
332
                                        <span class="label updated">Last updated:</span>
354
                                        <span class="label updated">Last updated:</span>
Lines 716-729 Link Here
716
738
717
            // Render function for request status
739
            // Render function for request status
718
            var createStatus = function(data, type, row, meta) {
740
            var createStatus = function(data, type, row, meta) {
719
                var origData = meta.settings.oInit.originalData;
741
                if (row.status_alias) {
720
                if (origData.length > 0) {
742
                    return row.status_alias.authorised_value;
721
                    var status_name = meta.settings.oInit.originalData[0].capabilities[
722
                        row.status
723
                    ].name;
724
                    return getStatusName(status_name);
725
                } else {
743
                } else {
726
                    return '';
744
                    var origData = meta.settings.oInit.originalData;
745
                    if (origData.length > 0) {
746
                        var status_name = meta.settings.oInit.originalData[0].capabilities[
747
                            row.status
748
                        ].name;
749
                        return getStatusName(status_name);
750
                    } else {
751
                        return '';
752
                    }
727
                }
753
                }
728
            };
754
            };
729
755
730
- 

Return to bug 20581