Mercurial > hg > reproctool
changeset 24:66a63068fb23
Cleaned up the styles and added colour s on meta level .... the happy colour show.
author | df |
---|---|
date | Sun, 25 Jan 2009 17:21:00 +0000 |
parents | 5ae40a1161e6 |
children | b505b076c493 |
files | reproctool.cgi |
diffstat | 1 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/reproctool.cgi Sun Jan 25 16:15:15 2009 +0000 +++ b/reproctool.cgi Sun Jan 25 17:21:00 2009 +0000 @@ -3,6 +3,7 @@ use warnings; use strict; +use Switch; use CGI; use DBI; use LWP::UserAgent; @@ -178,11 +179,7 @@ <html> <head> <style type="text/css"> - .meta4, .meta5, .meta6, .meta7, .meta8, .meta9 - { - color: #FF0000; - } - .item + .reg { text-align: center; } @@ -203,11 +200,10 @@ $col = 0; } - my ($style, $img, $text, $link, $colour); + my ($img, $text, $link, $colour); if (defined $item->{id}) { - $style = "meta$item->{meta}"; if ($igb) { $img = "typeicon:$item->{id}"; @@ -218,10 +214,20 @@ $img = "$img_http_path/icons/icons_items_png/64_64/icon$item->{icon}.png"; } - if ($item->{meta} == 4) + switch ($item->{meta}) + { + case 0 { $colour = "#666600"; } + case 1 { $colour = "#777777"; } + case 2 { $colour = "#BBBBBB"; } + case 3 { $colour = "#FFFFFF"; } + case 4 { $colour = "#00FF00"; } + case 5 { $colour = "#FF0000"; } + case [6..30]{ $colour = "#0000BB"; } + } + + if ($item->{meta} >= 4) { $text = $item->{name}; - $colour = "#FF0000"; } else { @@ -234,7 +240,7 @@ $img = "typeicon:07_15"; } - print "<td width='64' class='item'>"; + print "<td width='64' class='reg'>"; print "<a href='$link'>" if defined $link; print "<img src='$img' width='64' height='64' border='1' "; print "title=\"$item->{name}\" alt=\"$item->{name} ($item->{reprocessDetails})\" />";