mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-23 22:59:30 +00:00
Reorganise the file structure into a project tree
This commit is contained in:
45
app/templates/groups/group_admin.html
Normal file
45
app/templates/groups/group_admin.html
Normal file
@@ -0,0 +1,45 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>{{ group.name }}</h2>
|
||||
|
||||
<h3>Members</h3>
|
||||
|
||||
{% if group.user_set.all %}
|
||||
<table>
|
||||
<tr><th>Member Username</th><th>Characters</th><th>Status</th><th>Actions</th></tr>
|
||||
{% for user, chars, status in member_list %}
|
||||
<tr><td><a href="{% url sso.views.user_view user.username %}">{{ user.username }}</a></td>
|
||||
<td>{{ chars }}</td>
|
||||
<td>{{ status }}</td>
|
||||
<td><a href="{% url groups.views.kick_member group.id user.id %}">Kick Member</a>
|
||||
{% if request.user.is_superuser %} <a href="{% url groups.views.promote_member group.id user.id %}">Toggle Admin</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<b>This group has no members</b>
|
||||
{% endif %}
|
||||
|
||||
<h3>Membership Requests</h3>
|
||||
|
||||
{% if requests %}
|
||||
<table>
|
||||
<tr><th>Username</th><th>Reason</th><th>Status</th><th>Created Date</th><th>Actions</th></tr>
|
||||
{% for req in requests %}
|
||||
<tr><td><a href="{% url sso.views.user_view req.user.username %}">{{ req.user }}</a></td>
|
||||
<td>{{ req.reason }}</td>
|
||||
<td>{{ req.get_status_description }}</td>
|
||||
<td>{{ req.created_date }}</td>
|
||||
<td><a href="{% url groups.views.accept_request req.id %}">Accept</a>
|
||||
<a href="{% url groups.views.reject_request req.id %}">Reject</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<b>This group has no outstanding requests</b>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user