2020-04-29 15:58:11 +00:00
{% extends "base.html" %}
{% load getconfig i18n django_tables2 static %}
{% block content %}
< div class = "card bg-light shadow" >
< div class = "card-header text-center" >
< h4 > {% trans "Team" %} {{ team.name }}< / h4 >
< / div >
< div class = "card-body" >
< dl class = "row" >
< dt class = "col-xl-6 text-right" > {% trans 'name'|capfirst %}< / dt >
< dd class = "col-xl-6" > {{ team.name }}< / dd >
< dt class = "col-xl-6 text-right" > {% trans 'trigram'|capfirst %}< / dt >
< dd class = "col-xl-6" > {{ team.trigram }}< / dd >
2020-05-04 22:56:34 +00:00
< dt class = "col-xl-6 text-right" > {% trans 'access code'|capfirst %}< / dt >
< dd class = "col-xl-6" > {{ team.access_code }}< / dd >
2020-04-29 15:58:11 +00:00
< dt class = "col-xl-6 text-right" > {% trans 'tournament'|capfirst %}< / dt >
2020-05-06 16:10:33 +00:00
< dd class = "col-xl-6" > < a
href="{% url "tournament:detail" pk=team.tournament.pk %}">{{ team.tournament }}< / a > < / dd >
2020-04-29 15:58:11 +00:00
< dt class = "col-xl-6 text-right" > {% trans 'coachs'|capfirst %}< / dt >
2020-05-11 12:08:19 +00:00
< dd class = "col-xl-6" > {% autoescape off %}{{ team.linked_coaches|join:", " }}{% endautoescape %}< / dd >
2020-04-29 15:58:11 +00:00
< dt class = "col-xl-6 text-right" > {% trans 'participants'|capfirst %}< / dt >
2020-05-06 16:10:33 +00:00
< dd class = "col-xl-6" >
{% autoescape off %}{{ team.linked_participants|join:", " }}{% endautoescape %}< / dd >
2020-05-04 22:56:34 +00:00
< dt class = "col-xl-6 text-right" > {% trans 'validation status'|capfirst %}< / dt >
< dd class = "col-xl-6" > {{ team.get_validation_status_display }}< / dd >
2020-04-29 15:58:11 +00:00
< / dl >
< / div >
2020-05-05 22:19:38 +00:00
{% if user.is_authenticated and user.admin %}
< div class = "alert alert-info" >
< a href = "mailto:contact@tfjm.org?subject=TFJM²%20{{ " TFJM_YEAR " | get_env } } & bcc = {{ team_users_emails | join: " , " } } " > {% trans "Send a mail to people in this team" %}< / a > < br >
< / div >
{% endif %}
2020-05-04 20:27:45 +00:00
{% if user.admin or user in team.tournament.organizers.all or team == user.team %}
2020-04-29 15:58:11 +00:00
< div class = "card-footer text-center" >
2020-05-06 16:10:33 +00:00
< form method = "post" >
{% csrf_token %}
{% if team.invalid or user.organizes %}
< a class = "btn btn-secondary" href = "{% url " tournament:team_update " pk = team.pk % } " >
{% trans "Edit team" %}
< / a >
{% endif %}
{% if team.valid and user.admin and not team.selected_for_final and team.pools %}
< button name = "select_final" class = "btn btn-success" > {% trans "Select for final" %}< / button >
{% endif %}
{% if team.invalid %}
< form method = "post" >
2020-05-04 18:21:53 +00:00
{% csrf_token %}
2020-05-04 20:27:45 +00:00
{% if user.admin %}
< button name = "delete" class = "btn btn-danger" > {% trans "Delete team" %}< / button >
{% elif team == user.team %}
< button name = "leave" class = "btn btn-danger" > {% trans "Leave this team" %}< / button >
{% endif %}
2020-05-06 16:10:33 +00:00
{% endif %}
< / form >
2020-04-29 15:58:11 +00:00
< / div >
{% endif %}
< / div >
2020-05-05 00:20:45 +00:00
{% if user.participates and team.invalid %}
< hr >
{% if team.can_validate %}
< form method = "post" >
{% csrf_token %}
< label for = "engage" > Je m'engage à participer à l'intégralité du TFJM²*< / label >
< input type = "checkbox" name = "engage" id = "engage" required / >
< div class = "alert alert-warning" >
< strong > Attention !< / strong > Une fois votre équipe validée, vous ne pourrez plus modifier le nom
de l'équipe, le trigramme ou la composition de l'équipe.
< / div >
< input class = "btn btn-success btn-block" type = "submit" name = "request_validation"
value="Demander la validation"/>
< / form >
{% else %}
< div class = "alert alert-warning" >
Pour demander à valider votre équipe, vous devez avoir au moins un encadrant, quatre participants
et soumis une autorisation de droit à l'image, une fiche sanitaire et une autorisation
2020-05-06 16:10:33 +00:00
parentale (si besoin) par participant, ainsi qu'une lettre de motivation à transmettre aux
organisateurs.
2020-05-05 00:20:45 +00:00
Les encadrants doivent également fournir une autorisation de droit à l'image.
< / div >
{% endif %}
< hr >
< div class = "alert alert-danger" >
2020-05-06 16:10:33 +00:00
En raison du changement de format du TFJM² 2020, il n'y a plus de document obligatoire à envoyer. Les
autorisations
précédemment envoyées ont été détruites. Seules les lettres de motivation ont été conservées, mais leur
envoi
2020-05-05 00:20:45 +00:00
n'est plus obligatoire.
< / div >
{% endif %}
{% if team.waiting %}
< hr >
< div class = "alert alert-warning" >
2020-05-06 16:10:33 +00:00
{% trans "The team is waiting about validation." %}
2020-05-05 00:20:45 +00:00
< / div >
{% if user.admin %}
< form method = "POST" >
{% csrf_token %}
< div class = "form-group row" >
< label for = "message" > {% trans "Message addressed to the team:" %}< / label >
2020-05-06 16:10:33 +00:00
< textarea class = "form-control" id = "message" name = "message"
placeholder="{% trans "Message..." %}">< / textarea >
2020-05-05 00:20:45 +00:00
< / div >
< div class = "form-group" >
< div class = "btn-group btn-block" >
< button class = "btn btn-danger" name = "invalidate" > {% trans "Invalidate team" %}< / button >
< button class = "btn btn-success" name = "validate" > {% trans "Validate team" %}< / button >
< / div >
< / div >
< / form >
{% endif %}
{% endif %}
2020-04-29 15:58:11 +00:00
< hr >
< h4 > {% trans "Documents" %}< / h4 >
2020-04-29 23:20:50 +00:00
{% if team.motivation_letters.count %}
2020-04-29 15:58:11 +00:00
< div class = "alert alert-info" >
2020-04-30 18:18:51 +00:00
< strong > {% blocktrans %}Motivation letter:{% endblocktrans %}< / strong >
2020-05-06 16:10:33 +00:00
< a data-turbolinks = "false"
href="{% url "document" file=team.motivation_letters.last.file %}">{% trans "Download" %}< / a >
2020-04-29 23:20:50 +00:00
< / div >
{% endif %}
{% if team.solutions.count %}
< div class = "alert alert-info" >
< ul >
2020-05-06 12:50:07 +00:00
{% for solution in ordered_solutions %}
2020-05-06 16:10:33 +00:00
< li > < strong > {{ solution }} :< / strong > < a data-turbolinks = "false"
href="{% url "document" file=solution.file %}">{% trans "Download" %}< / a >
< / li >
2020-04-29 23:20:50 +00:00
{% endfor %}
< / ul >
2020-04-29 15:58:11 +00:00
< / div >
2020-04-30 19:07:12 +00:00
< div class = "text-center" >
< form method = "post" >
{% csrf_token %}
< button class = "btn btn-success" name = "zip" > {% trans "Download solutions as ZIP" %}< / button >
< / form >
< / div >
2020-04-29 15:58:11 +00:00
{% endif %}
{% endblock %}