diff options
author | DavisLWebb <davislwebb@ymail.com> | 2014-03-06 17:45:22 -0500 |
---|---|---|
committer | DavisLWebb <davislwebb@ymail.com> | 2014-03-06 17:45:22 -0500 |
commit | 0c1299795a492e6296eb8e15bca576ea5139be6b (patch) | |
tree | 3921daf8c26d656b12b20ee22be63c97fa20f6fa /app/views/games | |
parent | 110d67f433c091a3b739c5bbebe110d963efaa73 (diff) | |
parent | fe7d5ad458b4cabd8fd57b47f81abc56dd8532ad (diff) |
Merge branch 'master' of http://github.com/LukeShu/leaguer
Conflicts:
app/controllers/sessions_controller.rb
app/views/sessions/new.html.erb
Diffstat (limited to 'app/views/games')
-rw-r--r-- | app/views/games/_form.html.erb | 18 | ||||
-rw-r--r-- | app/views/games/index.html.erb | 14 | ||||
-rw-r--r-- | app/views/games/index.json.jbuilder | 2 | ||||
-rw-r--r-- | app/views/games/show.html.erb | 18 | ||||
-rw-r--r-- | app/views/games/show.json.jbuilder | 2 |
5 files changed, 38 insertions, 16 deletions
diff --git a/app/views/games/_form.html.erb b/app/views/games/_form.html.erb index 8941c59..f68e28f 100644 --- a/app/views/games/_form.html.erb +++ b/app/views/games/_form.html.erb @@ -16,12 +16,20 @@ <%= f.text_area :name %> </div> <div class="field"> - <%= f.label :players_per_team %><br> - <%= f.number_field :players_per_team %> + <%= f.label :min_players_per_team %><br> + <%= f.number_field :min_players_per_team %> </div> <div class="field"> - <%= f.label :teams_per_match %><br> - <%= f.number_field :teams_per_match %> + <%= f.label :max_players_per_team %><br> + <%= f.number_field :max_players_per_team %> + </div> + <div class="field"> + <%= f.label :min_teams_per_match %><br> + <%= f.number_field :min_teams_per_match %> + </div> + <div class="field"> + <%= f.label :max_teams_per_match %><br> + <%= f.number_field :max_teams_per_match %> </div> <div class="field"> <%= f.label :set_rounds %><br> @@ -29,7 +37,7 @@ </div> <div class="field"> <%= f.label :randomized_teams %><br> - <%= f.number_field :randomized_teams %> + <%= f.check_box :randomized_teams %> </div> <div class="actions"> <%= f.submit %> diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb index 7ee69d1..79acd1e 100644 --- a/app/views/games/index.html.erb +++ b/app/views/games/index.html.erb @@ -1,11 +1,13 @@ <h1>Listing games</h1> -<table> +<table class="table table-hover"> <thead> <tr> <th>Name</th> - <th>Players per team</th> - <th>Teams per match</th> + <th>Min players per team</th> + <th>Max players per team</th> + <th>Min teams per match</th> + <th>Max teams per match</th> <th>Set rounds</th> <th>Randomized teams</th> <th></th> @@ -18,8 +20,10 @@ <% @games.each do |game| %> <tr> <td><%= game.name %></td> - <td><%= game.players_per_team %></td> - <td><%= game.teams_per_match %></td> + <td><%= game.min_players_per_team %></td> + <td><%= game.max_players_per_team %></td> + <td><%= game.min_teams_per_match %></td> + <td><%= game.max_teams_per_match %></td> <td><%= game.set_rounds %></td> <td><%= game.randomized_teams %></td> <td><%= link_to 'Show', game %></td> diff --git a/app/views/games/index.json.jbuilder b/app/views/games/index.json.jbuilder index 7e5c1a1..f8b3e96 100644 --- a/app/views/games/index.json.jbuilder +++ b/app/views/games/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@games) do |game| - json.extract! game, :id, :name, :players_per_team, :teams_per_match, :set_rounds, :randomized_teams + json.extract! game, :id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams json.url game_url(game, format: :json) end diff --git a/app/views/games/show.html.erb b/app/views/games/show.html.erb index 88bf91c..39d4a97 100644 --- a/app/views/games/show.html.erb +++ b/app/views/games/show.html.erb @@ -4,13 +4,23 @@ </p> <p> - <strong>Players per team:</strong> - <%= @game.players_per_team %> + <strong>Min players per team:</strong> + <%= @game.min_players_per_team %> </p> <p> - <strong>Teams per match:</strong> - <%= @game.teams_per_match %> + <strong>Max players per team:</strong> + <%= @game.max_players_per_team %> +</p> + +<p> + <strong>Min teams per match:</strong> + <%= @game.min_teams_per_match %> +</p> + +<p> + <strong>Max teams per match:</strong> + <%= @game.max_teams_per_match %> </p> <p> diff --git a/app/views/games/show.json.jbuilder b/app/views/games/show.json.jbuilder index 1a2d0c7..e689e7b 100644 --- a/app/views/games/show.json.jbuilder +++ b/app/views/games/show.json.jbuilder @@ -1 +1 @@ -json.extract! @game, :id, :name, :players_per_team, :teams_per_match, :set_rounds, :randomized_teams, :created_at, :updated_at +json.extract! @game, :id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :created_at, :updated_at |