|
1
|
<div id="project-team-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">Team</th> |
|
7
|
<th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-400">Role</th> |
|
8
|
<th class="px-6 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-400">Actions</th> |
|
9
|
</tr> |
|
10
|
</thead> |
|
11
|
<tbody class="divide-y divide-gray-700/70 bg-gray-800"> |
|
12
|
{% for pt in project_teams %} |
|
13
|
<tr class="hover:bg-gray-700/40 transition-colors"> |
|
14
|
<td class="px-6 py-4 whitespace-nowrap"> |
|
15
|
<a href="{% url 'organization:team_detail' slug=pt.team.slug %}" class="text-brand-light hover:text-brand font-medium"> |
|
16
|
{{ pt.team.name }} |
|
17
|
</a> |
|
18
|
</td> |
|
19
|
<td class="px-6 py-4 whitespace-nowrap"> |
|
20
|
{% if pt.role == "admin" %} |
|
21
|
<span class="inline-flex rounded-full bg-purple-900/50 px-2 text-xs font-semibold leading-5 text-purple-300">Admin</span> |
|
22
|
{% elif pt.role == "write" %} |
|
23
|
<span class="inline-flex rounded-full bg-blue-900/50 px-2 text-xs font-semibold leading-5 text-blue-300">Write</span> |
|
24
|
{% else %} |
|
25
|
<span class="inline-flex rounded-full bg-gray-700 px-2 text-xs font-semibold leading-5 text-gray-300">Read</span> |
|
26
|
{% endif %} |
|
27
|
</td> |
|
28
|
<td class="px-6 py-4 whitespace-nowrap text-right text-sm space-x-3"> |
|
29
|
{% if perms.projects.change_project %} |
|
30
|
<a href="{% url 'projects:team_edit' slug=project.slug team_slug=pt.team.slug %}" class="text-brand-light hover:text-brand">Edit</a> |
|
31
|
<a href="{% url 'projects:team_remove' slug=project.slug team_slug=pt.team.slug %}" class="text-red-400 hover:text-red-300">Remove</a> |
|
32
|
{% endif %} |
|
33
|
</td> |
|
34
|
</tr> |
|
35
|
{% empty %} |
|
36
|
<tr> |
|
37
|
<td colspan="3" class="px-6 py-8 text-center text-sm text-gray-400">No teams assigned.</td> |
|
38
|
</tr> |
|
39
|
{% endfor %} |
|
40
|
</tbody> |
|
41
|
</table> |
|
42
|
</div> |
|
43
|
</div> |
|
44
|
|