Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / templates / im / astakosuserquota_list.html @ 1b866d9e

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
<!-- 
39
                    <thead>
40
                      <tr>
41
                        <th>Limit (Group)</th>
42
                      </tr>
43
                    </thead>
44
 -->
45
 <!--
46
                    <tbody>
47
                    {% for m in user.membership_set.select_related.all %}
48
                        {% if m.group.is_enabled %}
49
                            {% with m.group.quota as quota %}
50
                            {% if  quota %}
51
                                {% for kk, vv in quota|items %}
52
                                    {% if k == kk %}
53
                                    <tr>
54
                                        <td>{{ vv }} ({{m.group.name}})</td>
55
                                    </tr>
56
                                    {% endif %}
57
                                {% endfor %}
58
                            {% endif %}
59
                            {% endwith %}
60
                        {% endif %}
61
                    {% endfor %}
62
                                    <tr>
63
                                        <td><strong>{{ v }}</strong></td>
64
                                    </tr>
65
                                    <tr/>
66
                    </tbody>
67
                </table>
68
            {% endfor %}
69
    </div>
70
        <form action="" method="post"
71
                    class="withlabels">{% csrf_token %}
72
                    {% include "im/form_render.html" %}
73
            </form>
74
            <table>
75
            {% for q in object_list %}
76
                {% if q.group.is_enabled %}
77
                    <tr>
78
                        <td>{{ q.uplimit }}</td><td>({{ q.group }})</td>
79
                    </tr>
80
                {% endif %}
81
            {% endfor %}
82
            {% if form.cleaned_data %}
83
            {% with form.cleaned_data|lookup:'resource' as resource %}
84
                {% if resource %}
85
                    {% for q in user.astakosuserquota_set.all %}
86
                        {% if q.resource == resource %}
87
                        <tr>
88
                            <td>{{ q.uplimit }}</td><td>(assigned to me)</td>
89
                        </tr>
90
                        {% endif %}
91
                    {% endfor %}
92
                        <tr>
93
                            <td>{{ user.quota|lookup:resource }}</td><td>(total)</td>
94
                        </tr>
95
                {% endif %}
96
            {% endwith %}
97
        {% endif %}
98
            </table>-->
99
    </div>
100
</div>
101
{% endblock %}