summaryrefslogtreecommitdiff
path: root/jimbrella/templates/admin/index.html
blob: 50b88ae89d717ec2dfca3359a1d598269acf21f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html>
    <head>
        <title>JI Umbrella</title>
        <link rel="stylesheet" href="/static/jimbrella.css" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
    </head>
    <body>
        <h1>JI Umbrella Overview</h1>
        <div id="container">
            {% include "admin/tabs.html" %}
            <!--Takes up full width of container-->
            <div class="banner-container">
                {% if overdue %}
                    <div class="banner overdue">
                        <h2 class="banner-heading">Overdue</h2>
                        <span class="proportion">
                            <strong class="big">{{ overdue|length }}</strong> / {{ umbrellas|length }}
                        </span>
                        <div class="table-container">
                        {% if mobile %}
                            <table class="data">
                                {% for umb in overdue %}
                                <tr class="{{ umb.status }}">
                                    <th class="big far" rowspan=4>#{{ umb.id }}</th>
                                    <td>{{ umb.tenant_name }}</td>
                                </tr>
                                <tr class="{{ umb.status }}"><td>{{ umb.tenant_phone }}</td></tr>
                                <tr class="{{ umb.status }}"><td>{{ umb.lent_at }}</td></tr>
                                <tr class="{{ umb.status }}"><td>{{ umb.lent_time_ago }}</td></tr>
                                {% endfor %}
                            </table>
                        {% else %}
                            <table class="data">
                                <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>Tenant</th>
                                        <th>Phone</th>
                                        <th>Lent</th>
                                    </tr>
                                </thead>
                                <tbody>
                                {% for umb in overdue %}
                                    <tr>
                                        <td>{{ umb.id }}</td>
                                        <td>{{ umb.tenant_name }}</td>
                                        <td>{{ umb.tenant_phone }}</td>
                                        <td>{{ umb.lent_time_ago }}</td>
                                    </tr>
                                {% endfor %}
                                </tbody>
                            </table>
                        {% endif %}
                        </div>
                    </div>
                {% endif %}
            </div>
            <!--Tiles displaying minimal data-->
            <div class="tile-container">
                <div class="tile lent">
                    <h2 class="tile-heading">Lent</h2>
                    <span class="proportion">
                        <strong class="big">{{ lent|length }}</strong> / {{ umbrellas|length }}
                    </span>
                </div>
                <div class="tile available">
                    <h2 class="tile-heading">Available</h2>
                    <span class="proportion">
                        <strong class="big">{{ available|length }}</strong> / {{ umbrellas|length }}
                    </span>
                </div>
            </div>
        </div>
    </body>
</html>