From b379656d553e56b9f2782dc25a1ef657467f44eb Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 19 Oct 2017 11:06:55 -0700 Subject: [PATCH] Adds more consistent visual display of status label types --- resources/views/statuslabels/index.blade.php | 30 ++++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/resources/views/statuslabels/index.blade.php b/resources/views/statuslabels/index.blade.php index e5d568eba..2a057bae8 100755 --- a/resources/views/statuslabels/index.blade.php +++ b/resources/views/statuslabels/index.blade.php @@ -31,7 +31,7 @@ {{ trans('general.id') }} {{ trans('admin/statuslabels/table.name') }} - {{ trans('admin/statuslabels/table.status_type') }} + {{ trans('admin/statuslabels/table.status_type') }} {{ trans('general.assets') }} {{ trans('admin/statuslabels/table.color') }} {{ trans('admin/statuslabels/table.show_in_nav') }} @@ -92,12 +92,30 @@ } } - function undeployableFormatter(value, row) { - if ((value) && (value!='deployable')) { - return '' + value + ' '; - } else { - return '' + value + ' '; + 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 ' ' + typename; + + } @stop