phase5: add saved searches, watchlist, and authenticated htmx flows

This commit is contained in:
Alfredo Di Stasio
2026-03-10 10:58:39 +01:00
parent c83bc96b6c
commit f207ffbad8
18 changed files with 543 additions and 6 deletions

View 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 %}