summaryrefslogtreecommitdiff
path: root/app/views/games
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-22 02:18:48 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-22 02:18:48 -0400
commit07476fd9a2b942e8d6056804bb1cdbd5e9a1c528 (patch)
treea3e0642ae64bef2bdda4b359f6712d5b09c5a70a /app/views/games
parent96274bb53465d90632908ebc2f8fd9811d7a5bcb (diff)
run ./generate.sh
Diffstat (limited to 'app/views/games')
-rw-r--r--app/views/games/_form.html.erb6
-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, 14 insertions, 3 deletions
diff --git a/app/views/games/_form.html.erb b/app/views/games/_form.html.erb
index f68e28f..ef250ad 100644
--- a/app/views/games/_form.html.erb
+++ b/app/views/games/_form.html.erb
@@ -13,7 +13,7 @@
<div class="field">
<%= f.label :name %><br>
- <%= f.text_area :name %>
+ <%= f.text_field :name %>
</div>
<div class="field">
<%= f.label :min_players_per_team %><br>
@@ -39,6 +39,10 @@
<%= f.label :randomized_teams %><br>
<%= f.check_box :randomized_teams %>
</div>
+ <div class="field">
+ <%= f.label :sampling_method %><br>
+ <%= f.text_field :sampling_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 27c5860..6cc7f58 100644
--- a/app/views/games/index.html.erb
+++ b/app/views/games/index.html.erb
@@ -10,6 +10,7 @@
<th>Max teams per match</th>
<th>Set rounds</th>
<th>Randomized teams</th>
+ <th>Sampling method</th>
<th></th>
<th></th>
<th></th>
@@ -26,6 +27,7 @@
<td><%= game.max_teams_per_match %></td>
<td><%= game.set_rounds %></td>
<td><%= game.randomized_teams %></td>
+ <td><%= game.sampling_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 f8b3e96..cc0afc9 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, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_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, :sampling_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 1f1a154..93bfb60 100644
--- a/app/views/games/show.html.erb
+++ b/app/views/games/show.html.erb
@@ -35,5 +35,10 @@
<%= @game.randomized_teams %>
</p>
+<p>
+ <strong>Sampling method:</strong>
+ <%= @game.sampling_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 e689e7b..60d0a4a 100644
--- a/app/views/games/show.json.jbuilder
+++ b/app/views/games/show.json.jbuilder
@@ -1 +1 @@
-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
+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, :sampling_method, :created_at, :updated_at