mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-09 00:26:20 +01:00
Added group management
This commit is contained in:
@@ -65,6 +65,9 @@
|
||||
<li>
|
||||
<a {% ifequal request.path "/api_key_management/" %} class="active" {% endifequal %} href="{% url 'auth_api_key_management' %}"><i class="fa fa-key fa-fw"></i> Api Keys</a>
|
||||
</li>
|
||||
<li>
|
||||
<a {% ifequal request.path "/groups/" %} class="active" {% endifequal %} href="{% url 'auth_groups' %}"><i class="fa fa-cogs fa-sitemap"></i> Groups</a>
|
||||
</li>
|
||||
<li>
|
||||
<a {% ifequal request.path "/services/" %} class="active" {% endifequal %} href="{% url 'auth_services' %}"><i class="fa fa-cogs fa-fw"></i> Services</a>
|
||||
</li>
|
||||
@@ -78,6 +81,11 @@
|
||||
<li>
|
||||
<a {% ifequal request.path "/user/password/" %} class="active" {% endifequal %} href="{% url 'password_change' %}"><i class="fa fa-lock fa-fw"></i>Change Password</a>
|
||||
</li>
|
||||
{% if perms.auth.group_management %}
|
||||
<li>
|
||||
<a {% ifequal request.path "/user/group_management/" %} class="active" {% endifequal %} href="{% url 'auth_group_management' %}"><i class="fa fa-lock fa-sitemap"></i> Group Management</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Something something here{% endblock page_title %}
|
||||
{% block page_title %}Add Api Key{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Something something here{% endblock page_title %}
|
||||
{% block page_title %}API Key Management{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Something something here{% endblock page_title %}
|
||||
{% block page_title %}Characters{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
75
templates/registered/groupmanagement.html
Normal file
75
templates/registered/groupmanagement.html
Normal file
@@ -0,0 +1,75 @@
|
||||
{% extends "public/base.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Groups Management{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header text-center">Group Management</h3>
|
||||
<h4 class="page-header text-center">Group Add Request</h4>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="text-center">RequestID</th>
|
||||
<th class="text-center">CharacterName</th>
|
||||
<th class="text-center">GroupName</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
|
||||
{% for acceptrequest in acceptrequests %}
|
||||
<tr>
|
||||
<td class="text-center">{{ acceptrequest.id }}</td>
|
||||
<td class="text-center">{{ acceptrequest.main_char.character_name }}</td>
|
||||
<td class="text-center">{{ acceptrequest.group.name }}</td>
|
||||
<td class="text-center">
|
||||
<a href="/group/request/accept/{{ acceptrequest.id }}">
|
||||
<button type="button" class="btn btn-success">
|
||||
Accept
|
||||
</button>
|
||||
</a>
|
||||
|
||||
<a href="/group/request/reject/{{ acceptrequest.id }}">
|
||||
<button type="button" class="btn btn-danger">
|
||||
Reject
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<h4 class="page-header text-center">Group Leave Request</h4>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="text-center">RequestID</th>
|
||||
<th class="text-center">CharacterName</th>
|
||||
<th class="text-center">GroupName</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
|
||||
{% for leaverequest in leaverequests %}
|
||||
<tr>
|
||||
<td class="text-center">{{ leaverequest.id }}</td>
|
||||
<td class="text-center">{{ leaverequest.main_char.character_name }}</td>
|
||||
<td class="text-center">{{ leaverequest.group.name }}</td>
|
||||
<td class="text-center">
|
||||
<a href="/group/leave_request/accept/{{ leaverequest.id }}">
|
||||
<button type="button" class="btn btn-success">
|
||||
Accept
|
||||
</button>
|
||||
</a>
|
||||
|
||||
<a href="/group/leave_request/reject/{{ leaverequest.id }}">
|
||||
<button type="button" class="btn btn-danger">
|
||||
Reject
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
59
templates/registered/groups.html
Normal file
59
templates/registered/groups.html
Normal file
@@ -0,0 +1,59 @@
|
||||
{% extends "public/base.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Available{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">Available Groups</h1>
|
||||
{% if perms.auth.alliance_member %}
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="text-center">GroupID</th>
|
||||
<th class="text-center">GroupName</th>
|
||||
<th class="text-center">GroupDesc</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
|
||||
{% for pair in pairs %}
|
||||
<tr>
|
||||
<td class="text-center">{{ pair.0.id }}</td>
|
||||
<td class="text-center">{{ pair.0.name }}</td>
|
||||
<td class="text-center">{{ pair.1.description }}</td>
|
||||
<td class="text-center">
|
||||
{% if pair.0 in user.groups.all %}
|
||||
{% if pair.2 == ""%}
|
||||
<a href="/group/request_leave/{{pair.0.id}}">
|
||||
<button type="button" class="btn btn-danger">
|
||||
Leave
|
||||
</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-primary" disabled>
|
||||
{{ pair.2.status }}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% elif pair.2 == "" %}
|
||||
<a href="/group/request_add/{{pair.0.id}}">
|
||||
<button type="button" class="btn btn-success">
|
||||
Request
|
||||
</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-primary" disabled>
|
||||
{{ pair.2.status }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-danger" role="alert">You are not in the alliance</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Something something here{% endblock page_title %}
|
||||
{% block page_title %}Services Management{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
@@ -56,6 +56,7 @@
|
||||
</a>
|
||||
{% endifequal %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">Mumble</td>
|
||||
<td class="text-center">{{ authinfo.mumble_username }}</td>
|
||||
|
||||
Reference in New Issue
Block a user