Ultron/templates/ultron/dashboard/dashboard.html

157 lines
6.8 KiB
HTML
Raw Normal View History

2021-11-02 14:05:32 +01:00
{% extends "base.html" %}
{% 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">
2022-09-04 16:00:38 +02:00
Welcome to Ultron v0.50 <span class="text-muted">(last update : 4-9-2022)</span><br />
2022-02-03 12:08:12 +01:00
This application is here to help us to manage the gymnasts (evolution, evaluation, routines, scores, ...). This tool is not perfect so feel free to make improvement proposals, bug reports, … by sending me an <a href="mailto:gregory@flyingacrobaticstrampoline.be">email</a>.<br/>
2021-12-24 20:21:38 +01:00
<br/>
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">
<div class="card-header">
2022-01-09 16:34:41 +01:00
<h4><i class="fal fa-chart-area text-primary"></i> Statistics</h4>
</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-20 10:08:04 +01:00
{% if nb_active_gymnast or nb_event or nb_skill or nb_routine or nb_score or nb_club %}
<div class="row">
<div class="col-md-7">
<ul class="list-unstyled mb-0">
2022-01-31 17:37:51 +01:00
{% if nb_active_gymnast %}<li>{{ nb_active_gymnast }} active gymnasts</li>{% endif %}
2021-12-20 10:08:04 +01:00
{% if nb_event %}<li>{{ nb_event }} events</li>{% endif %}
{% if nb_score %}<li>{{ nb_score }} scores</li>{% endif %}
</ul>
</div>
<div class="col-md-5">
<ul class="list-unstyled mb-0">
{% if nb_skill %}<li>{{ nb_skill }} skills</li>{% endif %}
{% if nb_routine %}<li>{{ nb_routine }} routines</li>{% endif %}
{% if nb_club %}<li>{{ nb_club }} clubs</li>{% endif %}
</ul>
</div>
</div>
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-3">
2021-11-02 14:05:32 +01:00
<div class="card">
<div class="card-header">
<h4><i class="fal fa-calendar-alt text-warning"></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 %}
2022-02-11 16:06:46 +01:00
No future event defined
2021-11-19 13:11:25 +01:00
{% endif %}
2021-11-02 14:05:32 +01:00
</div>
</div>
</div>
<div class="col-md-3">
<div class="card">
<div class="card-header">
<h4><i class="fal fa-exclamation-triangle text-danger"></i> Updated needed</h4>
</div>
<div class="card-body">
{% if waiting_update_gymnast %}
2022-02-11 16:06:46 +01:00
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="gymnast_table">
{% for gymnast in waiting_update_gymnast %}
<tr>
<td class="text-left"><a href="{% url 'gymnast_details' gymnast.id %}">{{ gymnast }}</a></td>
<td class="text-right">{{ gymnast.club.acronym }}</td>
</tr>
{% endfor %}
</table>
{% else %}
No update needed.
{% endif %}
</div>
</div>
</div>
<div class="col-md-3">
2021-11-02 14:05:32 +01:00
<div class="card">
<div class="card-header">
<h4><i class="fal fa-highlighter text-success"></i> Last updated gymnasts</h4>
2021-11-02 14:05:32 +01:00
</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 %}
2021-11-19 13:11:25 +01:00
<tr>
<td class="text-left"><a href="{% url 'gymnast_details' gymnast.id %}">{{ gymnast }}</a></td>
<td class="text-right">{{ gymnast.club.acronym }}</td>
2021-11-19 13:11:25 +01:00
</tr>
{% endfor %}
</table>
{% else %}
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-3">
2021-11-02 14:05:32 +01:00
<div class="card">
<div class="card-header">
<h4><i class="fal fa-birthday-cake text-info"></i> Next birthday</h4>
2021-11-02 14:05:32 +01:00
</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 %}
2021-11-02 14:05:32 +01:00
</div>
</div>
</div>
2021-11-02 14:05:32 +01:00
</div>
2021-11-02 14:05:32 +01:00
{% endblock %}
{% block footerscript %}
2021-11-02 14:05:32 +01:00
{% endblock%}