comparison reproctool.cgi @ 5:42268fc087a9

Improving IGB integration with links and images
author Dominic Cleal <dominic@computerkb.co.uk>
date Sat, 24 Jan 2009 17:53:47 +0000
parents 4351c0bf33d4
children c80353ce6afc
comparison
equal deleted inserted replaced
4:4351c0bf33d4 5:42268fc087a9
99 <html> 99 <html>
100 <head> 100 <head>
101 <style type="text/css"> 101 <style type="text/css">
102 .meta4, .meta5, .meta6, .meta7, .meta8, .meta9 102 .meta4, .meta5, .meta6, .meta7, .meta8, .meta9
103 { 103 {
104 border: 2px #FF0000 solid; 104 color: #FF0000;
105 } 105 }
106 .item 106 .item
107 { 107 {
108 text-align: center; 108 text-align: center;
109 } 109 }
120 { 120 {
121 print "</tr><tr>\n"; 121 print "</tr><tr>\n";
122 $col = 0; 122 $col = 0;
123 } 123 }
124 124
125 my ($style, $img, $text); 125 my ($style, $img, $text, $link, $colour);
126 126
127 if (defined $item->{id}) 127 if (defined $item->{id})
128 { 128 {
129 $style = "meta$item->{meta}"; 129 $style = "meta$item->{meta}";
130 $img = "icons/icons_items_png/64_64/icon$item->{icon}.png"; 130 $img = "typeicon:$item->{id}";
131 $link = "showinfo:$item->{id}";
131 if ($item->{meta} == 4) 132 if ($item->{meta} == 4)
132 { 133 {
133 $text = $item->{name}; 134 $text = $item->{name};
135 $colour = "#FF0000";
134 } 136 }
135 else 137 else
136 { 138 {
137 $text = $item->{reprocess}; 139 $text = $item->{reprocess};
138 } 140 }
139 } 141 }
140 else 142 else
141 { 143 {
142 $text = 'Unknown item'; 144 $text = 'Unknown item';
143 $img = "icons/icons_items_png/64_64/icon07_15.png"; 145 $img = "typeicon:07_15";
144 } 146 }
145 147
146 print "<td width='64' class='item $style'>"; 148 print "<td width='64' class='item'>";
147 print "<img src='$img_http_path/$img' width='64' height='64' border='1' alt='$item->{name}' /><br />$text"; 149 print "<a href='$link'>" if defined $link;
150 print "<img src='$img' width='64' height='64' border='1' alt='$item->{name}' />";
151 print "</a>" if defined $link;
152 print "<br />";
153 print "<font color='$colour'>" if defined $colour;
154 print $text;
155 print "</font>" if defined $colour;
148 print "</td>\n"; 156 print "</td>\n";
149 157
150 $col++; 158 $col++;
151 } 159 }
152 160