chiark / gitweb /
Trading plan commodity names are links to commod prices
[ypp-sc-tools.web-live.git] / yarrg / web / routetrade
index 9cd57122d66b8fd421fd040dc00ee45abbf66422..1b7c8c945bb312b0c7073eb5de1e8361910cd148 100644 (file)
@@ -40,6 +40,7 @@ $dbh
 $qa
 $routeparams
 $reset_suppressions
+$quri
 </%args>
 <& query_age:pageload &>
 
@@ -735,6 +736,7 @@ Generated by YARRG at <strong><%
                        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 %>><a href="<% $quri->(%linkqf) %>"><% $t->{'commodname'} |h %></a>
 <<% $td %>><% $t->{'posinclass'} %>
 %
 %              my @stalls= sort keys %{ $t->{Stalls} };