|
1
|
<div id="member-table"> |
|
2
|
<div class="overflow-x-auto rounded-lg border border-gray-700 bg-gray-800 shadow-sm"> |
|
3
|
<table class="min-w-full divide-y divide-gray-700"> |
|
4
|
<thead class="bg-gray-900/80"> |
|
5
|
<tr> |
|
6
|
<th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-400">Username</th> |
|
7
|
<th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-400">Email</th> |
|
8
|
<th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-400">Role</th> |
|
9
|
<th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-400">Status</th> |
|
10
|
<th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-400">Joined</th> |
|
11
|
<th class="px-6 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-400">Actions</th> |
|
12
|
</tr> |
|
13
|
</thead> |
|
14
|
<tbody class="divide-y divide-gray-700/70 bg-gray-800"> |
|
15
|
{% for membership in members %} |
|
16
|
<tr class="hover:bg-gray-700/40 transition-colors"> |
|
17
|
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium"> |
|
18
|
<a href="{% url 'organization:user_detail' username=membership.member.username %}" class="text-brand-light hover:text-brand">{{ membership.member.username }}</a> |
|
19
|
</td> |
|
20
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-400">{{ membership.member.email|default:"—" }}</td> |
|
21
|
<td class="px-6 py-4 whitespace-nowrap text-sm"> |
|
22
|
{% if membership.role %} |
|
23
|
<a href="{% url 'organization:role_detail' slug=membership.role.slug %}" class="inline-flex rounded-full bg-purple-900/50 px-2 text-xs font-semibold leading-5 text-purple-300 hover:text-purple-200">{{ membership.role.name }}</a> |
|
24
|
{% else %} |
|
25
|
<span class="text-gray-500">--</span> |
|
26
|
{% endif %} |
|
27
|
</td> |
|
28
|
<td class="px-6 py-4 whitespace-nowrap"> |
|
29
|
{% if membership.is_active %} |
|
30
|
<span class="inline-flex rounded-full bg-green-900/50 px-2 text-xs font-semibold leading-5 text-green-300">Active</span> |
|
31
|
{% else %} |
|
32
|
<span class="inline-flex rounded-full bg-gray-700 px-2 text-xs font-semibold leading-5 text-gray-300">Inactive</span> |
|
33
|
{% endif %} |
|
34
|
</td> |
|
35
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-400">{{ membership.created_at|date:"N j, Y" }}</td> |
|
36
|
<td class="px-6 py-4 whitespace-nowrap text-right text-sm"> |
|
37
|
{% if perms.organization.delete_organizationmember %} |
|
38
|
<a href="{% url 'organization:member_remove' username=membership.member.username %}" class="text-red-400 hover:text-red-300">Remove</a> |
|
39
|
{% endif %} |
|
40
|
</td> |
|
41
|
</tr> |
|
42
|
{% empty %} |
|
43
|
<tr> |
|
44
|
<td colspan="6" class="px-6 py-8 text-center text-sm text-gray-400">No members found.</td> |
|
45
|
</tr> |
|
46
|
{% endfor %} |
|
47
|
</tbody> |
|
48
|
</table> |
|
49
|
</div> |
|
50
|
</div> |
|
51
|
|