PickleBALLER/templates/pages/players_list.html

47 lines
1.4 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block title %}Players - Pickleball ELO Tracker{% endblock %}
{% block content %}
<h1>👥 Players</h1>
{% include "components/nav.html" %}
<div style="margin-bottom: 20px;">
<a href="/players/new" class="btn btn-success"> Add Player</a>
</div>
{% if players.is_empty() %}
<div class="alert alert-info">
No players yet. <a href="/players/new">Create one</a> to get started!
</div>
{% else %}
<table>
<thead>
<tr>
<th>Name</th>
<th>Rating</th>
<th>Matches</th>
<th>Win Rate</th>
<th>Email</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for player in players %}
<tr>
<td><a href="/players/{{ player.id }}"><strong>{{ player.name }}</strong></a></td>
<td style="font-weight: bold; color: #003594;">{{ player.rating }}</td>
<td>{{ player.match_count }}</td>
<td>{{ player.win_rate }}%</td>
<td>{{ player.email.unwrap_or_default() }}</td>
<td>
<a href="/players/{{ player.id }}" class="btn">View</a>
<a href="/players/{{ player.id }}/edit" class="btn btn-warning">Edit</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}