templates/group/_stats.html.ep
changeset 88 c82f5589db11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/group/_stats.html.ep	Mon Dec 28 23:08:23 2015 +0100
@@ -0,0 +1,26 @@
+<a data-toggle="collapse" href="#stats-by-product-and-version"><h3>Crashs by product and version</h3></a>
+<div id="stats-by-product-and-version" class="collapse in">
+%= t table => (class => 'table table-striped table-hover table-bordered table-condensed') => begin
+<thead>
+  <tr>
+    <th>Product</th>
+    <th>Version</th>
+    <th>Count</th>
+  </tr>
+</thead>
+<tbody>
+% my $max;
+% foreach my $stat(@{$stats_by_product_and_version}) {
+  % $max = $stat->{crash_count} unless defined($max);
+  %= t tr => begin
+    %= t td => $stat->{product_name}
+    %= t td => $stat->{version}
+    %= t td => begin
+      %= stats_bar($stat->{crash_count}, $max)
+    % end
+  % end
+% }
+</tbody>
+% end
+</div>
+