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

@ -7,6 +7,10 @@
</div>
</div>
{% if request.user.is_authenticated %}
{% include "scouting/partials/save_search_form.html" %}
{% endif %}
{% if players %}
<div class="table-wrap">
<table>
@ -21,6 +25,7 @@
<th>PPG</th>
<th>RPG</th>
<th>APG</th>
{% if request.user.is_authenticated %}<th>Watchlist</th>{% endif %}
</tr>
</thead>
<tbody>
@ -40,6 +45,15 @@
<td>{{ player.ppg_value|floatformat:1 }}</td>
<td>{{ player.rpg_value|floatformat:1 }}</td>
<td>{{ player.apg_value|floatformat:1 }}</td>
{% if request.user.is_authenticated %}
<td>
{% if player.id in favorite_player_ids %}
{% include "scouting/partials/favorite_button.html" with player=player is_favorite=True next_url=request.get_full_path %}
{% else %}
{% include "scouting/partials/favorite_button.html" with player=player is_favorite=False next_url=request.get_full_path %}
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>