root / snf-astakos-app / astakos / im / templates / im / astakosgroup_detail.html @ 056ee470
History | View | Annotate | Download (3.2 kB)
1 |
{% extends "im/account_base.html" %} |
---|---|
2 |
|
3 |
{% load filters %} |
4 |
|
5 |
{% block page.body %} |
6 |
<div class="projects"> |
7 |
|
8 |
<h2>
|
9 |
{% if request.user in object.members %} |
10 |
<em>[ ENROLLED ]</em> |
11 |
{% endif %} |
12 |
<span>[ {{object.kind|upper}} ]</span> |
13 |
</h2>
|
14 |
<div class="details"> |
15 |
<p>{{ object.desc }}</p> |
16 |
</div>
|
17 |
<div class="full-dotted"> |
18 |
<h3>DETAILS:</h3> |
19 |
<dl class="alt-style"> |
20 |
<dt>Name</dt> |
21 |
<dd>{{object.name}} </dd> |
22 |
<dt>Type</dt> |
23 |
<dd>{{object.kind|capfirst}} </dd> |
24 |
<dt>Issue date:</dt> |
25 |
<dd>{{object.issue_date|date:"d/m/Y"}} </dd> |
26 |
<dt>Expiration Date</dt> |
27 |
<dd>{{object.expiration_date|date:"d/m/Y"}} </dd> |
28 |
<dt>Modaration</dt> |
29 |
<dd>{% if object.moderation_enabled%}Yes{% else %}No{% endif %}</dd> |
30 |
<dt>Activated</dt> |
31 |
<dd>{% if object.is_enabled %}Yes{% else %}No{% endif %}</dd> |
32 |
<dt>Owner</dt> |
33 |
<dd>{% for o in object.owner.all %}
|
34 |
{% if user == o %} |
35 |
Me |
36 |
{% else%} |
37 |
{{o.realname}} ({{o.email}}) |
38 |
|
39 |
{% endif %} |
40 |
{% endfor %} |
41 |
</dd>
|
42 |
</dl>
|
43 |
</div>
|
44 |
|
45 |
<div class="full-dotted"> |
46 |
<h3>POLICIES:</h3> |
47 |
{% if quota %} |
48 |
<dl class="alt-style"> |
49 |
<dt>Resrouce</dt> |
50 |
<dd>Limit</dd> |
51 |
{% for k in quota|dkeys %} |
52 |
|
53 |
<dt>{{ k }}</dt> |
54 |
<dd>{{ quota|lookup:k }} </dd> |
55 |
|
56 |
{% endfor %} |
57 |
</dl>
|
58 |
{% else %} |
59 |
<p>No policies</p> |
60 |
{% endif %} |
61 |
</div>
|
62 |
<div class="full-dotted"> |
63 |
{% if object.members %} |
64 |
<table class="alt-style table_sorting"> |
65 |
<caption>MEMBERS:</caption> |
66 |
<thead>
|
67 |
<tr>
|
68 |
<th>Email</th> |
69 |
<th>Name</th> |
70 |
<th>Status</th> |
71 |
</tr>
|
72 |
</thead>
|
73 |
<tbody>
|
74 |
{% for m in object.membership_set.all %} |
75 |
<tr>
|
76 |
<td>{{m.person.email}}</td> |
77 |
<td>{{m.person.realname}}</td> |
78 |
{% if m.person in m.group.owner.all %} |
79 |
<td>Owner</td> |
80 |
{% else %} |
81 |
{% if m.is_approved %} |
82 |
<td>Approved</td> |
83 |
{% else %} |
84 |
<td>Pending
|
85 |
{% if user in m.group.owner.all %} |
86 |
<a href="{% url approve_member m.group.id m.person.id %}">Approve</a> |
87 |
<a href="{% url disapprove_member m.group.id m.person.id %}">Disapprove</a> |
88 |
{% endif %} |
89 |
</td>
|
90 |
{% endif %} |
91 |
{% endif %} |
92 |
</tr>
|
93 |
{% endfor %} |
94 |
</tbody>
|
95 |
</table>
|
96 |
{% else %} |
97 |
<p>No members yet!</p> |
98 |
{% endif %} |
99 |
</div>
|
100 |
|
101 |
|
102 |
{% if user in object.owner.all and more_policies %} |
103 |
<div class="full-dotted"> |
104 |
<form action="{% url group_policies_add object.id %}" method="post" class="withlabels">{% csrf_token %} |
105 |
<h2>NEW POLICY</h2> |
106 |
{% include "im/form_render.html" %} |
107 |
<div class="form-row submit"> |
108 |
<input type="submit" class="submit altcol" value="ADD POLICY" /> |
109 |
</div>
|
110 |
</form>
|
111 |
</div>
|
112 |
{% endif %} |
113 |
|
114 |
|
115 |
</div>
|
116 |
{% endblock %} |