2021-11-02 14:05:32 +01:00
{% extends "base.html" %}
2021-11-28 15:05:00 +01:00
{% block page_title %}Dashboard{% endblock %}
2021-11-02 14:05:32 +01:00
{% block content %}
< div class = "row" >
< div class = "col-md-9" >
< div class = "card" >
< div class = "card-header" >
2021-11-30 18:45:03 +01:00
< h4 class = "" > < i class = "icon-primary fal fa-laugh-wink" > < / i > Hi {{ user.username }} !< / h4 >
2021-11-02 14:05:32 +01:00
< / div >
< div class = "card-body" >
2021-12-14 17:23:39 +01:00
Welcome to Ultron v0.29 (14-12-2021)< br / >
2021-11-24 13:24:03 +01:00
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 > .
2021-11-02 14:05:32 +01:00
< / div >
< / div >
< / div >
< div class = "col-md-3" >
2021-12-01 07:56:54 +01:00
< div class = "card" >
2021-11-28 15:05:00 +01:00
< div class = "card-header" >
2021-12-03 15:32:10 +01:00
< h4 > < i class = "fal fa-chart-area" > < / i > Statistics< / h4 >
2021-11-28 15:05:00 +01:00
< / div >
2021-11-02 14:05:32 +01:00
< div class = "card-body" >
< div class = "w-lg m-x-auto" >
2021-11-30 18:45:03 +01:00
< 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 >
2021-12-14 17:23:39 +01:00
{% if nb_gymnast or nb_event or nb_skill or nb_routine or nb_score %}
2021-12-04 21:18:19 +01:00
< ul class = "list-unstyled mb-0" >
2021-12-14 17:23:39 +01:00
{% 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 %}
2021-11-28 15:05:00 +01:00
< / ul >
2021-11-30 18:46:17 +01:00
{% else %}
2021-12-01 07:56:54 +01:00
< br / >
2021-11-30 18:46:17 +01:00
No statistics to display.
{% endif %}
2021-11-02 14:05:32 +01:00
< / div >
< / div >
< / div >
< / div >
< / div >
< div class = "row" >
< div class = "col-md-4" >
< div class = "card" >
< div class = "card-header" >
2021-11-30 18:45:03 +01:00
< h4 > < i class = "fal fa-calendar-alt" > < / i > Next Events< / h4 >
2021-11-02 14:05:32 +01:00
< / div >
< div class = "card-body" >
2021-11-19 13:11:25 +01:00
{% if event_list %}
2021-11-17 10:39:16 +01:00
< 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 >
2021-11-19 13:11:25 +01:00
{% else %}
No future event defined
{% endif %}
2021-11-02 14:05:32 +01:00
< / div >
< / div >
< / div >
< div class = "col-md-4" >
< div class = "card" >
< div class = "card-header" >
2021-11-30 18:45:03 +01:00
< h4 > < i class = "fal fa-highlighter" > < / i > Last updated gymnasts< / h4 >
2021-11-02 14:05:32 +01:00
< / div >
< div class = "card-body" >
2021-11-26 14:52:16 +01:00
{% if last_updated_gymnast %}
< table class = "table tablesorter table-striped table-condensed" data-sort = "table" id = "gymnast_table" >
{% for gymnast in last_updated_gymnast %}
2021-11-19 13:11:25 +01:00
< tr >
2021-11-26 14:52:16 +01:00
< td class = "text-left" > < a href = "{% url 'gymnast_details' gymnast.id %}" > {{ gymnast }}< / a > < / td >
2021-11-19 13:11:25 +01:00
< / tr >
{% endfor %}
< / table >
{% else %}
2021-11-26 14:52:16 +01:00
No update since your last visit
2021-11-19 13:11:25 +01:00
{% endif %}
2021-11-02 14:05:32 +01:00
< / div >
< / div >
< / div >
< div class = "col-md-4" >
< div class = "card" >
< div class = "card-header" >
2021-12-07 10:22:07 +01:00
< h4 > < i class = "fal fa-birthday-cake" > < / i > Next birthday< / h4 >
2021-11-02 14:05:32 +01:00
< / div >
< div class = "card-body" >
2021-12-09 13:50:39 +01:00
{% 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 %}
2021-11-02 14:05:32 +01:00
< / div >
< / div >
< / div >
< / div >
2021-11-03 06:19:59 +01:00
2021-11-02 14:05:32 +01:00
{% endblock %}
{% block footerscript %}
2021-11-03 06:19:59 +01:00
2021-11-02 14:05:32 +01:00
{% endblock%}