templates/index.html.ep
author Vincent Tondellier <tonton@team1664.org>
Sat, 09 May 2015 23:24:13 +0200
changeset 68 c810480b2c37
parent 67 9e95be0b1b8c
child 78 0ebef32c34af
permissions -rw-r--r--
Avoid creating a new class for each stack frame: use helpers and state variables

% title 'Latest crashs';
% layout 'main';
%= t table => (class => 'table table-striped table-hover table-bordered table-condensed') => begin
<thead>
  <tr>
    <th>Product</th>
    <th>Version</th>
    <th>UUID</th>
    % foreach my $extra_col(@$extra_columns) {
      %= t th => $extra_col->{name}
    % }
    <th>Date</th>
  </tr>
</thead>
% foreach my $crash(@$files) {
  %= t tr => begin
    %= t td => $crash->{product}
    %= t td => $crash->{version}
    %= t td => (style => "font-family:monospace;") => begin
      %= link_to $crash->{uuid} => url_for('report', uuid => $crash->{uuid})
    % end
    % foreach my $extra_col(@$extra_columns) {
      %= t td => $crash->{$extra_col->{id}}
    % }
    %= t td => $crash->{date}->set_time_zone('UTC')->set_time_zone('local')->strftime("%F %T")
  % end
% }
% end
% if($pager->first_page != $pager->last_page) {
  %= bootstrap_pagination($pager->current_page, $pager->last_page);
% }