First step of the groups subapp, view groups and request access done

This commit is contained in:
2010-10-21 16:27:47 +01:00
parent 3b568f3156
commit f555e85e3d
14 changed files with 332 additions and 7 deletions

View File

@@ -16,20 +16,23 @@
</div>
<div id="navigation">
<ul>
<li><a href="{% url sso.views.index %}">Home</a></li>
<li><a href="{% url sso.views.index %}">Home</a></li>
{% if request.user %}
<li><a href="{% url sso.views.profile %}">Profile</a></li>
{% if "hr"|installed %}
<li><a href="{% url hr.views.index %}">HR</a></li>
<li><a href="{% url sso.views.profile %}">Profile</a></li>
{% if "groups"|installed %}
<li><a href="{% url groups.views.index %}">Groups</a></li>
{% endif %}
<li><a href="{% url sso.views.characters %}">Characters</a></li>
{% if "hr"|installed %}
<li><a href="{% url hr.views.index %}">HR</a></li>
{% endif %}
<li><a href="{% url sso.views.characters %}">Characters</a></li>
{% if request.user.is_staff %}
<li><a href="{% url sso.views.user_lookup %}">Lookup User</a></li>
<li><a href="/admin">Admin</a></li>
{% endif %}
<li><a href="{% url django.contrib.auth.views.logout %}">Logout</a></li>
<li><a href="{% url django.contrib.auth.views.logout %}">Logout</a></li>
{% else %}
<li><a href="{% url django.contrib.auth.views.login %}">Login</a></li>
<li><a href="{% url django.contrib.auth.views.login %}">Login</a></li>
{% endif %}
</ul>
</div>

View File

@@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block title %}Create a Membership Request{% endblock %}
{% block content %}
<p>Please fill in a reason why you like to be a member of this group and any supporting evidence as requested by the group adminship</p>
<form action="{% url groups.views.create_request groupid %}" method="post">
<table>
{{ form.as_table }}
</table>
<input type="submit" value="Create Request" />
</form>
{% endblock %}

View File

@@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
<h1>Groups List</h1>
<p>This is the list of your current groups, and groups you can request to be a member of.</p>
<table>
{% if group_list %}
<tr><th>Group Name</th><th>Status</th><th>Actions</th></tr>
{% for id, group, status, requestable in group_list %}
<tr><td>{{ group }}</td>
<td>{{ status }}</td>
<td>{% ifequal status None %}{% if requestable %}<a href="{% url groups.views.create_request id %}">Request Membership</a>{% endif %}{% endifequal %}</td>
</tr>
{% endfor %}
</table>
{% else %}
<b>No groups are available.</b>
{% endif %}
{% endblock %}