chiark / gitweb /
where-vessels: subclass smasher works; need to reorg to be a grid like Show
[ypp-sc-tools.db-live.git] / yarrg / web / query_commod
index 5db6330c6cb2df4999c7c4bac682a301745be79d..8d55f2686130568ba92d2c578dd787d2362e368e 100644 (file)
@@ -50,6 +50,7 @@ my ($commodname,$cmid);
 my $qa= \%ARGS;
 </%perl>
 
+<div class="query">
 <h1>Commodity enquiry</h1>
 
 % $prselector->('BuySell');
@@ -69,10 +70,13 @@ my $qa= \%ARGS;
 </form>
 
 %#========== results ==========
+</div>
+<div class="results">
 <%perl>
 
 $emsgokorprint->($emsg) or $cmid=undef;
-return unless defined $cmid;
+print("</div>"), return
+       unless defined $cmid;
 $someresults->();
 
 #---------- actually compute the results and print them ----------
@@ -109,9 +113,14 @@ foreach my $bs (split /_/, $ARGS{BuySell}) {
 %      my $rowix= 0;
 %      while ($island= $islands->fetchrow_hashref) {
 %              if (!$rowix) {
-<table id="<% $bs %>_table">
+<table class="data" id="<% $bs %>_table" rules=groups>
+<colgroup span=2>
+<colgroup span=1>
+<colgroup span=2>
+<colgroup span=3>
 <tr>
-<th colspan=3>
+<th colspan=2>
+<th colspan=1>
 <th colspan=2>Prices
 <th colspan=3>Quantity at price
 <tr id="<% $bs %>_table_thr">
@@ -170,11 +179,11 @@ foreach my $bs (split /_/, $ARGS{BuySell}) {
      <td><% $s->[0]= $island->{'archipelago'} |h %>
      <td><% $s->[1]= $island->{'islandname'} |h %>
      <td><%          $stallname |h %>
-     <td><% $s->[3]= (length $bestqty ? $bestprice : '-') %>
-     <td><% $s->[4]= $median %>
-     <td><% $s->[5]= $bestqty %>
-     <td><% $s->[6]= $approxqty %>
-     <td><% $s->[7]= $cqty %>
+     <td align=right><% $s->[3]= (length $bestqty ? $bestprice : '-') %>
+     <td align=right><% $s->[4]= $median %>
+     <td align=right><% $s->[5]= $bestqty %>
+     <td align=right><% $s->[6]= $approxqty %>
+     <td align=right><% $s->[7]= $cqty %>
 </tr>
 %              for my $cix (0..$#$s) {
 %                      $ts_sortkeys{$cix}{$rowid}= $s->[$cix];
@@ -207,3 +216,4 @@ No offers.
 <%perl>
 }
 </%perl>
+</div>