aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/html.inc.php
diff options
context:
space:
mode:
authorEdmondo Tommasina2010-05-19 14:59:45 +0200
committerPim van den Berg2010-05-29 09:43:12 +0200
commit055871bb1ac4378212acd797f96dc1a62c0631ef (patch)
tree6e1b77cd146423ebcc998e4706cb27c04ed88867 /inc/html.inc.php
parenta source (type instance or data source) may contain dots (diff)
downloadapt-panopticon_cgp-055871bb1ac4378212acd797f96dc1a62c0631ef.zip
apt-panopticon_cgp-055871bb1ac4378212acd797f96dc1a62c0631ef.tar.gz
apt-panopticon_cgp-055871bb1ac4378212acd797f96dc1a62c0631ef.tar.bz2
apt-panopticon_cgp-055871bb1ac4378212acd797f96dc1a62c0631ef.tar.xz
Define alternating odd/even css classes for rows in main summary
To select different background colors for the rows in the main summary page, just uncomment the tr.odd/tr.even background definition in layout/style.css and set the color.
Diffstat (limited to '')
-rw-r--r--inc/html.inc.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/html.inc.php b/inc/html.inc.php
index a05aab6..ada8d99 100644
--- a/inc/html.inc.php
+++ b/inc/html.inc.php
@@ -66,8 +66,14 @@ function host_summary($hosts) {
66 66
67 echo "<table class=\"summary\">\n"; 67 echo "<table class=\"summary\">\n";
68 68
69 $row_style = array(0 => "even", 1 => "odd");
70 $host_counter = 0;
71
69 foreach($hosts as $host) { 72 foreach($hosts as $host) {
70 printf('<tr><th><a href="%s/host.php?h=%s">%s</a></th>', 73 $host_counter++;
74
75 printf('<tr class="%s">', $row_style[$host_counter % 2]);
76 printf('<th><a href="%s/host.php?h=%s">%s</a></th>',
71 $CONFIG['weburl'],$host, $host); 77 $CONFIG['weburl'],$host, $host);
72 78
73 if ($CONFIG['showload']) { 79 if ($CONFIG['showload']) {