From 452812a6729674dcf2d35454aab8c2e2034288d8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 22 Nov 2009 13:42:59 +0000 Subject: [PATCH] Trading plan commodity names are links to commod prices --- yarrg/web/query_route | 2 +- yarrg/web/query_routesearch | 2 +- yarrg/web/routetrade | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/yarrg/web/query_route b/yarrg/web/query_route index 3c769a9..cd40e6c 100644 --- a/yarrg/web/query_route +++ b/yarrg/web/query_route @@ -128,7 +128,7 @@ foreach my $warningf (@warningfs) { dbh => $dbh, islandids => \@islandids, archipelagoes => \@archipelagoes, - qa => $qa, + qa => $qa, quri => $quri, routeparams => $routeparams, reset_suppressions => !!$allargs->{'apply_minprofit'} &> diff --git a/yarrg/web/query_routesearch b/yarrg/web/query_routesearch index f8a697a..d56f77d 100644 --- a/yarrg/web/query_routesearch +++ b/yarrg/web/query_routesearch @@ -126,7 +126,7 @@ print STDERR "ONRESULTS @_\n"; % my $ours= sub { $_[0] =~ m/^lossperleague|^islandstring|^capitalstring|^capacitystring|^minprofitstring|^distance/; }; <& "lookup:formhidden", ours => $ours &> -% } +s% } diff --git a/yarrg/web/routetrade b/yarrg/web/routetrade index 9cd5712..1b7c8c9 100644 --- a/yarrg/web/routetrade +++ b/yarrg/web/routetrade @@ -40,6 +40,7 @@ $dbh $qa $routeparams $reset_suppressions +$quri <& query_age:pageload &> @@ -735,6 +736,7 @@ Generated by YARRG at <% orgArbitrage => 0, dstArbitrage => 0, } unless $$todo; + $$todo->{'commodid'}= $f->{'commodid'}; $$todo->{'commodname'}= $f->{'commodname'}; $$todo->{'posinclass'}= ''; my $incl= $f->{'posinclass'}; @@ -822,9 +824,13 @@ END % $total += $t->{Total}; % my $span= 0 + keys %{ $t->{Stalls} }; % my $td= "td rowspan=$span"; +% my %linkqf= (%{ $qa->{'baseqf'} }, %{ $qa->{'queryqf'} }); +% $linkqf{'query'}= 'commod'; +% $linkqf{'commodstring'}= $t->{'commodname'}; +% $linkqf{'commodid'}= $t->{'commodid'}; % tr_datarow($m,$dline); <<% $td %>><% $collectdeliver %> -<<% $td %>><% $t->{'commodname'} |h %> +<<% $td %>><% $t->{'commodname'} |h %> <<% $td %>><% $t->{'posinclass'} %> % % my @stalls= sort keys %{ $t->{Stalls} }; -- 2.30.2