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
43 lines
1.7 KiB
Plaintext
43 lines
1.7 KiB
Plaintext
<h1>Edit Tournament: <%= tournament.name %></h1>
|
|
|
|
<form action="/admin/tournaments/<%= tournament.id %>" method="post">
|
|
<input type="hidden" name="_csrf_token" value="<%= csrf_token %>">
|
|
<input type="hidden" name="_method" value="patch">
|
|
|
|
<div>
|
|
<label for="name">Tournament Name *</label>
|
|
<input type="text" id="name" name="name" value="<%= tournament.name %>" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="description">Description</label>
|
|
<textarea id="description" name="description" rows="3"><%= tournament.description %></textarea>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="event_date">Date/Time</label>
|
|
<input type="datetime-local" id="event_date" name="event_date"
|
|
value="<%= tournament.event_date&.strftime('%Y-%m-%dT%H:%M') %>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="format">Tournament Format</label>
|
|
<select id="format" name="format">
|
|
<option value="single_elim" <%= 'selected' if tournament.format == 'single_elim' %>>Single Elimination</option>
|
|
<option value="double_elim" <%= 'selected' if tournament.format == 'double_elim' %>>Double Elimination</option>
|
|
<option value="round_robin" <%= 'selected' if tournament.format == 'round_robin' %>>Round Robin</option>
|
|
<option value="swiss" <%= 'selected' if tournament.format == 'swiss' %>>Swiss System</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="max_participants">Max Participants (teams)</label>
|
|
<input type="number" id="max_participants" name="max_participants"
|
|
min="2" max="32" value="<%= tournament.max_participants %>">
|
|
</div>
|
|
|
|
<button type="submit">Update Tournament</button>
|
|
</form>
|
|
|
|
<p><a href="/admin/tournaments/<%= tournament.id %>">Cancel</a></p>
|