|
1
|
{% extends "base.html" %} |
|
2
|
{% block title %}Members — Fossilrepo{% endblock %} |
|
3
|
|
|
4
|
{% block content %} |
|
5
|
<div class="mb-6"> |
|
6
|
<a href="{% url 'organization:settings' %}" class="text-sm text-brand-light hover:text-brand">← Back to Settings</a> |
|
7
|
</div> |
|
8
|
|
|
9
|
<div class="md:flex md:items-center md:justify-between mb-6"> |
|
10
|
<h1 class="text-2xl font-bold text-gray-100">Members</h1> |
|
11
|
<div class="mt-4 md:mt-0 flex gap-3"> |
|
12
|
{% if perms.organization.change_organization or user.is_superuser %} |
|
13
|
<a href="{% url 'organization:user_create' %}" |
|
14
|
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"> |
|
15
|
Create User |
|
16
|
</a> |
|
17
|
{% endif %} |
|
18
|
{% if perms.organization.add_organizationmember %} |
|
19
|
<a href="{% url 'organization:member_add' %}" |
|
20
|
class="inline-flex items-center rounded-md bg-gray-700 px-4 py-2 text-sm font-semibold text-gray-100 shadow-sm ring-1 ring-inset ring-gray-600 hover:bg-gray-600"> |
|
21
|
Add Existing Member |
|
22
|
</a> |
|
23
|
{% endif %} |
|
24
|
</div> |
|
25
|
</div> |
|
26
|
|
|
27
|
<div class="mb-4 search-wrap max-w-md"> |
|
28
|
<input type="search" |
|
29
|
name="search" |
|
30
|
value="{{ search }}" |
|
31
|
placeholder="Search members..." |
|
32
|
aria-label="Search members" |
|
33
|
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" |
|
34
|
hx-get="{% url 'organization:members' %}" |
|
35
|
hx-trigger="input changed delay:300ms, search" |
|
36
|
hx-target="#member-table" |
|
37
|
hx-swap="outerHTML" |
|
38
|
hx-push-url="true" |
|
39
|
hx-indicator="closest .search-wrap" /> |
|
40
|
<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> |
|
41
|
</div> |
|
42
|
|
|
43
|
{% include "organization/partials/member_table.html" %} |
|
44
|
{% include "includes/_pagination.html" %} |
|
45
|
{% endblock %} |
|
46
|
|