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