summaryrefslogtreecommitdiff
path: root/app/views/games
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-26 20:27:09 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-26 20:27:09 -0400
commit0776c57b939208736db60d38b4530e8b1c306ec6 (patch)
tree6a831d94039c9c86175b73af0aab525e6bd78983 /app/views/games
parent853c307700fa81b924e00bf430c878a3b7029ffe (diff)
parent62219ac4e3af36cc15c9ad61701550bee9a8424c (diff)
Merge branch 'clean2'
Conflicts: app/controllers/tournaments_controller.rb app/views/tournaments/index.html.erb app/views/tournaments/show.html.erb
Diffstat (limited to 'app/views/games')
-rw-r--r--app/views/games/_form.html.erb4
-rw-r--r--app/views/games/index.html.erb2
-rw-r--r--app/views/games/index.json.jbuilder2
-rw-r--r--app/views/games/show.html.erb5
-rw-r--r--app/views/games/show.json.jbuilder2
5 files changed, 13 insertions, 2 deletions
diff --git a/app/views/games/_form.html.erb b/app/views/games/_form.html.erb
index 20cb214..b1db0b3 100644
--- a/app/views/games/_form.html.erb
+++ b/app/views/games/_form.html.erb
@@ -47,6 +47,10 @@
<%= f.label :sampling_method %><br>
<%= f.text_field :sampling_method %>
</div>
+ <div class="field">
+ <%= f.label :scoring_method %><br>
+ <%= f.text_field :scoring_method %>
+ </div>
<div class="actions">
<%= f.submit %>
</div>
diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb
index bcd10dd..3045325 100644
--- a/app/views/games/index.html.erb
+++ b/app/views/games/index.html.erb
@@ -12,6 +12,7 @@
<th>Set rounds</th>
<th>Randomized teams</th>
<th>Sampling method</th>
+ <th>Scoring method</th>
<th></th>
<th></th>
<th></th>
@@ -30,6 +31,7 @@
<td><%= game.set_rounds %></td>
<td><%= game.randomized_teams %></td>
<td><%= game.sampling_method %></td>
+ <td><%= game.scoring_method %></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>
diff --git a/app/views/games/index.json.jbuilder b/app/views/games/index.json.jbuilder
index 6b20f60..7964f2c 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, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method
+ json.extract! game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method
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 1250cbd..1a18356 100644
--- a/app/views/games/show.html.erb
+++ b/app/views/games/show.html.erb
@@ -43,5 +43,10 @@
<%= @game.sampling_method %>
</p>
+<p>
+ <strong>Scoring method:</strong>
+ <%= @game.scoring_method %>
+</p>
+
<%= link_to 'Edit', edit_game_path(@game) %> |
<%= link_to 'Back', games_path %>
diff --git a/app/views/games/show.json.jbuilder b/app/views/games/show.json.jbuilder
index 087a156..c5fb4ed 100644
--- a/app/views/games/show.json.jbuilder
+++ b/app/views/games/show.json.jbuilder
@@ -1 +1 @@
-json.extract! @game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :created_at, :updated_at
+json.extract! @game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method, :created_at, :updated_at