Skip to content

A free open source IT asset/license management system

Adds more consistent visual display of status label types

snipeb379656d553e
diff --git a/resources/views/statuslabels/index.blade.php b/resources/views/statuslabels/index.blade.php
index e5d568eba0..2a057bae8b 100755
--- a/resources/views/statuslabels/index.blade.php
+++ b/resources/views/statuslabels/index.blade.php
@@ -31,7 +31,7 @@
<tr>
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
<th data-sortable="true" data-field="name" data-formatter="statuslabelsAssetLinkFormatter">{{ trans('admin/statuslabels/table.name') }}</th>
- <th data-sortable="false" data-field="type" data-formatter="undeployableFormatter">{{ trans('admin/statuslabels/table.status_type') }}</th>
+ <th data-sortable="false" data-field="type" data-formatter="statusLabelTypeFormatter">{{ trans('admin/statuslabels/table.status_type') }}</th>
<th data-sortable="true" data-field="assets_count">{{ trans('general.assets') }}</th>
<th data-sortable="false" data-field="color" data-formatter="colorSqFormatter">{{ trans('admin/statuslabels/table.color') }}</th>
<th class="text-center" data-sortable="true" data-field="show_in_nav" data-formatter="trueFalseFormatter">{{ trans('admin/statuslabels/table.show_in_nav') }}</th>
@@ -92,12 +92,30 @@
}
}
- function undeployableFormatter(value, row) {
- if ((value) && (value!='deployable')) {
- return '<span class="text-danger">' + value + '</span> ';
- } else {
- return '<span class="text-success">' + value + '</span> ';
+ function statusLabelTypeFormatter (row, value) {
+ switch (value.type) {
+ case 'deployed':
+ text_color = 'blue';
+ icon_style = 'fa-circle';
+ break;
+ case 'deployable':
+ text_color = 'green';
+ icon_style = 'fa-circle';
+ break;
+ case 'pending':
+ text_color = 'orange';
+ icon_style = 'fa-circle';
+ break;
+ default:
+ text_color = 'red';
+ icon_style = 'fa-times';
}
+
+ var typename_lower = value.type;
+ var typename = typename_lower.charAt(0).toUpperCase() + typename_lower.slice(1);
+ return '<i class="fa ' + icon_style + ' text-' + text_color + '"></i> ' + typename;
+
+
}
</script>
@stop