chiark / gitweb /
git URLs for various source trees
[ypp-sc-tools.db-live.git] / yarrg / web / dumptable
index 20dc25f12ceb4ea7a77e51302e7ec9557b53e10a..4e1fb3e5215e743ec7be8f06b505ecd82f44a2a8 100644 (file)
@@ -31,7 +31,7 @@
 
  This Mason component is helpful for debugging and developing.  It
  outputs plain HTML tables eg for SQL query results.  You can either:
-    <& dumptable, sth = $executed_statement_handle &>
+    <& dumptable, sth => $executed_statement_handle &>
  in which case it will consume the results of the statement and
  print them unconditionally, or do the equivalent of:
     <& dumptable:start, sth => $sth,              [ qa => $qa ] &> or
@@ -59,7 +59,7 @@ $cols => $sth->{NAME}
 $qa => undef
 </%args>
 %      if (!$qa || $qa->{'debug'}) {
-<table frame=box rules=all>
+<table class="data" frame=box rules=all>
 <tr>
 %              foreach my $field (@$cols) {
 <th><% $field |h %>
@@ -96,6 +96,19 @@ $qa => undef
 %      }
 </%method>
 
+<%method literal>
+<%args>
+$cols
+$rows
+$qa => undef
+</%args>
+<& SELF:start, cols => $cols &>
+%      foreach my $row (@$rows) {
+<& SELF:row, cols => $cols, row => $row &>
+%      }
+<& SELF:end &>
+</%method>
+
 <& SELF:start, sth => $sth &>
 %      my $row;
 %      while ($row= $sth->fetchrow_hashref) {