122 lines
5.2 KiB
HTML
122 lines
5.2 KiB
HTML
{% extends "base.html" %}
|
||
|
||
{% block page_title %}Dashboard{% endblock %}
|
||
|
||
{% block content %}
|
||
|
||
<div class="row">
|
||
<div class="col-md-9">
|
||
<div class="card">
|
||
<div class="card-header">
|
||
<h4 class=""><i class="icon-primary fal fa-laugh-wink"></i> Hi {{ user.username }} !</h4>
|
||
</div>
|
||
<div class="card-body">
|
||
Welcome to Ultron v0.31 <span class="text-muted">(last update : 19-12-2021)</span><br />
|
||
This application is there to help us manage the gymnasts (evolution, evaluation, ...). It is not perfect so feel free to make improvement proposals, bug reports, … by sending me an <a href="mailto:gregory@flyingacrobaticstrampoline.be">email</a>.
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<div class="card">
|
||
<div class="card-header">
|
||
<h4><i class="fal fa-chart-area"></i> Statistics</h4>
|
||
</div>
|
||
<div class="card-body">
|
||
<div class="w-lg m-x-auto">
|
||
<div class="progress-container progress-primary">
|
||
<div class="progress">
|
||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: {{ percentage_week }}%;"></div>
|
||
</div>
|
||
</div>
|
||
{% if nb_gymnast or nb_event or nb_skill or nb_routine or nb_score %}
|
||
<ul class="list-unstyled mb-0">
|
||
{% if nb_gymnast %}<li>{{ nb_gymnast }} active gymnasts</li>{% endif %}
|
||
{% if nb_event %}<li>{{ nb_event }} events</li>{% endif %}
|
||
{% if nb_skill %}<li>{{ nb_skill }} skills</li>{% endif %}
|
||
{% if nb_routine %}<li>{{ nb_routine }} routines</li>{% endif %}
|
||
{% if nb_score %}<li>{{ nb_score }} scores</li>{% endif %}
|
||
</ul>
|
||
{% else %}
|
||
<br />
|
||
No statistics to display.
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row">
|
||
<div class="col-md-4">
|
||
<div class="card">
|
||
<div class="card-header">
|
||
<h4><i class="fal fa-calendar-alt"></i> Next Events</h4>
|
||
</div>
|
||
<div class="card-body">
|
||
{% if event_list %}
|
||
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="event_table">
|
||
{% for event in event_list %}
|
||
<tr>
|
||
<td class="text-left"><a href="{% url 'event_details' event.id %}">{{ event.name }}</a></td>
|
||
<td>{% if event.number_of_week_from_today < 0 %}{{event.number_of_week_from_today}}{% else %}<span class="text-{% if event.number_of_week_from_today > 12 %}success{% elif event.number_of_week_from_today > 9 %}info{% elif event.number_of_week_from_today > 6 %}warning{% else %}danger{% endif %}"><b>{{event.number_of_week_from_today}}</b></span>{% endif %}</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</table>
|
||
{% else %}
|
||
No future event defined
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-4">
|
||
<div class="card">
|
||
<div class="card-header">
|
||
<h4><i class="fal fa-highlighter"></i> Last updated gymnasts</h4>
|
||
</div>
|
||
<div class="card-body">
|
||
{% if last_updated_gymnast %}
|
||
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="gymnast_table">
|
||
{% for gymnast in last_updated_gymnast %}
|
||
<tr>
|
||
<td class="text-left"><a href="{% url 'gymnast_details' gymnast.id %}">{{ gymnast }}</a></td>
|
||
</tr>
|
||
{% endfor %}
|
||
</table>
|
||
{% else %}
|
||
No update since your last visit
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-4">
|
||
<div class="card">
|
||
<div class="card-header">
|
||
<h4><i class="fal fa-birthday-cake"></i> Next birthday</h4>
|
||
</div>
|
||
<div class="card-body">
|
||
{% if birthday_list %}
|
||
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="gymnast_table">
|
||
{% for gymnast in birthday_list %}
|
||
<tr>
|
||
<td class="text-left"><a href="{% url 'gymnast_details' gymnast.id %}">{{ gymnast.first_name }}</a></td>
|
||
<td class="">{{ gymnast.birthdate | date:"j M"}}</td>
|
||
<td class="text-right">{{ gymnast.next_age }} years</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</table>
|
||
{% else %}
|
||
No next birtday (it's a bug).
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
{% endblock %}
|
||
|
||
{% block footerscript %}
|
||
|
||
{% endblock%}
|