summaryrefslogtreecommitdiff
path: root/app/views/matches/index.html.erb
blob: f1019ec8c5a199f781ddefdbf93516c8ea27cbe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<h1><%= @tournament.name %> Matches</h1>

<!--
<table>
  <thead>
    <tr>
      <th>Status</th>
      <th>Tournament</th>
      <th>Name</th>
      <th>Winner</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <% @tournament.matches.each do |match| %>
      <tr>
        <td><%= match.tournament.id %></td>
        <td><%= match.status %></td>
        <td><%= match.tournament %></td>
        <td><%= match.name %></td>
        <td><%= match.winner %></td>
        <td><%= link_to 'Show', tournament_match_path(@tournament, match) %></td>
        <td><%= link_to 'Edit', edit_tournament_match_path(@tournament, match) %></td>
        <td><%= link_to 'Destroy', tournament_match_path(@tournament, match), method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>
-->

<SVG version="1.1"
   baseProfile="full"
   width="<%= 300 * @matches.count / 2 + 50 %>" height="<%= 200 * @matches.count + 50 %>"
   xmlns="http://www.w3.org/2000/svg">

   <% @matches.each do |tournament | %>
    <g class="svg-match" >
   
    </g>
   <% end %>

</SVG>