chiark / gitweb /
WIP routesearch UI: entry done, now must compute results
[ypp-sc-tools.db-live.git] / yarrg / web / query_routesearch
index 53128f6483d255723b1ec4df69b2617dbde54387..bbeba5b522e59ce506ec29d9fb334fa01ae93334 100644 (file)
 <%args>
 $quri
 $dbh
+$islandstring => '';
 $capacitystring => '';
 $lossperleague => '';
 $capitalstring => '';
+$distance => '';
+$someresults
 $emsgokorprint
 </%args>
 
@@ -48,8 +51,9 @@ my @warningfs;
 my @islandids;
 
 my $qa= \%ARGS;
-my $routeparams= { EmsgRef => \$emsg };
+my $routeparams= { EmsgRef => \$emsg, SayOptionalCapital => 1 };
 my $maxdist;
+
 </%perl>
 
 <h1>Find most profitable routes and trades</h1>
@@ -67,12 +71,23 @@ This feature is not available from the "drop down menus" interface.
 
 <&| enter_advrouteopts, qa=>$qa, dbh=>$dbh, routeparams=>$routeparams &>
 <td>
Something:
Maximum distance:
  <&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'ml',
-    thingstring => 'capitalstring', emsgstore => \$emsg,
+    thingstring => 'distance', emsgstore => \$emsg,
     onresults => sub { ($maxdist)= @_; } &>
  </&>
 </&>
 
+<input type=submit name=submit value="Go">
+% my $ours= sub { $_[0] =~ m/^lossperleague|^islandstring|^capitalstring|^capacitystring|^distance/; };
+<& "lookup:formhidden", ours => $ours &>
 
 % }
+
+</form>
+<%perl>
+
+$emsgokorprint->($emsg) or return;
+@islandids or return;
+
+</%perl>