mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Merge pull request #13448 from Godmartinz/status-label-translations_fix
Fixed #13446 - added translations to status label type column
This commit is contained in:
commit
aa333bcf0b
|
@ -111,25 +111,34 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function statusLabelTypeFormatter (row, value) {
|
function statusLabelTypeFormatter (row, value) {
|
||||||
|
|
||||||
switch (value.type) {
|
switch (value.type) {
|
||||||
case 'deployed':
|
|
||||||
text_color = 'blue';
|
|
||||||
icon_style = 'fa-circle';
|
|
||||||
break;
|
|
||||||
case 'deployable':
|
case 'deployable':
|
||||||
text_color = 'green';
|
text_color = 'green';
|
||||||
icon_style = 'fa-circle';
|
icon_style = 'fa-circle';
|
||||||
|
trans = '{{ strtolower(trans('admin/hardware/general.deployable')) }}';
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'pending':
|
case 'pending':
|
||||||
text_color = 'orange';
|
text_color = 'orange';
|
||||||
icon_style = 'fa-circle';
|
icon_style = 'fa-circle';
|
||||||
|
trans = '{{ strtolower(trans('general.pending')) }}';
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'undeployable':
|
||||||
|
text_color = 'red';
|
||||||
|
icon_style = 'fa-circle';
|
||||||
|
trans ='{{ trans('admin/statuslabels/table.undeployable') }}';
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
text_color = 'red';
|
text_color = 'red';
|
||||||
icon_style = 'fa-times';
|
icon_style = 'fa-times';
|
||||||
|
trans = '{{ strtolower(trans('general.archived')) }}';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var typename_lower = value.type;
|
var typename_lower = trans;
|
||||||
var typename = typename_lower.charAt(0).toUpperCase() + typename_lower.slice(1);
|
var typename = typename_lower.charAt(0).toUpperCase() + typename_lower.slice(1);
|
||||||
return '<i class="fa ' + icon_style + ' text-' + text_color + '"></i> ' + typename;
|
return '<i class="fa ' + icon_style + ' text-' + text_color + '"></i> ' + typename;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue