2019-04-14 15:40:08 +00:00
|
|
|
{% load duration i18n %}
|
2017-11-11 12:01:04 +00:00
|
|
|
|
|
|
|
<div class="card card-dashboard card-statistics">
|
|
|
|
<div class="card-header">
|
|
|
|
<i class="icon icon-graph pull-left" aria-hidden="true"></i>
|
2019-04-14 15:40:08 +00:00
|
|
|
{% trans "Statistics" %}
|
2017-11-11 12:01:04 +00:00
|
|
|
</div>
|
|
|
|
<div class="card-body text-center">
|
|
|
|
<div id="statistics-carousel" class="carousel slide" data-interval="false">
|
|
|
|
<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 %}
|
|
|
|
{% else %}
|
2019-04-14 15:40:08 +00:00
|
|
|
<em>{% trans "Not enough data" %}</em>
|
2017-11-11 12:01:04 +00:00
|
|
|
{% endif %}
|
|
|
|
</span>
|
|
|
|
<div class="card-text">{{ stat.title }}</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
<a class="carousel-control-prev" href="#statistics-carousel" role="button" data-slide="prev">
|
|
|
|
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
2019-04-14 15:40:08 +00:00
|
|
|
<span class="sr-only">{% trans "Previous" %}</span>
|
2017-11-11 12:01:04 +00:00
|
|
|
</a>
|
|
|
|
<a class="carousel-control-next" href="#statistics-carousel" role="button" data-slide="next">
|
|
|
|
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
2019-04-14 15:40:08 +00:00
|
|
|
<span class="sr-only">{% trans "Next" %}</span>
|
2017-11-11 12:01:04 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|