Revision 9eafaa32 snf-astakos-app/astakos/im/templates/im/astakosuserquota_list.html
b/snf-astakos-app/astakos/im/templates/im/astakosuserquota_list.html | ||
---|---|---|
5 | 5 |
{% block page.body %} |
6 | 6 |
<div class="maincol {% block innerpage.class %}{% endblock %}"> |
7 | 7 |
<div class="section"> |
8 |
{% for k, v in user.quota|items %} |
|
9 |
<strong>{{k}}</strong> |
|
10 |
<table class="zebra-striped id-sorted"> |
|
11 |
<!-- |
|
12 |
<thead> |
|
13 |
<tr> |
|
14 |
<th>Limit (Group)</th> |
|
15 |
</tr> |
|
16 |
</thead> |
|
17 |
--> |
|
18 |
<tbody> |
|
19 |
{% for m in user.membership_set.select_related.all %} |
|
20 |
{% if m.group.is_enabled %} |
|
21 |
{% with m.group.quota as quota %} |
|
22 |
{% if quota %} |
|
23 |
{% for kk, vv in quota|items %} |
|
24 |
{% if k == kk %} |
|
25 |
<tr> |
|
26 |
<td>{{ vv }} ({{m.group.name}})</td> |
|
27 |
</tr> |
|
28 |
{% endif %} |
|
29 |
{% endfor %} |
|
30 |
{% endif %} |
|
31 |
{% endwith %} |
|
8 |
<form action="" method="post" |
|
9 |
class="withlabels">{% csrf_token %} |
|
10 |
{% include "im/form_render.html" %} |
|
11 |
</form> |
|
12 |
<table> |
|
13 |
{% for q in object_list %} |
|
14 |
{% if q.group.is_enabled %} |
|
15 |
<tr> |
|
16 |
<td>{{ q.uplimit }}</td><td>({{ q.group }})</td> |
|
17 |
</tr> |
|
18 |
{% endif %} |
|
19 |
{% endfor %} |
|
20 |
{% if form.cleaned_data %} |
|
21 |
{% with form.cleaned_data|lookup:'resource' as resource %} |
|
22 |
{% if resource %} |
|
23 |
{% for q in user.astakosuserquota_set.all %} |
|
24 |
{% if q.resource == resource %} |
|
25 |
<tr> |
|
26 |
<td>{{ q.uplimit }}</td><td>(assigned to me)</td> |
|
27 |
</tr> |
|
32 | 28 |
{% endif %} |
33 | 29 |
{% endfor %} |
34 |
<tr>
|
|
35 |
<td><strong>{{ v }}</strong></td>
|
|
36 |
</tr>
|
|
37 |
<tr/>
|
|
38 |
</tbody>
|
|
39 |
</table>
|
|
40 |
{% endfor %}
|
|
30 |
<tr> |
|
31 |
<td>{{ user.quota|lookup:resource }}</td><td>(total)</td>
|
|
32 |
</tr> |
|
33 |
{% endif %}
|
|
34 |
{% endwith %}
|
|
35 |
{% endif %}
|
|
36 |
</table>
|
|
41 | 37 |
</div> |
42 | 38 |
</div> |
43 | 39 |
{% endblock %} |
Also available in: Unified diff