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,37 @@
{% if saved_searches %}
<div class="table-wrap mt-16">
<table>
<thead>
<tr>
<th>Name</th>
<th>Visibility</th>
<th>Updated</th>
<th>Last run</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for saved_search in saved_searches %}
<tr>
<td>{{ saved_search.name }}</td>
<td>{% if saved_search.is_public %}Public{% else %}Private{% endif %}</td>
<td>{{ saved_search.updated_at|date:"Y-m-d H:i" }}</td>
<td>{{ saved_search.last_run_at|date:"Y-m-d H:i"|default:"-" }}</td>
<td>
<div class="row-gap">
<a class="button ghost" href="{% url 'scouting:saved_search_run' saved_search.pk %}">Run</a>
<a class="button ghost" href="{% url 'scouting:saved_search_edit' saved_search.pk %}">Edit</a>
<form method="post" action="{% url 'scouting:saved_search_delete' saved_search.pk %}">
{% csrf_token %}
<button class="button ghost" type="submit">Delete</button>
</form>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p class="mt-16">No saved searches yet.</p>
{% endif %}