templates/layouts/main.html.ep
author Vincent Tondellier <tonton+hg@team1664.org>
Mon, 09 Feb 2015 00:06:34 +0100
changeset 61 3a0ca02556da
parent 57 cebbfcd7deff
child 63 150e11f0fb7c
permissions -rw-r--r--
Add crash_data table to store the json Add searching on crashing backtrace function names Drop never used tables Bump DB schema version Requires PostgreSQL >= 9.4 for now (for jsonb)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     1
<!DOCTYPE html>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     2
<html>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     3
  <head>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     4
    <title><%= title %></title>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     5
    <!--[if lt IE 9]>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     6
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     7
    <![endif]-->
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     8
28
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
     9
    % if ( $self->app->mode eq 'development'){
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    10
    %= stylesheet '/assets/css/bootstrap.css'
28
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    11
    %= stylesheet '/assets/css/bootstrap-theme.css'
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    12
    %} else {
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    13
    %= stylesheet '/assets/css/bootstrap.min.css'
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    14
    %= stylesheet '/assets/css/bootstrap-theme.min.css'
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    15
    %}
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    16
    %= stylesheet begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    17
      body {
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    18
        padding-top: 60px;
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    19
      }
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    20
    % end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    21
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    22
  </head>
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
  <body>
28
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    25
    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    26
      <div class="container-fluid">
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    27
          %= link_to 'Crash test' => url_for('index') => (class => 'navbar-brand')
57
cebbfcd7deff Add search box, using perl Search::Query syntax
Vincent Tondellier <tonton+hg@team1664.org>
parents: 28
diff changeset
    28
          <form id="search-box" class="navbar-form navbar-right" method="get" action="<%= url_for("index") %>" role="search">
cebbfcd7deff Add search box, using perl Search::Query syntax
Vincent Tondellier <tonton+hg@team1664.org>
parents: 28
diff changeset
    29
            <div class="form-group">
cebbfcd7deff Add search box, using perl Search::Query syntax
Vincent Tondellier <tonton+hg@team1664.org>
parents: 28
diff changeset
    30
              <input name="search" type="text" class="form-control" placeholder="Search" value="<%= param("search") %>">
cebbfcd7deff Add search box, using perl Search::Query syntax
Vincent Tondellier <tonton+hg@team1664.org>
parents: 28
diff changeset
    31
            </div>
cebbfcd7deff Add search box, using perl Search::Query syntax
Vincent Tondellier <tonton+hg@team1664.org>
parents: 28
diff changeset
    32
            <button type="submit" class="btn btn-default">Submit</button>
cebbfcd7deff Add search box, using perl Search::Query syntax
Vincent Tondellier <tonton+hg@team1664.org>
parents: 28
diff changeset
    33
          </form>
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    34
      </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    35
    </div>
9
998910202673 Use fluid layout
Vincent Tondellier <tonton+hg@team1664.org>
parents: 3
diff changeset
    36
    <div class="container-fluid">
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    37
      % content_for 'success_messages' => begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    38
       % if ( defined($self->session->{success_messages}) && ( scalar( @{ $self->session->{success_messages}} ) > 0 ) ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    39
        %foreach my $notice ( @{ $self->session->{success_messages}} ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    40
         <div class="alert alert-success">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    41
          <a class="close" data-dismiss="alert">×</a>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    42
          <p><%= $notice; %></p>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    43
         </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    44
        %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    45
        %delete($self->session->{success_messages});
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    46
       %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    47
      %end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    48
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    49
      % content_for 'noticed_messages' => begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    50
       % if ( defined($self->session->{notice_messages}) && ( scalar( @{ $self->session->{notice_messages}} ) > 0 ) ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    51
        %foreach my $notice ( @{ $self->session->{notice_messages}} ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    52
         <div class="alert alert-info">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    53
          <a class="close" data-dismiss="alert">×</a>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    54
          <p><%= $notice; %></p>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    55
         </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    56
        %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    57
        %delete($self->session->{notice_messages});
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    58
       %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    59
      %end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    60
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    61
      % content_for 'error_messages' => begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    62
       % if ( defined($self->session->{error_messages}) && ( scalar( @{ $self->session->{error_messages}} ) > 0 ) ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    63
        <div id="error-messages" class="error-messages">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    64
         %foreach my $error ( @{ $self->session->{error_messages}} ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    65
          <div class="alert alert-error">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    66
           <a class="close" data-dismiss="alert">×</a>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    67
           <p><%= $error; %></p>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    68
          </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    69
         %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    70
         %delete($self->session->{error_messages});
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    71
        </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    72
       %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    73
      %end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    74
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    75
      <%= content_for 'hero_unit' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    76
      <%= content_for 'error_messages' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    77
      <%= content_for 'noticed_messages' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    78
      <%= content_for 'success_messages' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    79
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    80
      <%= content %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    81
    </div>
3
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    82
    % if ( $self->app->mode eq 'development'){
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    83
    %= javascript '/assets/js/jquery.js'
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    84
    %= javascript '/assets/js/bootstrap.js'
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    85
    %} else {
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    86
    %= javascript '/assets/js/jquery.min.js'
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    87
    %= javascript '/assets/js/bootstrap.min.js'
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    88
    %}
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    89
    %= javascript '/assets/js/application.js'
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    90
  </body>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    91
</html>