END
$findclass->execute($f->{'commodclassid'});
my $classinfo= $findclass->fetchrow_hashref();
- $$todo->{'posinclass'}=
- sprintf "(%s %d/%d)",
- $classinfo->{'commodclass'},
- $f->{'posinclass'},
- $classinfo->{'maxposinclass'}
- if $classinfo->{'maxposinclass'} > 9;
+ if ($classinfo->{'maxposinclass'} >= 8) {
+ my $maxpic= $classinfo->{'maxposinclass'};
+ my $inpic= $f->{'posinclass'};
+ my @tmbs= qw(TT T M B BB);
+ my @tmbds= ( 'in Top fifth of list',
+ 'in 2nd fifth of the list',
+ 'in Middle fifth of the list',
+ 'in 2nd-bottom fifth of list',
+ 'in Bottom fifth of the list');
+ my $tmbi= ($inpic+0.5)*$#tmbs/$maxpic;
+ my $desc= (sprintf "%s is under %s,".
+ " commodity %d of %d;".
+ " i.e. %s or %s",
+ $f->{'commodname'},
+ $classinfo->{'commodclass'},
+ $inpic, $maxpic,
+ $tmbs[$tmbi], $tmbds[$tmbi]);
+ $$todo->{'posinclass'}=
+ "<div class=mouseover title=\"$desc\">$tmbs[$tmbi]</div>";
+ }
}
$$todo->{'stallname'}= $stallname;
$$todo->{Price}= $price;
% tr_datarow($m,$dline);
<<% $td %>><% $collectdeliver %>
<<% $td %>><% $t->{'commodname'} |h %>
-<<% $td %>><% $t->{'posinclass'} |h %>
+<<% $td %>><% $t->{'posinclass'} %>
%
% my @stalls= sort keys %{ $t->{Stalls} };
% my $pstall= sub {