Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (3.4 kB)

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