2019-04-14 15:40:08 +00:00
|
|
|
{% load duration i18n %}
|
2017-11-11 12:01:04 +00:00
|
|
|
|
2021-05-14 03:28:39 +00:00
|
|
|
{% if not empty or not hide_empty %}
|
|
|
|
<div class="card card-dashboard card-statistics">
|
|
|
|
<div class="card-header">
|
2021-08-30 01:58:25 +00:00
|
|
|
<i class="icon-graph pull-left" aria-hidden="true"></i>
|
2021-05-14 03:28:39 +00:00
|
|
|
{% trans "Statistics" %}
|
|
|
|
</div>
|
|
|
|
<div class="card-body text-center">
|
|
|
|
{% if stats|length > 0 %}
|
2023-03-25 19:57:12 +00:00
|
|
|
<div id="statistics-carousel" class="carousel slide" data-bs-interval="false">
|
2021-05-14 03:28:39 +00:00
|
|
|
<div class="carousel-inner">
|
|
|
|
{% for stat in stats %}
|
|
|
|
<div class="carousel-item{% if forloop.counter == 1 %} active{% endif %}">
|
|
|
|
<span class="card-title">
|
|
|
|
{% if stat.stat %}
|
|
|
|
{% if stat.type == 'duration' %}
|
|
|
|
{{ stat.stat|duration_string:'m' }}
|
|
|
|
{% elif stat.type == 'float' %}
|
|
|
|
{{ stat.stat|floatformat }}
|
|
|
|
{% else %}
|
|
|
|
{{ stat.stat }}
|
|
|
|
{% endif %}
|
2017-11-11 12:01:04 +00:00
|
|
|
{% else %}
|
2021-05-14 03:28:39 +00:00
|
|
|
<em>{% trans "Not enough data" %}</em>
|
2017-11-11 12:01:04 +00:00
|
|
|
{% endif %}
|
2021-05-14 03:28:39 +00:00
|
|
|
</span>
|
|
|
|
<div class="card-text">{{ stat.title }}</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2023-03-25 19:57:12 +00:00
|
|
|
<a class="carousel-control-prev"
|
|
|
|
href="#statistics-carousel"
|
|
|
|
role="button"
|
|
|
|
data-bs-slide="prev">
|
2021-05-14 03:28:39 +00:00
|
|
|
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
2023-03-25 19:57:12 +00:00
|
|
|
<span class="visually-hidden">{% trans "Previous" %}</span>
|
2021-05-14 03:28:39 +00:00
|
|
|
</a>
|
2023-03-25 19:57:12 +00:00
|
|
|
<a class="carousel-control-next"
|
|
|
|
href="#statistics-carousel"
|
|
|
|
role="button"
|
|
|
|
data-bs-slide="next">
|
2021-05-14 03:28:39 +00:00
|
|
|
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
2023-03-25 19:57:12 +00:00
|
|
|
<span class="visually-hidden">{% trans "Next" %}</span>
|
2021-05-14 03:28:39 +00:00
|
|
|
</a>
|
2017-11-11 12:01:04 +00:00
|
|
|
</div>
|
2021-05-14 03:28:39 +00:00
|
|
|
{% else %}
|
|
|
|
<span class="card-title"><strong>{% trans "No data yet" %}</strong></span>
|
|
|
|
{% endif %}
|
2017-11-11 12:01:04 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-05-14 03:28:39 +00:00
|
|
|
{% endif %}
|