diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/games/index.html.erb | 35 | ||||
-rw-r--r-- | app/views/layouts/application.html.erb | 14 | ||||
-rw-r--r-- | app/views/tournaments/index.html.erb | 27 |
3 files changed, 71 insertions, 5 deletions
diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb new file mode 100644 index 0000000..2c178f5 --- /dev/null +++ b/app/views/games/index.html.erb @@ -0,0 +1,35 @@ +<h1>Listing games</h1> + +<table class="table table-hover"> + <thead> + <tr> + <th>Name</th> + <th>Players per team</th> + <th>Teams per match</th> + <th>Set rounds</th> + <th>Randomized teams</th> + <th></th> + <th></th> + <th></th> + </tr> + </thead> + + <tbody> + <% @games.each do |game| %> + <tr> + <td><%= game.name %></td> + <td><%= game.players_per_team %></td> + <td><%= game.teams_per_match %></td> + <td><%= game.set_rounds %></td> + <td><%= game.randomized_teams %></td> + <td><%= link_to 'Show', game %></td> + <td><%= link_to 'Edit', edit_game_path(game) %></td> + <td><%= link_to 'Destroy', game, method: :delete, data: { confirm: 'Are you sure?' } %></td> + </tr> + <% end %> + </tbody> +</table> + +<br> + +<%= link_to 'New Game', new_game_path, {:class => "btn btn-warning"} %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e2b8e02..0deede3 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -7,17 +7,21 @@ <%= csrf_meta_tags %> </head> <body> +<div role="navigation" class="navbar navbar-inverse"> <header> - <h1 id="logo"> Leaguer </h1> - <%= form_tag("/search", method: "get", :id => "search-bar") do %> + <div class="navbar-brand"> Leaguer </div> + <div> + <%= form_tag("/search", method: "get", :class => "navbar-form navbar-right") do %> <%= text_field_tag(:query, nil, :placeholder => "Search") %> - <%= submit_tag("Go") %> + <%= submit_tag("Go", {:class => "btn btn-warning"}) %> <% end %> + </div> </header> - + </div> <%= yield %> -<footer > +<hr> +<footer id="footer"> <p> Tomer Kimia Andrew Murrell Luke Shumaker Nathaniel Foy Davis Webb Guntas Grewal </p> <p> The Leaguer System © <%= Time.now.year %> </p> </footer> diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb new file mode 100644 index 0000000..8ab3c15 --- /dev/null +++ b/app/views/tournaments/index.html.erb @@ -0,0 +1,27 @@ +<h1>Listing tournaments</h1> + +<table class="table table-hover"> + <thead> + <tr> + <th>Game</th> + <th></th> + <th></th> + <th></th> + </tr> + </thead> + + <tbody> + <% @tournaments.each do |tournament| %> + <tr> + <td><%= %></td> + <td><%= link_to 'Show', tournament %></td> + <td><%= link_to 'Edit', edit_tournament_path(tournament) %></td> + <td><%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' } %></td> + </tr> + <% end %> + </tbody> +</table> + +<br> + +<%= link_to 'New Tournament', new_tournament_path, :class => "btn btn-warning" %> |