|
1
|
{% extends "base.html" %} |
|
2
|
{% block title %}Projects — Fossilrepo{% endblock %} |
|
3
|
|
|
4
|
{% block content %} |
|
5
|
<div class="flex flex-wrap items-center justify-between gap-4 mb-6"> |
|
6
|
<h1 class="text-2xl font-bold text-gray-100">Projects</h1> |
|
7
|
{% if perms.projects.add_project %} |
|
8
|
<a href="{% url 'projects:create' %}" |
|
9
|
class="inline-flex items-center rounded-md bg-brand px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-brand-hover focus:outline-none focus:ring-2 focus:ring-brand focus:ring-offset-2 focus:ring-offset-gray-950 transition-colors"> |
|
10
|
New Project |
|
11
|
</a> |
|
12
|
{% endif %} |
|
13
|
</div> |
|
14
|
|
|
15
|
<div class="mb-4 search-wrap max-w-md"> |
|
16
|
<input type="search" |
|
17
|
name="search" |
|
18
|
value="{{ search }}" |
|
19
|
placeholder="Search projects..." |
|
20
|
aria-label="Search projects" |
|
21
|
class="w-full rounded-md border-gray-700 bg-gray-800 text-gray-100 shadow-sm focus:border-brand focus:ring-brand sm:text-sm" |
|
22
|
hx-get="{% url 'projects:list' %}" |
|
23
|
hx-trigger="input changed delay:300ms, search" |
|
24
|
hx-target="#project-table" |
|
25
|
hx-swap="outerHTML" |
|
26
|
hx-push-url="true" |
|
27
|
hx-indicator="closest .search-wrap" /> |
|
28
|
<svg class="search-spinner animate-spin h-4 w-4" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg> |
|
29
|
</div> |
|
30
|
|
|
31
|
{% include "projects/partials/project_table.html" %} |
|
32
|
{% include "includes/_pagination.html" %} |
|
33
|
{% endblock %} |
|
34
|
|