diff options
author | Colin Fleming <cj_fleming@sky.com> | 2013-11-14 13:44:59 +0000 |
---|---|---|
committer | Colin Fleming <cj_fleming@sky.com> | 2013-11-14 13:44:59 +0000 |
commit | 17b8c60a398c225db03cedbb936aa62b97cb4ee3 (patch) | |
tree | 4d9e4d1da58f4bcef218621252d8bcd6d5528312 /etc | |
parent | eef01b14df77186f9c1205e9e5cb83f80407d7fd (diff) | |
download | pfsense-17b8c60a398c225db03cedbb936aa62b97cb4ee3.zip pfsense-17b8c60a398c225db03cedbb936aa62b97cb4ee3.tar.gz |
Tidy up the "Helper Icons"
The "Helper Icons" at the top right of some service pages at present
produces 30+ HTML errors/warnings, this is due to the table cell being
wrapped in a span statement then in a div statement, table cells can
only be part of a table row then within a table statement.
- remove the table cell definitions from /etc/inc/service-utils.inc
- add the table cell definition from /etc/inc/service-utils.inc to
/usr/local/www/status_services.php and add some logic to determine if
the service is running which will then determine which class statement
to use and pad the icon with a space
- apply the same table cell definition and logic as above to
/usr/local/www/widgets/widgets/services_status.widget.php
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/service-utils.inc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index 4547a53..509a764 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -442,23 +442,19 @@ function get_service_status_icon($service, $withtext = true, $smallicon = false) $output = ""; if(get_service_status($service)) { $statustext = gettext("Running"); - $output .= '<td class="listr" align="center">' . "\n"; $output .= "<img style=\"vertical-align:middle\" title=\"" . sprintf(gettext("%s Service is"),$service["name"]) . " {$statustext}\" src=\"/themes/" . $g["theme"] . "/images/icons/"; $output .= ($smallicon) ? "icon_pass.gif" : "icon_service_running.gif"; - $output .= "\" alt=\"status\" />"; + $output .= "\" alt=\"status\" /> "; if ($withtext) - $output .= " " . $statustext; - $output .= "</td>\n"; + $output .= " " . $statustext; } else { $service_enabled = is_service_enabled($service['name']); $statustext = ($service_enabled) ? gettext("Stopped") : gettext("Disabled"); - $output .= '<td class="listbg" align="center">' . "\n"; $output .= "<img style=\"vertical-align:middle\" title=\"" . sprintf(gettext("%s Service is"),$service["name"]) . " {$statustext}\" src=\"/themes/" . $g["theme"] . "/images/icons/"; $output .= ($smallicon) ? "icon_block.gif" : "icon_service_stopped.gif"; - $output .= "\" alt=\"status\" />"; + $output .= "\" alt=\"status\" /> "; if ($withtext) - $output .= " " . "<font color=\"white\">{$statustext}</font>"; - $output .= "</td>\n"; + $output .= " <font color=\"white\">{$statustext}</font>"; } return $output; } |