Added required settings and context to render services page.

Added URLs for enabling and disabling Discord.
Added Discord section to services page.
This commit is contained in:
Adarnof
2015-11-30 22:30:18 +00:00
parent 34a27ba885
commit 2da93d4410
4 changed files with 66 additions and 4 deletions

View File

@@ -152,6 +152,32 @@
</td>
</tr>
{% endif %}
{% if ENABLE_BLUE_DISCORD %}
<tr>
<th class="text-center">Service</th>
<th class="text-center">Username</th>
<th class="text-center">User ID</th>
<th class="text-center">Action</th>
</tr>
<tr>
<td class="text-center">Discord</td>
<td class="text-center">{{ authinfo.discord_username }}</td>
<td class="text-center">{{ authinfo.discord_uid }}</td>
<td class="text-center">
{% ifequal authinfo.discord_username "" %}
<a href="{% url 'auth_activate_discord' %}">
<button type="button" class="btn btn-warning"><span
class="glyphicon glyphicon-ok"></span></button>
</a>
{% else %}
<a href="{% url 'auth_deactivate_discord' %}">
<button type="button" class="btn btn-danger"><span
class="glyphicon glyphicon-remove"></span></button>
</a>
{% endifequal %}
</td>
</tr>
{% endif %}
</table>
{% elif perms.auth.member %}
<table class="table table-bordered">
@@ -298,6 +324,32 @@
</td>
</tr>
{% endif %}
{% if ENABLE_AUTH_DISCORD %}
<tr>
<th class="text-center">Service</th>
<th class="text-center">Username</th>
<th class="text-center">User ID</th>
<th class="text-center">Action</th>
</tr>
<tr>
<td class="text-center">Discord</td>
<td class="text-center">{{ authinfo.discord_username }}</td>
<td class="text-center">{{ authinfo.discord_uid }}</td>
<td class="text-center">
{% ifequal authinfo.discord_username "" %}
<a href="{% url 'auth_activate_discord' %}">
<button type="button" class="btn btn-warning"><span
class="glyphicon glyphicon-ok"></span></button>
</a>
{% else %}
<a href="{% url 'auth_deactivate_discord' %}">
<button type="button" class="btn btn-danger"><span
class="glyphicon glyphicon-remove"></span></button>
</a>
{% endifequal %}
</td>
</tr>
{% endif %}
</table>
{% else %}
{% if IS_CORP %}