Mercurial > hg > reproctool-df
changeset 26:be92d2f1ab3f
Merging -df
author | Dominic Cleal <dominic@computerkb.co.uk> |
---|---|
date | Sun, 25 Jan 2009 17:31:03 +0000 |
parents | ccbd8fa63b9f (current diff) b505b076c493 (diff) |
children | 789877ff0e1a |
files | reproctool.cgi |
diffstat | 1 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/reproctool.cgi Sun Jan 25 17:29:07 2009 +0000 +++ b/reproctool.cgi Sun Jan 25 17:31:03 2009 +0000 @@ -3,6 +3,7 @@ use warnings; use strict; +use Switch; use CGI; use DBI; use LWP::UserAgent; @@ -216,11 +217,7 @@ <html> <head> <style type="text/css"> - .meta4, .meta5, .meta6, .meta7, .meta8, .meta9 - { - color: #FF0000; - } - .item + .reg { text-align: center; } @@ -241,11 +238,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}"; @@ -256,10 +252,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 = "#4444FF"; } + case 5 { $colour = "#FF0000"; } + case [6..30]{ $colour = "#00FF00"; } + } + + if ($item->{meta} >= 4) { $text = $item->{name}; - $colour = "#FF0000"; } else { @@ -272,7 +278,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})\" />";