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 | 29 | ||||
-rw-r--r-- | app/views/static/homepage.html.erb | 10 | ||||
-rw-r--r-- | app/views/tournaments/index.html.erb | 27 | ||||
-rw-r--r-- | app/views/users/new.html.erb | 27 |
5 files changed, 128 insertions, 0 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 new file mode 100644 index 0000000..0deede3 --- /dev/null +++ b/app/views/layouts/application.html.erb @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html> +<head> + <title>Leaguer</title> + <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> + <%= javascript_include_tag "application", "data-turbolinks-track" => true %> + <%= csrf_meta_tags %> +</head> +<body> +<div role="navigation" class="navbar navbar-inverse"> +<header> + <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", {:class => "btn btn-warning"}) %> + <% end %> + </div> +</header> + </div> +<%= yield %> + +<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> + +</body> +</html> diff --git a/app/views/static/homepage.html.erb b/app/views/static/homepage.html.erb new file mode 100644 index 0000000..bca440a --- /dev/null +++ b/app/views/static/homepage.html.erb @@ -0,0 +1,10 @@ +<div role="main" class="container theme-showcase"> + + <!-- Main jumbotron for a primary marketing message or call to action --> + <div class="jumbotron"> + <h1>Welcome to Leauger</h1> + <p>This is a tournment management system designed to be used for any team sport. Our peer review system ensures that the best players move on to the next round! Try creating a new tournament and having people sign up for it. </p> + <p id="jumbo-buttons"><%= link_to 'Log In / Sign Up', "#", :class => "btn btn-warning btn-lg", :role => "button" %> <%= link_to 'See Ongoing Tournaments', tournaments_path, :class => "btn btn-warning btn-lg", :role => "button" %> </p> + </div> + + </div>
\ No newline at end of file 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" %> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb new file mode 100644 index 0000000..418f2e2 --- /dev/null +++ b/app/views/users/new.html.erb @@ -0,0 +1,27 @@ +<h1> Sign Up </h1> + +<%= form_for :user do |f| %> + <p> + <%= f.label :name %><br> + <%= f.text_field :name %> + </p> + <p> + <%= f.label :email %><br> + <%= f.text_field :email %> + </p> + <p> + <%= f.label :user_name %><br> + <%= f.text_field :user_name %> + </p> + <p> + <%= f.label :password %><br> + <%= f.text_field :password %> + </p> + <p> + <%= f.label :password_confirm %><br> + <%= f.text_field :password_confirm %> + </p> + <p> + <%= f.submit %> + </p> +<% end %> |