summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavisLWebb <davislwebb@ymail.com>2014-03-07 10:44:05 -0500
committerDavisLWebb <davislwebb@ymail.com>2014-03-07 10:44:05 -0500
commitd9a19d269bb773d676cf049dbf58d675c3fa0db9 (patch)
tree8b34bedd28961427bdeac906d6fa25613a813ad5
parentf69fcc28596700c1a875068b7cb616d6eb40e6df (diff)
I changed some of the views for the tournaments and matches (like how match creation asked for a winner)
-rw-r--r--app/views/matches/_form.html.erb4
-rw-r--r--app/views/matches/index.html.erb2
-rw-r--r--app/views/matches/new.html.erb2
-rw-r--r--app/views/tournaments/_selected.html.erb8
-rw-r--r--app/views/tournaments/show.html.erb2
5 files changed, 8 insertions, 10 deletions
diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb
index 67d30da..015aed0 100644
--- a/app/views/matches/_form.html.erb
+++ b/app/views/matches/_form.html.erb
@@ -8,10 +8,6 @@
<%= f.label :name %><br>
<%= f.text_field :name %>
</div>
- <div class="field">
- <%= f.label :winner_id %><br>
- <%= f.text_field :winner_id %>
- </div>
<div class="actions">
<%= f.submit %>
</div>
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb
index ff42ef1..60df1b5 100644
--- a/app/views/matches/index.html.erb
+++ b/app/views/matches/index.html.erb
@@ -15,7 +15,7 @@
<tbody>
<% @tournament.matches.each do |match| %>
<tr>
- <td><%= match.tournament %></td>
+ <td><%= match.tournament.id %></td>
<td><%= match.name %></td>
<td><%= match.winner %></td>
<td><%= link_to 'Show', tournament_match_path(@tournament, match) %></td>
diff --git a/app/views/matches/new.html.erb b/app/views/matches/new.html.erb
index 9ac669f..74e7e3a 100644
--- a/app/views/matches/new.html.erb
+++ b/app/views/matches/new.html.erb
@@ -1,5 +1,3 @@
<h1>New match</h1>
<%= render 'form' %>
-
-
diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb
index 9b1b7f8..7e91e85 100644
--- a/app/views/tournaments/_selected.html.erb
+++ b/app/views/tournaments/_selected.html.erb
@@ -14,9 +14,13 @@
<% else %>
<%= f.text_field name %>
<% end %>
-
</p>
-
<% end %>
+
+ <div class="field">
+ <%= f.label :status %><br>
+ <%= f.number_field :status %>
+ </div>
+
<%= f.submit %>
<% end %>
diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb
index c3a40e7..5629980 100644
--- a/app/views/tournaments/show.html.erb
+++ b/app/views/tournaments/show.html.erb
@@ -8,7 +8,7 @@
<% if current_user.in_group?(:host) %>
<p>
<strong>Game:</strong>
- <%= @tournament.game %>
+ <%= @tournament.id %>
</p>
<p>