Commit e527cd34 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Only display members list to project owners

parent 3bbf1519
......@@ -9,7 +9,7 @@
<h2>
<em>
{% if user == object.owner %}
{% if user_owns_project %}
[ ADMINISTRATOR - {{ object.state|upper }} ]
{% else %}
{% if user in approve_members %}
......@@ -117,28 +117,31 @@
{% else %}
<p>No resources</p>
{% endif %}
</div>
{% if object.project.is_alive %}
<div class="full-dotted">
<h3>MEMBERS</h3>
{% if members_table %}
{% render_table members_table %}
{% endif %}
</div>
<div class="full-dotted">
<form action="{% url project_detail object.id %}#members-table" method="post" class="withlabels" >{% csrf_token %}
<h2>Enroll more members</h2>
{% with addmembers_form as form %}
{% include "im/form_render.html" %}
{% endwith %}
<div class="form-row submit">
<input type="submit" class="submit altcol" value="ADD MEMBERS" />
</div>
</form>
</div>
{% if user_owns_project %}
{% if object.project.is_alive %}
<div class="full-dotted">
<h3>MEMBERS</h3>
{% if members_table %}
{% render_table members_table %}
{% endif %}
</div>
<div class="full-dotted">
<form action="{% url project_detail object.id %}#members-table" method="post" class="withlabels" >{% csrf_token %}
<h2>Enroll more members</h2>
{% with addmembers_form as form %}
{% include "im/form_render.html" %}
{% endwith %}
<div class="form-row submit">
<input type="submit" class="submit altcol" value="ADD MEMBERS" />
</div>
</form>
</div>
{% endif %}
{% endif %}
<div class="full-dotted">
<p>
......
......@@ -1138,7 +1138,8 @@ def project_detail(request, application_id):
template_name='im/projects/project_detail.html',
extra_context={
'addmembers_form':addmembers_form,
'members_table': members_table
'members_table': members_table,
'user_owns_project': request.user.owns_project(application)
})
@require_http_methods(["GET", "POST"])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment