ac858f1e6d
Implement comprehensive partnership tracking system and tournament management features including round-robin, single/double elimination, and Swiss system pairings. Changes: - Add partnership_games and partnership_stats tables - Implement PartnershipTracker service for recording partnership data - Add tournament generator with multiple formats - Create tournament management actions and views - Add acceptance tests for partnership tracking - Fix PartnershipTracker to use single snapshot per player per match - Fix round-robin test to query by round_number instead of hardcoded ID Note: All 8 acceptance tests now passing
65 lines
1.6 KiB
Plaintext
65 lines
1.6 KiB
Plaintext
<h1>Tournament Administration</h1>
|
|
|
|
<p><a href="/admin/tournaments/new">Create New Tournament</a></p>
|
|
|
|
<% if upcoming.any? %>
|
|
<h2>Upcoming / Active Tournaments</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Date</th>
|
|
<th>Format</th>
|
|
<th>Status</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% upcoming.each do |tournament| %>
|
|
<tr>
|
|
<td><%= tournament.name %></td>
|
|
<td><%= tournament.event_date&.strftime('%Y-%m-%d %H:%M') %></td>
|
|
<td><%= tournament.format %></td>
|
|
<td><%= tournament.status %></td>
|
|
<td>
|
|
<a href="/admin/tournaments/<%= tournament.id %>">View</a> |
|
|
<a href="/admin/tournaments/<%= tournament.id %>/edit">Edit</a>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
|
|
<% if completed.any? %>
|
|
<h2>Past Tournaments</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Date</th>
|
|
<th>Format</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% completed.each do |tournament| %>
|
|
<tr>
|
|
<td><%= tournament.name %></td>
|
|
<td><%= tournament.event_date&.strftime('%Y-%m-%d') %></td>
|
|
<td><%= tournament.format %></td>
|
|
<td>
|
|
<a href="/admin/tournaments/<%= tournament.id %>">View Results</a>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
|
|
<% if upcoming.empty? && completed.empty? %>
|
|
<p>No tournaments yet. <a href="/admin/tournaments/new">Create your first tournament!</a></p>
|
|
<% end %>
|
|
|
|
<p><a href="/admin/players">Back to Admin</a></p>
|