Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / templates / im / astakosuserquota_list.html @ 279d6e51

History | View | Annotate | Download (3.4 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 }} 
18
                                            {% if r.maxValue == '1' %}
19
                                                    {{ r.name|capfirst}}
20
                                            {% else %} 
21
                                                    {{ r.plural|capfirst }}
22
                                            {% endif %}
23
                                             - Aouch!
24
                                    </p>
25
                            </div>
26
                            <div class="bar">
27
                                    <div><span style="width:{{ r.ratio|floatformat }}%;">{{ r.ratio|floatformat }}% &nbsp;&nbsp;</span></div>
28
                            </div>
29
                    </li>
30
                    {% endfor %}
31
            </ul>
32
    </div>    
33
    <!--
34
    <div class="section">
35
            {% for k, v in user.quota|items %}
36
                <strong>{{k}}</strong>
37
                <table class="zebra-striped id-sorted">
38
                    <thead>
39
                      <tr>
40
                        <th>Limit (Group)</th>
41
                      </tr>
42
                    </thead>
43
                    <tbody>
44
                    {% for m in user.membership_set.select_related.all %}
45
                        {% if m.group.is_enabled %}
46
                            {% with m.group.quota as quota %}
47
                            {% if  quota %}
48
                                {% for kk, vv in quota|items %}
49
                                    {% if k == kk %}
50
                                    <tr>
51
                                        <td>{{ vv }} ({{m.group.name}})</td>
52
                                    </tr>
53
                                    {% endif %}
54
                                {% endfor %}
55
                            {% endif %}
56
                            {% endwith %}
57
                        {% endif %}
58
                    {% endfor %}
59
                                    <tr>
60
                                        <td><strong>{{ v }}</strong></td>
61
                                    </tr>
62
                                    <tr/>
63
                    </tbody>
64
                </table>
65
            {% endfor %}
66
    </div>
67
        <form action="" method="post"
68
                    class="withlabels">{% csrf_token %}
69
                    {% include "im/form_render.html" %}
70
            </form>
71
            <table>
72
            {% for q in object_list %}
73
                {% if q.group.is_enabled %}
74
                    <tr>
75
                        <td>{{ q.uplimit }}</td><td>({{ q.group }})</td>
76
                    </tr>
77
                {% endif %}
78
            {% endfor %}
79
            {% if form.cleaned_data %}
80
            {% with form.cleaned_data|lookup:'resource' as resource %}
81
                {% if resource %}
82
                    {% for q in user.astakosuserquota_set.all %}
83
                        {% if q.resource == resource %}
84
                        <tr>
85
                            <td>{{ q.uplimit }}</td><td>(assigned to me)</td>
86
                        </tr>
87
                        {% endif %}
88
                    {% endfor %}
89
                        <tr>
90
                            <td>{{ user.quota|lookup:resource }}</td><td>(total)</td>
91
                        </tr>
92
                {% endif %}
93
            {% endwith %}
94
        {% endif %}
95
            </table>-->
96
    </div>
97
</div>
98
{% endblock %}