1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-02-06 12:13:01 +00:00

More shortcuts

This commit is contained in:
Yohann D'ANELLO 2020-09-27 18:09:39 +02:00
parent 3b73edd6b0
commit 84a7ec6fb5
4 changed files with 61 additions and 34 deletions

View File

@ -10,6 +10,9 @@
</div> </div>
<div class="card-body"> <div class="card-body">
<dl class="row"> <dl class="row">
<dt class="col-sm-2">{% trans "Team:" %}</dt>
<dd class="col-sm-10"><a href="{% url "participation:team_detail" pk=participation.team.pk %}">{{ participation.team }}</a></dd>
<dt class="col-sm-2">{% trans "Chosen problem:" %}</dt> <dt class="col-sm-2">{% trans "Chosen problem:" %}</dt>
<dd class="col-sm-10">{{ participation.get_problem_display }}</dd> <dd class="col-sm-10">{{ participation.get_problem_display }}</dd>
</dl> </dl>

View File

@ -3,7 +3,6 @@
{% load i18n %} {% load i18n %}
{% block content %} {% block content %}
{% trans "any" as any %}
<div class="card bg-light shadow"> <div class="card bg-light shadow">
<div class="card-header text-center"> <div class="card-header text-center">
@ -21,12 +20,25 @@
<dd class="col-sm-6">{{ team.access_code }}</dd> <dd class="col-sm-6">{{ team.access_code }}</dd>
<dt class="col-sm-6 text-right">{% trans "Coachs:" %}</dt> <dt class="col-sm-6 text-right">{% trans "Coachs:" %}</dt>
<dd class="col-sm-6">{{ team.coachs.all|join:", "|default:any }}</dd> <dd class="col-sm-6">
{% for coach in team.coachs.all %}
<a href="{% url "registration:user_detail" pk=coach.user.pk %}">{{ coach }}</a>{% if not forloop.last %},{% endif %}
{% empty %}
{% trans "any" %}
{% endfor %}
</dd>
<dt class="col-sm-6 text-right">{% trans "Participants:" %}</dt> <dt class="col-sm-6 text-right">{% trans "Participants:" %}</dt>
<dd class="col-sm-6">{{ team.students.all|join:", "|default:any }}</dd> <dd class="col-sm-6">
{% for student in team.students.all %}
<a href="{% url "registration:user_detail" pk=student.user.pk %}">{{ student }}</a>{% if not forloop.last %},{% endif %}
{% empty %}
{% trans "any" %}
{% endfor %}
</dd>
<dt class="col-sm-6 text-right">{% trans "Chosen problem:" %}</dt> <dt class="col-sm-6 text-right">{% trans "Chosen problem:" %}</dt>
{% trans "any" as any %}
<dd class="col-sm-6">{{ team.participation.get_problem_display|default:any }}</dd> <dd class="col-sm-6">{{ team.participation.get_problem_display|default:any }}</dd>
<dt class="col-sm-6 text-right">{% trans "Grant Animath to publish our video:" %}</dt> <dt class="col-sm-6 text-right">{% trans "Grant Animath to publish our video:" %}</dt>
@ -49,6 +61,14 @@
</div> </div>
</div> </div>
<hr>
<div class="text-center">
<a class="btn btn-info" href="{% url "participation:participation_detail" pk=team.participation.pk %}">
<i class="fas fa-video"></i> {% trans "Access to team participation" %} <i class="fas fa-video"></i>
</a>
</div>
{% trans "Update team" as modal_title %} {% trans "Update team" as modal_title %}
{% trans "Update" as modal_button %} {% trans "Update" as modal_button %}
{% url "participation:update_team" pk=team.pk as modal_action %} {% url "participation:update_team" pk=team.pk as modal_action %}

View File

@ -170,6 +170,8 @@ class TestRegistration(TestCase):
args=(self.student.registration.photo_authorization.name.split('/')[-1],))) args=(self.student.registration.photo_authorization.name.split('/')[-1],)))
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.student.registration.photo_authorization.delete()
def test_string_render(self): def test_string_render(self):
# TODO These string field tests will be removed when used in a template # TODO These string field tests will be removed when used in a template
str(self.user.registration) str(self.user.registration)

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Corres2math\n" "Project-Id-Version: Corres2math\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-27 16:10+0200\n" "POT-Creation-Date: 2020-09-27 18:00+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n" "Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -234,31 +234,36 @@ msgid "Participation of team"
msgstr "Participation de l'équipe" msgstr "Participation de l'équipe"
#: apps/participation/templates/participation/participation_detail.html:13 #: apps/participation/templates/participation/participation_detail.html:13
#: apps/registration/templates/registration/user_detail.html:25
msgid "Team:"
msgstr "Équipe :"
#: apps/participation/templates/participation/participation_detail.html:16
#: apps/participation/templates/participation/team_detail.html:29 #: apps/participation/templates/participation/team_detail.html:29
msgid "Chosen problem:" msgid "Chosen problem:"
msgstr "Problème choisi :" msgstr "Problème choisi :"
#: apps/participation/templates/participation/participation_detail.html:19 #: apps/participation/templates/participation/participation_detail.html:22
msgid "No video sent" msgid "No video sent"
msgstr "Pas de vidéo envoyée" msgstr "Pas de vidéo envoyée"
#: apps/participation/templates/participation/participation_detail.html:20 #: apps/participation/templates/participation/participation_detail.html:23
msgid "Video link:" msgid "Video link:"
msgstr "Lien de la vidéo :" msgstr "Lien de la vidéo :"
#: apps/participation/templates/participation/participation_detail.html:23 #: apps/participation/templates/participation/participation_detail.html:26
#: apps/participation/templates/participation/participation_detail.html:38 #: apps/participation/templates/participation/participation_detail.html:41
#: apps/participation/templates/participation/upload_video.html:11 #: apps/participation/templates/participation/upload_video.html:11
#: apps/registration/templates/registration/upload_photo_authorization.html:18 #: apps/registration/templates/registration/upload_photo_authorization.html:18
#: apps/registration/templates/registration/user_detail.html:72 #: apps/registration/templates/registration/user_detail.html:75
msgid "Upload" msgid "Upload"
msgstr "Téléverser" msgstr "Téléverser"
#: apps/participation/templates/participation/participation_detail.html:30 #: apps/participation/templates/participation/participation_detail.html:33
msgid "This video platform is not supported yet." msgid "This video platform is not supported yet."
msgstr "La plateforme de cette vidéo n'est pas encore supportée." msgstr "La plateforme de cette vidéo n'est pas encore supportée."
#: apps/participation/templates/participation/participation_detail.html:37 #: apps/participation/templates/participation/participation_detail.html:40
msgid "Upload video" msgid "Upload video"
msgstr "Envoyer la vidéo" msgstr "Envoyer la vidéo"
@ -295,15 +300,19 @@ msgid "Not uploaded yet"
msgstr "Pas encore envoyée" msgstr "Pas encore envoyée"
#: apps/participation/templates/participation/team_detail.html:48 #: apps/participation/templates/participation/team_detail.html:48
#: apps/participation/templates/participation/team_detail.html:53 #: apps/participation/templates/participation/team_detail.html:61
#: apps/participation/templates/participation/update_team.html:12 #: apps/participation/templates/participation/update_team.html:12
#: apps/registration/templates/registration/update_user.html:12 #: apps/registration/templates/registration/update_user.html:12
#: apps/registration/templates/registration/user_detail.html:61 #: apps/registration/templates/registration/user_detail.html:64
#: apps/registration/templates/registration/user_detail.html:67 #: apps/registration/templates/registration/user_detail.html:70
msgid "Update" msgid "Update"
msgstr "Modifier" msgstr "Modifier"
#: apps/participation/templates/participation/team_detail.html:52 #: apps/participation/templates/participation/team_detail.html:56
msgid "Access to team participation"
msgstr "Accéder à la participation de l'équipe"
#: apps/participation/templates/participation/team_detail.html:60
msgid "Update team" msgid "Update team"
msgstr "Modifier l'équipe" msgstr "Modifier l'équipe"
@ -312,24 +321,24 @@ msgstr "Modifier l'équipe"
msgid "Create team" msgid "Create team"
msgstr "Créer une équipe" msgstr "Créer une équipe"
#: apps/participation/views.py:23 apps/participation/views.py:49 #: apps/participation/views.py:22 apps/participation/views.py:50
msgid "You don't participate, so you can't create a team." msgid "You don't participate, so you can't create a team."
msgstr "Vous ne participez pas, vous ne pouvez pas créer d'équipe." msgstr "Vous ne participez pas, vous ne pouvez pas créer d'équipe."
#: apps/participation/views.py:26 apps/participation/views.py:52 #: apps/participation/views.py:24 apps/participation/views.py:52
msgid "You are already in a team." msgid "You are already in a team."
msgstr "Vous êtes déjà dans une équipe." msgstr "Vous êtes déjà dans une équipe."
#: apps/participation/views.py:41 templates/base.html:75 #: apps/participation/views.py:43 templates/base.html:75
#: templates/base.html:202 #: templates/base.html:202
msgid "Join team" msgid "Join team"
msgstr "Rejoindre une équipe" msgstr "Rejoindre une équipe"
#: apps/participation/views.py:72 apps/participation/views.py:111 #: apps/participation/views.py:76 apps/participation/views.py:127
msgid "You are not in a team." msgid "You are not in a team."
msgstr "Vous n'êtes pas dans une équipe." msgstr "Vous n'êtes pas dans une équipe."
#: apps/participation/views.py:73 apps/participation/views.py:112 #: apps/participation/views.py:77 apps/participation/views.py:128
msgid "You don't participate, so you don't have any team." msgid "You don't participate, so you don't have any team."
msgstr "Vous ne participez pas, vous n'avez donc pas d'équipe." msgstr "Vous ne participez pas, vous n'avez donc pas d'équipe."
@ -621,10 +630,6 @@ msgstr "Non confirmée"
msgid "resend the validation link" msgid "resend the validation link"
msgstr "Renvoyer le lien de validation" msgstr "Renvoyer le lien de validation"
#: apps/registration/templates/registration/user_detail.html:25
msgid "Team:"
msgstr "Équipe :"
#: apps/registration/templates/registration/user_detail.html:35 #: apps/registration/templates/registration/user_detail.html:35
msgid "Student class:" msgid "Student class:"
msgstr "Classe :" msgstr "Classe :"
@ -641,27 +646,27 @@ msgstr "Autorisation de droit à l'image"
msgid "Download" msgid "Download"
msgstr "Télécharger" msgstr "Télécharger"
#: apps/registration/templates/registration/user_detail.html:45 #: apps/registration/templates/registration/user_detail.html:47
msgid "Replace" msgid "Replace"
msgstr "Remplacer" msgstr "Remplacer"
#: apps/registration/templates/registration/user_detail.html:48 #: apps/registration/templates/registration/user_detail.html:51
msgid "Profesional activity:" msgid "Profesional activity:"
msgstr "Activité professionnelle :" msgstr "Activité professionnelle :"
#: apps/registration/templates/registration/user_detail.html:51 #: apps/registration/templates/registration/user_detail.html:54
msgid "Role:" msgid "Role:"
msgstr "Rôle :" msgstr "Rôle :"
#: apps/registration/templates/registration/user_detail.html:55 #: apps/registration/templates/registration/user_detail.html:58
msgid "Grant Animath to contact me in the future about other actions:" msgid "Grant Animath to contact me in the future about other actions:"
msgstr "Autorise Animath à recontacter à propos d'autres actions :" msgstr "Autorise Animath à recontacter à propos d'autres actions :"
#: apps/registration/templates/registration/user_detail.html:66 #: apps/registration/templates/registration/user_detail.html:69
msgid "Update user" msgid "Update user"
msgstr "Modifier l'utilisateur" msgstr "Modifier l'utilisateur"
#: apps/registration/templates/registration/user_detail.html:71 #: apps/registration/templates/registration/user_detail.html:74
msgid "Upload photo authorization" msgid "Upload photo authorization"
msgstr "Téléverser l'autorisation de droit à l'image" msgstr "Téléverser l'autorisation de droit à l'image"
@ -685,7 +690,7 @@ msgstr "Mail de confirmation de l'adresse mail envoyé"
msgid "Resend email validation link" msgid "Resend email validation link"
msgstr "Renvoyé le lien de validation de l'adresse mail" msgstr "Renvoyé le lien de validation de l'adresse mail"
#: apps/registration/views.py:198 #: apps/registration/views.py:213
#, python-brace-format #, python-brace-format
msgid "Photo authorization of {student}.{ext}" msgid "Photo authorization of {student}.{ext}"
msgstr "Autorisation de droit à l'image de {student}.{ext}" msgstr "Autorisation de droit à l'image de {student}.{ext}"
@ -814,6 +819,3 @@ msgstr ""
#: templates/registration/login.html:23 #: templates/registration/login.html:23
msgid "Forgotten your password or username?" msgid "Forgotten your password or username?"
msgstr "Mot de passe oublié ?" msgstr "Mot de passe oublié ?"
#~ msgid "Back to top"
#~ msgstr "Retour en haut"