summaryrefslogtreecommitdiff
path: root/app/views/matches/index.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/matches/index.html.erb')
-rw-r--r--app/views/matches/index.html.erb36
1 files changed, 21 insertions, 15 deletions
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb
index 8d699f9..d4ddb0e 100644
--- a/app/views/matches/index.html.erb
+++ b/app/views/matches/index.html.erb
@@ -1,30 +1,23 @@
-<h1>Listing matches</h1>
+<h1><%= @tournament.name %> - Matches</h1>
-<table>
+
+<table class="table">
<thead>
<tr>
<th>Status</th>
- <th>Tournament</th>
<th>Name</th>
<th>Winner</th>
- <th>Remote</th>
- <th></th>
- <th></th>
<th></th>
</tr>
</thead>
- <tbody>
- <% @matches.each do |match| %>
+ <tbody class="table-hover">
+ <% @tournament.matches.each do |match| %>
<tr>
<td><%= match.status %></td>
- <td><%= match.tournament %></td>
+ <td><%= match.id%></td>
<td><%= match.name %></td>
- <td><%= match.winner %></td>
- <td><%= match.remote_id %></td>
- <td><%= link_to 'Show', match %></td>
- <td><%= link_to 'Edit', edit_match_path(match) %></td>
- <td><%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ <td><%= link_to "Show", tournament_match_path(@tournament, match) %>
</tr>
<% end %>
</tbody>
@@ -32,4 +25,17 @@
<br>
-<%= link_to 'New Match', new_match_path %>
+
+<SVG version="1.1"
+ baseProfile="full"
+ width="<%= 300 * @matches.count / 2 + 50 %>" height="<%= 200 * @matches.count + 50 %>"
+ xmlns="http://www.w3.org/2000/svg">
+
+ <% (1..@matches.count).each do |i| %>
+ <g class="svg-match">
+ <rect rx="10"
+
+ </g>
+ <% end %>
+
+</SVG>