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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     1
% title 'Latest crashs';
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     2
% layout 'main';
36
703f1af889d1 Add highlight on mouse hover to tables
Vincent Tondellier <tonton+hg@team1664.org>
parents: 29
diff changeset
     3
%= t table => (class => 'table table-striped table-hover table-bordered table-condensed') => begin
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     4
<thead>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     5
  <tr>
24
b69b7aa98a1d Add basic SQL Storage
Vincent Tondellier <tonton+hg@team1664.org>
parents: 0
diff changeset
     6
    <th>Product</th>
b69b7aa98a1d Add basic SQL Storage
Vincent Tondellier <tonton+hg@team1664.org>
parents: 0
diff changeset
     7
    <th>Version</th>
b69b7aa98a1d Add basic SQL Storage
Vincent Tondellier <tonton+hg@team1664.org>
parents: 0
diff changeset
     8
    <th>UUID</th>
67
9e95be0b1b8c Make the index columns configurable
Vincent Tondellier <tonton@team1664.org>
parents: 47
diff changeset
     9
    % foreach my $extra_col(@$extra_columns) {
9e95be0b1b8c Make the index columns configurable
Vincent Tondellier <tonton@team1664.org>
parents: 47
diff changeset
    10
      %= t th => $extra_col->{name}
9e95be0b1b8c Make the index columns configurable
Vincent Tondellier <tonton@team1664.org>
parents: 47
diff changeset
    11
    % }
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    12
    <th>Date</th>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    13
  </tr>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    14
</thead>
24
b69b7aa98a1d Add basic SQL Storage
Vincent Tondellier <tonton+hg@team1664.org>
parents: 0
diff changeset
    15
% foreach my $crash(@$files) {
29
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    16
  %= t tr => begin
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    17
    %= t td => $crash->{product}
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    18
    %= t td => $crash->{version}
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    19
    %= t td => (style => "font-family:monospace;") => begin
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    20
      %= link_to $crash->{uuid} => url_for('report', uuid => $crash->{uuid})
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    21
    % end
67
9e95be0b1b8c Make the index columns configurable
Vincent Tondellier <tonton@team1664.org>
parents: 47
diff changeset
    22
    % foreach my $extra_col(@$extra_columns) {
9e95be0b1b8c Make the index columns configurable
Vincent Tondellier <tonton@team1664.org>
parents: 47
diff changeset
    23
      %= t td => $crash->{$extra_col->{id}}
9e95be0b1b8c Make the index columns configurable
Vincent Tondellier <tonton@team1664.org>
parents: 47
diff changeset
    24
    % }
9e95be0b1b8c Make the index columns configurable
Vincent Tondellier <tonton@team1664.org>
parents: 47
diff changeset
    25
    %= t td => $crash->{date}->set_time_zone('UTC')->set_time_zone('local')->strftime("%F %T")
24
b69b7aa98a1d Add basic SQL Storage
Vincent Tondellier <tonton+hg@team1664.org>
parents: 0
diff changeset
    26
  % end
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    27
% }
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    28
% end
29
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    29
% if($pager->first_page != $pager->last_page) {
47
b8a7a5ec6461 Replace the modified pagination plugin with a cleaner one that supports bootstrap natively
Vincent Tondellier <tonton+hg@team1664.org>
parents: 36
diff changeset
    30
  %= bootstrap_pagination($pager->current_page, $pager->last_page);
29
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    31
% }