mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
First step of the groups subapp, view groups and request access done
This commit is contained in:
@@ -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>
|
||||
|
||||
14
templates/groups/create_request.html
Normal file
14
templates/groups/create_request.html
Normal 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 %}
|
||||
23
templates/groups/group_list.html
Normal file
23
templates/groups/group_list.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user