phase5: add saved searches, watchlist, and authenticated htmx flows
This commit is contained in:
35
templates/scouting/partials/watchlist_table.html
Normal file
35
templates/scouting/partials/watchlist_table.html
Normal file
@ -0,0 +1,35 @@
|
||||
{% if favorites %}
|
||||
<div class="table-wrap mt-16">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Player</th>
|
||||
<th>Nationality</th>
|
||||
<th>Position / Role</th>
|
||||
<th>Added</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for favorite in favorites %}
|
||||
<tr>
|
||||
<td><a href="{% url 'players:detail' favorite.player_id %}">{{ favorite.player.full_name }}</a></td>
|
||||
<td>{{ favorite.player.nationality.name|default:"-" }}</td>
|
||||
<td>
|
||||
{{ favorite.player.nominal_position.code|default:"-" }}
|
||||
/ {{ favorite.player.inferred_role.name|default:"-" }}
|
||||
</td>
|
||||
<td>{{ favorite.created_at|date:"Y-m-d" }}</td>
|
||||
<td>
|
||||
<div id="favorite-toggle-{{ favorite.player_id }}">
|
||||
{% include "scouting/partials/favorite_button.html" with player=favorite.player is_favorite=True next_url=request.get_full_path %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="mt-16">No players in your watchlist yet.</p>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user