Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / templates / im / astakosuserquota_list.html @ 52343ac8

History | View | Annotate | Download (3.3 kB)

1
{% extends "im/account_base.html" %}
2

    
3
{% load filters %}
4

    
5
{% block page.body %}
6
<div class="maincol {% block innerpage.class %}{% endblock %}">
7
    <div class="stats clearfix">
8
                <ul>
9
                        {% for r in data.resources %}
10
                         
11
                    <li class="clearfix  {{ r.load_class }} {{ r.name}}">
12
                            <div class="img-wrap">&nbsp;</div>
13
                            <div class="info">
14
                                    <h3>{{ r.description }}</h3>
15
                                    <p>
16
                                            {{ r.ratio|floatformat }}% Used<br>
17
                                            You are using {{ r.currValue }} {{ r.unit }} out of your {{ r.maxValue }}{{ r.unit }} {{ r.plural|capfirst }} - Aouch!
18
                                    </p>
19
                            </div>
20
                            <div class="bar">
21
                                    <div><span style="width:{{ r.ratio|floatformat }}%;">{{ r.ratio|floatformat }}% &nbsp;&nbsp;</span></div>
22
                            </div>
23
                    </li>
24
                    {% endfor %}
25
            </ul>
26
    </div>    
27
    <!--
28
    <div class="section">
29
            {% for k, v in user.quota|items %}
30
                <strong>{{k}}</strong>
31
                <table class="zebra-striped id-sorted">
32
<!-- 
33
                    <thead>
34
                      <tr>
35
                        <th>Limit (Group)</th>
36
                      </tr>
37
                    </thead>
38
 -->
39
 <!--
40
                    <tbody>
41
                    {% for m in user.membership_set.select_related.all %}
42
                        {% if m.group.is_enabled %}
43
                            {% with m.group.quota as quota %}
44
                            {% if  quota %}
45
                                {% for kk, vv in quota|items %}
46
                                    {% if k == kk %}
47
                                    <tr>
48
                                        <td>{{ vv }} ({{m.group.name}})</td>
49
                                    </tr>
50
                                    {% endif %}
51
                                {% endfor %}
52
                            {% endif %}
53
                            {% endwith %}
54
                        {% endif %}
55
                    {% endfor %}
56
                                    <tr>
57
                                        <td><strong>{{ v }}</strong></td>
58
                                    </tr>
59
                                    <tr/>
60
                    </tbody>
61
                </table>
62
            {% endfor %}
63
    </div>
64
        <form action="" method="post"
65
                    class="withlabels">{% csrf_token %}
66
                    {% include "im/form_render.html" %}
67
            </form>
68
            <table>
69
            {% for q in object_list %}
70
                {% if q.group.is_enabled %}
71
                    <tr>
72
                        <td>{{ q.uplimit }}</td><td>({{ q.group }})</td>
73
                    </tr>
74
                {% endif %}
75
            {% endfor %}
76
            {% if form.cleaned_data %}
77
            {% with form.cleaned_data|lookup:'resource' as resource %}
78
                {% if resource %}
79
                    {% for q in user.astakosuserquota_set.all %}
80
                        {% if q.resource == resource %}
81
                        <tr>
82
                            <td>{{ q.uplimit }}</td><td>(assigned to me)</td>
83
                        </tr>
84
                        {% endif %}
85
                    {% endfor %}
86
                        <tr>
87
                            <td>{{ user.quota|lookup:resource }}</td><td>(total)</td>
88
                        </tr>
89
                {% endif %}
90
            {% endwith %}
91
        {% endif %}
92
            </table>-->
93
    </div>
94
</div>
95
{% endblock %}