38 lines
1.4 KiB
HTML
38 lines
1.4 KiB
HTML
{% if saved_searches %}
|
|
<div class="table-wrap mt-4">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Visibility</th>
|
|
<th>Updated</th>
|
|
<th>Last run</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-100 bg-white">
|
|
{% for saved_search in saved_searches %}
|
|
<tr>
|
|
<td class="font-medium text-slate-800">{{ 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="flex flex-wrap gap-2">
|
|
<a class="btn-secondary" href="{% url 'scouting:saved_search_run' saved_search.pk %}">Run</a>
|
|
<a class="btn-secondary" 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="btn-secondary" type="submit">Delete</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="empty-state mt-4">No saved searches yet.</div>
|
|
{% endif %}
|