Lines 127-159
Link Here
|
127 |
|
127 |
|
128 |
// Render function for request status |
128 |
// Render function for request status |
129 |
var createStatus = function(data, type, row, meta) { |
129 |
var createStatus = function(data, type, row, meta) { |
130 |
var origData = meta.settings.oInit.originalData; |
130 |
if (row.status_alias) { |
131 |
if (origData.length > 0) { |
131 |
return row.status_alias.authorised_value; |
132 |
var status_name = meta.settings.oInit.originalData[0].capabilities[ |
|
|
133 |
row.status |
134 |
].name; |
135 |
switch( status_name ) { |
136 |
case "New request": |
137 |
return _("New request"); |
138 |
case "Requested": |
139 |
return _("Requested"); |
140 |
case "Requested from partners": |
141 |
return _("Requested from partners"); |
142 |
case "Request reverted": |
143 |
return _("Request reverted"); |
144 |
case "Queued request": |
145 |
return _("Queued request"); |
146 |
case "Cancellation requested": |
147 |
return _("Cancellation requested"); |
148 |
case "Completed": |
149 |
return _("Completed"); |
150 |
case "Delete request": |
151 |
return _("Delete request"); |
152 |
default: |
153 |
return status_name; |
154 |
} |
155 |
} else { |
132 |
} else { |
156 |
return ''; |
133 |
var origData = meta.settings.oInit.originalData; |
|
|
134 |
if (origData.length > 0) { |
135 |
var status_name = meta.settings.oInit.originalData[0] |
136 |
.capabilities[row.status].name; |
137 |
switch( status_name ) { |
138 |
case "New request": |
139 |
return _("New request"); |
140 |
case "Requested": |
141 |
return _("Requested"); |
142 |
case "Requested from partners": |
143 |
return _("Requested from partners"); |
144 |
case "Request reverted": |
145 |
return _("Request reverted"); |
146 |
case "Queued request": |
147 |
return _("Queued request"); |
148 |
case "Cancellation requested": |
149 |
return _("Cancellation requested"); |
150 |
case "Completed": |
151 |
return _("Completed"); |
152 |
case "Delete request": |
153 |
return _("Delete request"); |
154 |
default: |
155 |
return status_name; |
156 |
} |
157 |
} else { |
158 |
return ''; |
159 |
} |
157 |
} |
160 |
} |
158 |
}; |
161 |
}; |
159 |
|
162 |
|
Lines 428-434
Link Here
|
428 |
<li class="status"> |
431 |
<li class="status"> |
429 |
<label class="status">Status:</label> |
432 |
<label class="status">Status:</label> |
430 |
[% stat = request.status %] |
433 |
[% stat = request.status %] |
431 |
[% request.capabilities.$stat.name %] |
434 |
[% current_alias = request.status_alias %] |
|
|
435 |
<select id="status_alias" name="status_alias"> |
436 |
[% IF !current_alias %] |
437 |
<option value="" selected> |
438 |
[% ELSE %] |
439 |
<option value=""> |
440 |
[% END %] |
441 |
[% request.capabilities.$stat.name | html %] |
442 |
</option> |
443 |
[% FOREACH alias IN status_aliases %] |
444 |
[% IF alias.id == current_alias %] |
445 |
<option value="[% alias.id %]" selected> |
446 |
[% ELSE %] |
447 |
<option value="[% alias.id %]"> |
448 |
[% END %] |
449 |
[% alias.authorised_value | html %] |
450 |
</option> |
451 |
[% END %] |
452 |
</select> |
432 |
</li> |
453 |
</li> |
433 |
<li class="updated"> |
454 |
<li class="updated"> |
434 |
<label class="updated">Last updated:</label> |
455 |
<label class="updated">Last updated:</label> |
Lines 530-536
Link Here
|
530 |
</div> |
551 |
</div> |
531 |
<div class="status"> |
552 |
<div class="status"> |
532 |
<span class="label status">Status:</span> |
553 |
<span class="label status">Status:</span> |
533 |
[% capabilities.$req_status.name %] |
554 |
[% IF request.statusalias %] |
|
|
555 |
[% request.statusalias.authorised_value %] |
556 |
[% ELSE %] |
557 |
[% capabilities.$req_status.name %] |
558 |
[% END %] |
534 |
</div> |
559 |
</div> |
535 |
<div class="updated"> |
560 |
<div class="updated"> |
536 |
<span class="label updated">Last updated:</span> |
561 |
<span class="label updated">Last updated:</span> |
537 |
- |
|
|