comparison reproctool.cgi @ 41:e9429d4a7942

Making alt and title text consistent
author Dominic Cleal <dominic@computerkb.co.uk>
date Sun, 25 Jan 2009 21:31:30 +0000
parents 20870c5d9b45
children 783d0f954927
comparison
equal deleted inserted replaced
40:20870c5d9b45 41:e9429d4a7942
319 { 319 {
320 print "</tr><tr>\n"; 320 print "</tr><tr>\n";
321 $col = 0; 321 $col = 0;
322 } 322 }
323 323
324 my ($img, $text, $link, $colour); 324 my ($img, $alt, $text, $link, $colour);
325 325
326 $alt = $item->{name};
326 if (defined $item->{id}) 327 if (defined $item->{id})
327 { 328 {
328 if ($igb) 329 if ($igb)
329 { 330 {
330 $img = "typeicon:$item->{id}"; 331 $img = "typeicon:$item->{id}";
352 } 353 }
353 else 354 else
354 { 355 {
355 $text = pretty_numbers($item->{reprocessIsk}); 356 $text = pretty_numbers($item->{reprocessIsk});
356 } 357 }
358
359 $alt .= " ($item->{reprocessDetails})";
357 } 360 }
358 else 361 else
359 { 362 {
360 $text = 'Unknown item'; 363 $text = 'Unknown item';
361 $img = "typeicon:07_15"; 364 $img = "typeicon:07_15";
362 } 365 }
363 366
364 print "<td width='64' class='reg'>"; 367 print "<td width='64' class='reg'>";
365 print "<a href='$link'>" if defined $link; 368 print "<a href='$link'>" if defined $link;
366 print "<img src='$img' width='64' height='64' border='1' "; 369 print "<img src='$img' width='64' height='64' border='1' ";
367 print "title=\"$item->{name}\" alt=\"$item->{name} ($item->{reprocessDetails})\" />"; 370 print "title=\"$alt\" alt=\"$alt\" />";
368 print "</a>" if defined $link; 371 print "</a>" if defined $link;
369 print "<br />"; 372 print "<br />";
370 print "<font color='$colour'>" if defined $colour; 373 print "<font color='$colour'>" if defined $colour;
371 print $text; 374 print $text;
372 print "</font>" if defined $colour; 375 print "</font>" if defined $colour;