mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-20 01:32:31 +02:00
# One Thousandth Commit 🎉 🎈 🎆 🍾 * Allow requiring API ownership validation by SSO. Closes #163 * Add Discourse group name length restrictions. * Redirect after api addition/deletion of main character * Correct admin searching for removed discourse_username field in AuthServicesInfo * Correct admin function to sync user Discourse groups * Beautify tables by removing borders and hiding when empty. *Add buttons on dead-end pages to return to originating view.
63 lines
2.7 KiB
HTML
63 lines
2.7 KiB
HTML
{% extends "public/base.html" %}
|
|
{% load staticfiles %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}Alliance Auth{% endblock %}
|
|
|
|
{% block page_title %}{% trans "Available" %}{% endblock page_title %}
|
|
{% block extra_css %}{% endblock extra_css %}
|
|
|
|
{% block content %}
|
|
<div class="col-lg-12">
|
|
<h1 class="page-header text-center">{% trans "Available Groups" %}</h1>
|
|
{% if STATE == MEMBER_STATE or user.is_superuser %}
|
|
{% if pairs %}
|
|
<table class="table">
|
|
<tr>
|
|
<th class="text-center">{% trans "GroupName" %}</th>
|
|
<th class="text-center">{% trans "GroupDesc" %}</th>
|
|
<th class="text-center">{% trans "Action" %}</th>
|
|
</tr>
|
|
|
|
{% for pair in pairs %}
|
|
<tr>
|
|
<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="{% url 'auth_group_request_leave' pair.0.id %}" class="btn btn-danger">
|
|
{% trans "Leave" %}
|
|
</a>
|
|
{% else %}
|
|
<button type="button" class="btn btn-primary" disabled>
|
|
{{ pair.2.status }}
|
|
</button>
|
|
{% endif %}
|
|
{% elif pair.2 == "" %}
|
|
<a href="{% url 'auth_group_request_add' pair.0.id %}" class="btn btn-success">
|
|
{% trans "Request" %}
|
|
</a>
|
|
{% else %}
|
|
<button type="button" class="btn btn-primary" disabled>
|
|
{{ pair.2.status }}
|
|
</button>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% else %}
|
|
<div class="alert alert-warning text-center">No groups available.</div>
|
|
{% endif %}
|
|
{% else %}
|
|
{% if IS_CORP %}
|
|
<div class="alert alert-danger" role="alert">{% trans "You are not in the corporation." %}</div>
|
|
{% else %}
|
|
<div class="alert alert-danger" role="alert">{% trans "You are not in the alliance." %}</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% endblock content %}
|