statistics.html 2.08 KB
Newer Older
1
{% extends "base.html" %}
2
{% load i18n static compress %}
3

4 5
{% block title %}{% trans "Statistics" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Statistics" %} — {{ block.super }}{% endblock %}
6 7

{% block body %}
8
    <section class="page-section" id="members-statistics" data-statistics="{{ statistics }}">
9 10 11 12 13 14
        <div class="container">
            <h1 class="text-center section-title">{% trans "Statistics" %}</h1>

            <h2 class="text-center mb-4">{% trans "Total amount of Thalia members" %}: {{ total_members }}</h2>

            <div class="row">
15
                <div class="col-lg-6">
16
                    <canvas id="members-type-chart"></canvas>
Luko van der Maas's avatar
Luko van der Maas committed
17
                </div>
18
                <div class="col-lg-6">
19
                    <canvas id="total-year-chart"></canvas>
Luko van der Maas's avatar
Luko van der Maas committed
20
                </div>
21 22 23

                <div class="col-12 mt-2 mb-2">
                    <canvas id="committees-members-chart"></canvas>
Luko van der Maas's avatar
Luko van der Maas committed
24
                </div>
25 26 27 28 29

                <div class="col-12 mb-2">
                    <canvas id="event-category-chart"></canvas>
                </div>

Luko van der Maas's avatar
Luko van der Maas committed
30
                <div class="col-sm-6 col-lg-4">
31
                    <canvas id="pizza-total-type-chart"></canvas>
Luko van der Maas's avatar
Luko van der Maas committed
32
                </div>
33

Luko van der Maas's avatar
Luko van der Maas committed
34
                <div class="col-sm-6 col-lg-4">
35
                    <canvas id="pizza-total-type-chart"></canvas>
Luko van der Maas's avatar
Luko van der Maas committed
36 37
                </div>

38
                {% if current_pizza_orders != 'null' %} {# None is json-serialized to 'null' #}
39 40 41
                    <div class="col-sm-6 col-lg-4">
                            <canvas id="pizza-current-type-chart"></canvas>
                    </div>
42 43 44 45
                {% endif %}
            </div>
        </div>
    </section>
46
{% endblock %}
47

48 49 50
{% block js_body %}
    {{ block.super }}
    {% compress js %}
51 52
        <script type="text/javascript" src="{% static 'members/js/chart.min.js' %}"></script>
        <script type="text/javascript" src="{% static 'members/js/chartjs-plugin-labels.min.js' %}"></script>
53 54
        <script type="text/javascript" src="{% static 'members/js/statistics.js' %}"></script>
    {% endcompress %}
55
{% endblock %}