diff options
author | Renato Botelho <renato@netgate.com> | 2017-03-02 16:36:19 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-03-02 16:36:19 -0300 |
commit | 166c38b288f9ac17f1be128dd26f600aaa4c438f (patch) | |
tree | 4b43ed99a138c71acf36a2861660b4f1b12e256f /src/etc/inc | |
parent | 0b222fea77947756bbbc1f6ca1e20b6af8968f15 (diff) | |
parent | 446505a9f9be7f43e4515658f1a5444bc3732a3f (diff) | |
download | pfsense-166c38b288f9ac17f1be128dd26f600aaa4c438f.zip pfsense-166c38b288f9ac17f1be128dd26f600aaa4c438f.tar.gz |
Merge pull request #3597 from NOYB/Services_-_Status_Icon_-_Sort_Order
Diffstat (limited to 'src/etc/inc')
-rw-r--r-- | src/etc/inc/service-utils.inc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/etc/inc/service-utils.inc b/src/etc/inc/service-utils.inc index 071129d..a4d2559 100644 --- a/src/etc/inc/service-utils.inc +++ b/src/etc/inc/service-utils.inc @@ -478,17 +478,20 @@ function get_service_status_icon($service, $withtext = true, $smallicon = false, } $fa_size = ($smallicon) ? "fa-1x" : "fa-lg"; - $spacer = ($withthumbs || $withtext) ? " " : ""; if ($title == "state") { - $output = "<i class=\"{$text_class} {$fa_class} {$fa_size}\" title=\"{$statustext}\"></i>{$spacer}"; + $title = $statustext; } elseif ($title == "service_state") { - $output = "<i class=\"{$text_class} {$fa_class} {$fa_size}\" title=\"" . sprintf(gettext('%1$s Service is %2$s'), $service["name"], $statustext) . "\"></i>{$spacer}"; + $title = sprintf(gettext('%1$s Service is %2$s'), $service["name"], $statustext); } elseif ($title == "description_state") { - $output = "<i class=\"{$text_class} {$fa_class} {$fa_size}\" title=\"" . sprintf(gettext('%1$s Service is %2$s'), $service["description"], $statustext) . "\"></i>{$spacer}"; + $title = sprintf(gettext('%1$s Service is %2$s'), $service["description"], $statustext); } elseif ($title == "description_service_state") { - $output = "<i class=\"{$text_class} {$fa_class} {$fa_size}\" title=\"" . sprintf(gettext('%1$s, %2$s Service is %3$s'), $service["description"], $service["name"], $statustext) . "\"></i>{$spacer}"; + $title = sprintf(gettext('%1$s, %2$s Service is %3$s'), $service["description"], $service["name"], $statustext); } + $spacer = ($withthumbs || $withtext) ? " " : ""; + + $output = "<i class=\"{$text_class} {$fa_class} {$fa_size}\" title=\"{$title}\"><span style=\"display: none\">{$statustext}</span></i>{$spacer}"; + $spacer = ($withtext) ? " " : ""; if ($withthumbs) { $output .= "<i class=\"{$text_class} {$fa_class_thumbs} {$fa_size}\" title=\"{$Thumbs_UpDown}\"></i>{$spacer}"; |