fix: Update admin templates with player names and edit links
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
<th>Team 2</th>
|
||||
<th>Score</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -20,11 +21,14 @@
|
||||
<tr>
|
||||
<td><%= match.id %></td>
|
||||
<td><%= match.played_at&.strftime('%Y-%m-%d %H:%M') %></td>
|
||||
<td><%= match.team_1_p1_id %>/<%= match.team_1_p2_id %></td>
|
||||
<td><%= match.team_1_score %></td>
|
||||
<td><%= match.team_2_p1_id %>/<%= match.team_2_p2_id %></td>
|
||||
<td><%= match.team_2_score %></td>
|
||||
<td><%= match.team_1_p1_name %> + <%= match.team_1_p2_name %></td>
|
||||
<td><strong><%= match.team_1_score %></strong></td>
|
||||
<td><%= match.team_2_p1_name %> + <%= match.team_2_p2_name %></td>
|
||||
<td><strong><%= match.team_2_score %></strong></td>
|
||||
<td><%= match.status %></td>
|
||||
<td>
|
||||
<a href="/admin/matches/<%= match.id %>/edit">Edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
@@ -1 +1,19 @@
|
||||
<h1>EuchreCamp::Views::Admin::Players::New</h1>
|
||||
<h1>Add New Player</h1>
|
||||
|
||||
<form action="/admin/players" method="POST" class="player-form">
|
||||
<div class="form-group">
|
||||
<label for="player_name">Player Name</label>
|
||||
<input type="text" id="player_name" name="player[name]" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="player_rating">Initial Rating</label>
|
||||
<input type="number" id="player_rating" name="player[rating]" value="1000" min="0" max="3000">
|
||||
<small>Default rating is 1000</small>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">Create Player</button>
|
||||
<a href="/admin/players" class="btn">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user