Reformatted code for easy reading.

This commit is contained in:
Raynaldo Rivera
2014-10-26 16:47:21 -07:00
parent 6e99823252
commit 19e19d89e4
97 changed files with 22820 additions and 10377 deletions

View File

@@ -7,53 +7,53 @@
{% 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>
<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>
{% 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 %}