X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.main.git;a=blobdiff_plain;f=yarrg%2Fweb%2Froutetrade;h=08bad334569ea32178ec8e6e7d3345bf4d8060e5;hp=41340201bfc8f4d7ab99d2e87a65046d6178b784;hb=e48954272cc534a0e90a95ecfa68feb36bcd542b;hpb=4ee718187692e362a0e274020a0ad61701f1b2de diff --git a/yarrg/web/routetrade b/yarrg/web/routetrade index 4134020..08bad33 100644 --- a/yarrg/web/routetrade +++ b/yarrg/web/routetrade @@ -638,14 +638,18 @@ Generated by YARRG at <% % % foreach my $i (0..$#islandids) { <% $tbody->(1) %> - + % $iquery->execute($islandids[$i]); % my ($islandname) = $iquery->fetchrow_array(); % if (!$i) { + Start at <% $islandname |h %> +[?] + % } else { % my $this_dist= $distance->($islandids[$i-1],$islandids[$i]); % $total_dist += $this_dist; + <%perl> my $total_value= 0; foreach my $sf (@subflows) { @@ -699,19 +703,12 @@ END 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", + " commodity %d of %d", $f->{'commodname'}, $classinfo->{'commodclass'}, - $inpic, $maxpic, - $tmbs[$tmbi], $tmbds[$tmbi]); + $inpic, $maxpic); $$todo->{'posinclass'}= "
$tmbs[$tmbi]
"; }