X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_route;h=cd40e6cb8928a38ab3bb44fba4bc293cd44a5744;hp=7871c3d54dbb6eed20e97fcfcfb99fb86a127610;hb=ea3cffe854b1c540bc68cd2218fdb2be732197fa;hpb=5df1a21a8f7ad18ade3a97b9ccf26bdcf335edd2 diff --git a/yarrg/web/query_route b/yarrg/web/query_route index 7871c3d..cd40e6c 100644 --- a/yarrg/web/query_route +++ b/yarrg/web/query_route @@ -41,8 +41,10 @@ $routestring => ''; $capacitystring => ''; $lossperleague => ''; $capitalstring => ''; +$minprofitstring => ''; $someresults $emsgokorprint +$allargs <%perl> @@ -64,8 +66,6 @@ my $goupdate= sub { $be_post ? 'Update' : 'Go' }; -

Specify route

- % # Sadly we need to do this rather hacky thing to make it be a POST % # form if the user has already selected some thing(s) % if (!$qa->{Dropdowns}) { @@ -77,6 +77,10 @@ my $goupdate= sub { $be_post ? 'Update' : 'Go' }; % } (0..$qa->{Dropdowns}-1)); % } +
+ +

Specify route

+ % $prselector->('ShowStalls'); <& enter_route, qa => $qa, dbh => $dbh, emsg_r => \$emsg, @@ -90,19 +94,22 @@ my $goupdate= sub { $be_post ? 'Update' : 'Go' }; % my $routeparams= { EmsgRef => \$emsg }; % if (!$qa->{Dropdowns}) { -Advanced options - you may leave these blank: +

-<& enter_advrouteopts, qa=>$qa, dbh=>$dbh, routeparams=>$routeparams &> +<& enter_advrouteopts, qa=>$qa, dbh=>$dbh, + minprofit_needs_apply => $be_post, + routeparams=>$routeparams &> % } #---------- end of dropdowns, now common middle of page code ---------- - % my $ours= sub { $_[0] =~ -% m/^island|^archipelago|^routestring|^capacitystring|^lossperleague|^capitalstring|^[RT]/; +% m/^island|^archipelago|^routestring|^capacitystring|^lossperleague|^capitalstring|^minprofitstring|^[RT]/; % }; <& "lookup:formhidden", ours => $ours &> +

+
<%perl> #========== results ========== @@ -116,13 +123,15 @@ foreach my $warningf (@warningfs) { % if (@islandids) { -% $someresults->('Relevant trades'); +% $someresults->(); <& routetrade, dbh => $dbh, islandids => \@islandids, archipelagoes => \@archipelagoes, - qa => $qa, - routeparams => $routeparams + qa => $qa, quri => $quri, + routeparams => $routeparams, + reset_suppressions => !!$allargs->{'apply_minprofit'} &> % } +