phase5: add saved searches, watchlist, and authenticated htmx flows
This commit is contained in:
@ -12,7 +12,12 @@
|
||||
· {{ player.inferred_role.name|default:"No inferred role" }}
|
||||
</p>
|
||||
</div>
|
||||
<a class="button ghost" href="{% url 'players:index' %}">Back to search</a>
|
||||
<div class="row-gap">
|
||||
{% if request.user.is_authenticated %}
|
||||
{% include "scouting/partials/favorite_button.html" with player=player is_favorite=is_favorite next_url=request.get_full_path %}
|
||||
{% endif %}
|
||||
<a class="button ghost" href="{% url 'players:index' %}">Back to search</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detail-grid mt-16">
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user