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

(-)a/ill/ill-requests.pl (-2 / +9 lines)
Lines 162-169 if ( $backends_available ) { Link Here
162
                value   => {}
162
                value   => {}
163
            };
163
            };
164
            $template->param(
164
            $template->param(
165
                whole   => $backend_result,
165
                whole          => $backend_result,
166
                request => $request
166
                request        => $request,
167
                status_aliases => scalar Koha::AuthorisedValues->search(
168
                    { category => 'ILLSTATUS' }
169
                )
167
            );
170
            );
168
        } else {
171
        } else {
169
            # Commit:
172
            # Commit:
Lines 174-179 if ( $backends_available ) { Link Here
174
            $request->price_paid($params->{price_paid});
177
            $request->price_paid($params->{price_paid});
175
            $request->notesopac($params->{notesopac});
178
            $request->notesopac($params->{notesopac});
176
            $request->notesstaff($params->{notesstaff});
179
            $request->notesstaff($params->{notesstaff});
180
            my $alias = ($params->{status_alias} =~ /\d/) ?
181
                $params->{status_alias} :
182
                undef;
183
            $request->status_alias($alias);
177
            $request->store;
184
            $request->store;
178
            my $backend_result = {
185
            my $backend_result = {
179
                error   => 0,
186
                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 335-341 Link Here
335
                                    </li>
353
                                    </li>
336
                                    <li class="status">
354
                                    <li class="status">
337
                                        <span class="label status">Status:</span>
355
                                        <span class="label status">Status:</span>
338
                                        [% request.capabilities.$req_status.name | html %]
356
                                        [% IF request.statusalias %]
357
                                            [% request.statusalias.authorised_value | html %]
358
                                        [% ELSE %]
359
                                            [% request.capabilities.$req_status.name | html%]
360
                                        [% END %]
339
                                    </li>
361
                                    </li>
340
                                    <li class="updated">
362
                                    <li class="updated">
341
                                        <span class="label updated">Last updated:</span>
363
                                        <span class="label updated">Last updated:</span>
Lines 725-738 Link Here
725
747
726
            // Render function for request status
748
            // Render function for request status
727
            var createStatus = function(data, type, row, meta) {
749
            var createStatus = function(data, type, row, meta) {
728
                var origData = meta.settings.oInit.originalData;
750
                if (row.status_alias) {
729
                if (origData.length > 0) {
751
                    return row.status_alias.authorised_value;
730
                    var status_name = meta.settings.oInit.originalData[0].capabilities[
731
                        row.status
732
                    ].name;
733
                    return getStatusName(status_name);
734
                } else {
752
                } else {
735
                    return '';
753
                    var origData = meta.settings.oInit.originalData;
754
                    if (origData.length > 0) {
755
                        var status_name = meta.settings.oInit.originalData[0].capabilities[
756
                            row.status
757
                        ].name;
758
                        return getStatusName(status_name);
759
                    } else {
760
                        return '';
761
                    }
736
                }
762
                }
737
            };
763
            };
738
764
739
- 

Return to bug 20581