templates/index.html.ep
author Vincent Tondellier <tonton+hg@team1664.org>
Mon, 04 Aug 2014 14:51:09 +0200
changeset 30 f65708dc1be1
parent 29 006e82a1bcd0
child 36 703f1af889d1
permissions -rw-r--r--
Rename setup command to db
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';
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     3
%= t table => (class => 'table table-striped table-bordered table-condensed') => begin
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>UserID</th>
b69b7aa98a1d Add basic SQL Storage
Vincent Tondellier <tonton+hg@team1664.org>
parents: 0
diff changeset
     9
    <th>UUID</th>
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    10
    <th>Date</th>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    11
  </tr>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    12
</thead>
24
b69b7aa98a1d Add basic SQL Storage
Vincent Tondellier <tonton+hg@team1664.org>
parents: 0
diff changeset
    13
% foreach my $crash(@$files) {
29
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    14
  %= t tr => begin
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    15
    %= t td => $crash->{product}
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    16
    %= t td => $crash->{version}
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    17
    %= t td => $crash->{user}
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    18
    %= t td => (style => "font-family:monospace;") => begin
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    19
      %= link_to $crash->{uuid} => url_for('report', uuid => $crash->{uuid})
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    20
    % end
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    21
    %= t td => $crash->{date}->strftime("%F %T")
24
b69b7aa98a1d Add basic SQL Storage
Vincent Tondellier <tonton+hg@team1664.org>
parents: 0
diff changeset
    22
  % end
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    23
% }
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    24
% end
29
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    25
% if($pager->first_page != $pager->last_page) {
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    26
  %= t ul => (class => "pagination") => begin
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    27
    % my $url = Mojo::URL->new->query({ page => '{page}'});
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    28
    %= pagination($pager->current_page, $pager->last_page => $url);
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    29
  % end
006e82a1bcd0 Add pagination
Vincent Tondellier <tonton+hg@team1664.org>
parents: 24
diff changeset
    30
% }