Improve participation detail page

This commit is contained in:
Yohann D'ANELLO 2020-10-30 22:36:34 +01:00
parent 244084a1fd
commit e0f06179a0
2 changed files with 234 additions and 97 deletions

View File

@ -35,6 +35,81 @@
</div>
</div>
{% if user.registration.is_admin or current_phase >= 2 %}
<hr>
<div class="row">
<div class="col-md-6">
<div class="card bg-light shadow">
<div class="card-header text-center">
<h4>{% trans "Sent solution" %}</h4>
</div>
<div class="card-body">
<dl class="row">
<dt class="col-md-8 text-right">{% trans "Team that received your solution:" %}</dt>
<dd class="col-md-4">{{ participation.sent_participation|default:any }}</dd>
</dl>
{% if current_phase.phase_number == 2 %}
<div class="alert alert-info">
{% blocktrans trimmed %}
The mentioned team received your video. They are now watching your video,
and formulating questions. You would be able to exchange with the other phase during
the next phase.
{% endblocktrans %}
</div>
{% elif current_phase.phase_number == 3 %}
<div class="alert alert-info">
{% blocktrans trimmed with user_id=user.pk %}
The other team sent you questions about your solution. Your are now able to answer them,
then to exchange freely with the other team. You can click on the Chat button, or to
connect to your dedicated Matrix account:
<code>@corres2math_{{ user_id }}:correspondances-maths.fr</code>.
You can use your own Matrix client, or use the dedicated Element client:
<a href="https://element.correspondances-maths.fr">element.correpondances-maths.fr</a>
{% endblocktrans %}
</div>
{% elif current_phase.phase_number == 4 %}
{# TODO View synthesis #}
{% endif %}
</div>
</div>
</div>
<div class="col-md-6">
<div class="card bg-light shadow">
<div class="card-header text-center">
<h4>{% trans "Received solution" %}</h4>
</div>
<div class="card-body">
<dl class="row">
<dt class="col-md-8 text-right">{% trans "Team that sent you their solution:" %}</dt>
<dd class="col-md-4">{{ participation.received_participation|default:any }}</dd>
</dl>
{# TODO Display solution #}
{% if current_phase.phase_number == 2 %}
{# TODO Send questions #}
{% elif current_phase.phase_number == 3 %}
<div class="alert alert-info">
{% blocktrans trimmed with user_id=user.pk %}
You sent your questions to the other team about their solution. When they answer to
your questions, you will be able to exchange freely with the other team.
You can click on the Chat button, or to connect to your dedicated Matrix account:
<code>@corres2math_{{ user_id }}:correspondances-maths.fr</code>.
You can use your own Matrix client, or use the dedicated Element client:
<a href="https://element.correspondances-maths.fr">element.correpondances-maths.fr</a>
{% endblocktrans %}
</div>
{% elif current_phase.phase_number == 4 %}
{# TODO Send synthesis #}
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{% trans "Upload video" as modal_title %}
{% trans "Upload" as modal_button %}
{% url "participation:upload_video" pk=participation.solution_id as modal_action %}

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Corres2math\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-29 16:06+0100\n"
"POT-Creation-Date: 2020-10-30 22:32+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -38,7 +38,7 @@ msgstr "Fermer"
msgid "Logs"
msgstr "Logs"
#: apps/logs/models.py:22 apps/registration/models.py:17
#: apps/logs/models.py:22 apps/registration/models.py:22
msgid "user"
msgstr "utilisateur"
@ -99,60 +99,60 @@ msgstr "changelogs"
msgid "Changelog of type \"{action}\" for model {model} at {timestamp}"
msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}"
#: apps/participation/forms.py:15 apps/participation/models.py:29
#: apps/participation/forms.py:19 apps/participation/models.py:33
msgid "The trigram must be composed of three uppercase letters."
msgstr "Le trigramme doit être composé de trois lettres majuscules."
#: apps/participation/forms.py:27
#: apps/participation/forms.py:34
msgid "No team was found with this access code."
msgstr "Aucune équipe n'a été trouvée avec ce code d'accès."
#: apps/participation/forms.py:55
#: apps/participation/forms.py:68
msgid "I engage myself to participate to the whole \"Correspondances\"."
msgstr "Je m'engage à participer à l'intégralité des Correspondances."
#: apps/participation/forms.py:67
#: apps/participation/forms.py:83
msgid "Message to address to the team:"
msgstr "Message à adresser à l'équipe :"
#: apps/participation/forms.py:79
#: apps/participation/forms.py:98
msgid "You can't upload your video after the deadline."
msgstr "Vous ne pouvez pas envoyer de vidéo après la date limite."
#: apps/participation/forms.py:96
#: apps/participation/forms.py:118
msgid "Start date must be before the end date."
msgstr "La date de début doit être avant la date de fin."
#: apps/participation/forms.py:98
#: apps/participation/forms.py:120
msgid "This phase must start after the previous phases."
msgstr "Cette phase doit commencer après les phases précédentes."
#: apps/participation/forms.py:100
#: apps/participation/forms.py:122
msgid "This phase must end after the next phases."
msgstr "Cette phase doit finir avant les phases suivantes."
#: apps/participation/models.py:22 apps/participation/tables.py:30
#: apps/participation/models.py:26 apps/participation/tables.py:30
#: apps/participation/tables.py:52 apps/participation/tables.py:78
msgid "name"
msgstr "nom"
#: apps/participation/models.py:28 apps/participation/tables.py:57
#: apps/participation/models.py:32 apps/participation/tables.py:57
msgid "trigram"
msgstr "trigramme"
#: apps/participation/models.py:36
#: apps/participation/models.py:40
msgid "access code"
msgstr "code d'accès"
#: apps/participation/models.py:37
#: apps/participation/models.py:41
msgid "The access code let other people to join the team."
msgstr "Le code d'accès permet aux autres participants de rejoindre l'équipe."
#: apps/participation/models.py:41
#: apps/participation/models.py:45
msgid "Grant Animath to publish my video"
msgstr "Autoriser Animath à publier ma vidéo"
#: apps/participation/models.py:42
#: apps/participation/models.py:46
msgid ""
"Give the authorisation to publish the video on the main website to promote "
"the action."
@ -160,101 +160,101 @@ msgstr ""
"Donner l'autorisation de publier la vidéo sur le site principal pour "
"promouvoir les Correspondances."
#: apps/participation/models.py:82
#: apps/participation/models.py:97
#, python-brace-format
msgid "Team {name} ({trigram})"
msgstr "Équipe {name} ({trigram})"
#: apps/participation/models.py:85 apps/participation/models.py:96
#: apps/registration/models.py:93 apps/registration/models.py:138
#: apps/participation/models.py:100 apps/participation/models.py:115
#: apps/registration/models.py:106 apps/registration/models.py:155
msgid "team"
msgstr "équipe"
#: apps/participation/models.py:86
#: apps/participation/models.py:101
msgid "teams"
msgstr "équipes"
#: apps/participation/models.py:100
#: apps/participation/models.py:119
#, python-brace-format
msgid "Problem #{problem:d}"
msgstr "Problème n°{problem:d}"
#: apps/participation/models.py:103 apps/participation/tables.py:35
#: apps/participation/models.py:122 apps/participation/tables.py:35
#: apps/participation/tables.py:62
msgid "problem number"
msgstr "numéro de problème"
#: apps/participation/models.py:109 apps/participation/models.py:160
#: apps/participation/models.py:128 apps/participation/models.py:182
msgid "valid"
msgstr "valide"
#: apps/participation/models.py:110 apps/participation/models.py:161
#: apps/participation/models.py:129 apps/participation/models.py:183
msgid "The video got the validation of the administrators."
msgstr "La vidéo a été validée par les administrateurs."
#: apps/participation/models.py:119
#: apps/participation/models.py:138
msgid "solution video"
msgstr "vidéo de solution"
#: apps/participation/models.py:128
#: apps/participation/models.py:147
msgid "received participation"
msgstr "participation reçue"
#: apps/participation/models.py:137
#: apps/participation/models.py:156
msgid "synthesis video"
msgstr "vidéo de synthèse"
#: apps/participation/models.py:144
#: apps/participation/models.py:163
#, python-brace-format
msgid "Participation of the team {name} ({trigram})"
msgstr "Participation de l'équipe {name} ({trigram})"
#: apps/participation/models.py:147
#: apps/participation/models.py:166
msgid "participation"
msgstr "participation"
#: apps/participation/models.py:148
#: apps/participation/models.py:167
msgid "participations"
msgstr "participations"
#: apps/participation/models.py:153
#: apps/participation/models.py:175
msgid "link"
msgstr "lien"
#: apps/participation/models.py:154
#: apps/participation/models.py:176
msgid "The full video link."
msgstr "Le lien complet de la vidéo."
#: apps/participation/models.py:188
#: apps/participation/models.py:225
#, python-brace-format
msgid "Video of team {name} ({trigram})"
msgstr "Vidéo de l'équipe {name} ({trigram})"
#: apps/participation/models.py:192
#: apps/participation/models.py:229
msgid "video"
msgstr "vidéo"
#: apps/participation/models.py:193
#: apps/participation/models.py:230
msgid "videos"
msgstr "vidéos"
#: apps/participation/models.py:200
#: apps/participation/models.py:240
msgid "phase number"
msgstr "phase"
#: apps/participation/models.py:205
#: apps/participation/models.py:245
msgid "phase description"
msgstr "description"
#: apps/participation/models.py:209
#: apps/participation/models.py:249
msgid "start date of the given phase"
msgstr "début de la phase"
#: apps/participation/models.py:214
#: apps/participation/models.py:254
msgid "end date of the given phase"
msgstr "fin de la phase"
#: apps/participation/models.py:229
#: apps/participation/models.py:272
msgid ""
"Phase {phase_number:d} starts on {start:%Y-%m-%d %H:%M} and ends on {end:%Y-"
"%m-%d %H:%M}"
@ -262,11 +262,11 @@ msgstr ""
"Phase {phase_number:d} démarrant le {start:%d/%m/%Y %H:%M} et finissant le "
"{end:%d/%m/%Y %H:%M}"
#: apps/participation/models.py:233
#: apps/participation/models.py:276
msgid "phase"
msgstr "phase"
#: apps/participation/models.py:234
#: apps/participation/models.py:277
msgid "phases"
msgstr "phases"
@ -287,7 +287,7 @@ msgstr "Rejoindre"
#: apps/registration/templates/registration/user_detail.html:6
#: apps/registration/templates/registration/user_detail.html:26
msgid "any"
msgstr "aucun"
msgstr "aucun·e"
#: apps/participation/templates/participation/participation_detail.html:9
msgid "Participation of team"
@ -312,7 +312,7 @@ msgid "Proposed solution:"
msgstr "Solution proposée :"
#: apps/participation/templates/participation/participation_detail.html:27
#: apps/participation/templates/participation/participation_detail.html:39
#: apps/participation/templates/participation/participation_detail.html:114
#: apps/participation/templates/participation/upload_video.html:11
#: apps/registration/templates/registration/upload_photo_authorization.html:18
#: apps/registration/templates/registration/user_detail.html:78
@ -323,15 +323,79 @@ msgstr "Téléverser"
msgid "Display"
msgstr "Afficher"
#: apps/participation/templates/participation/participation_detail.html:38
#: apps/participation/templates/participation/participation_detail.html:45
msgid "Sent solution"
msgstr "Solution envoyée :"
#: apps/participation/templates/participation/participation_detail.html:49
msgid "Team that received your solution:"
msgstr "Équipe qui a reçu votre solution :"
#: apps/participation/templates/participation/participation_detail.html:55
msgid ""
"The mentioned team received your video. They are now watching your video, "
"and formulating questions. You would be able to exchange with the other "
"phase during the next phase."
msgstr ""
"L'équipe mentionnée a reçu votre vidéo. Ils sont actuellement en train de la "
"visionner, et de formuler des questions. Lors de la prochaine phase, vous "
"serez invités à répondre aux questions et échanger avec l'autre équipe."
#: apps/participation/templates/participation/participation_detail.html:63
#, python-format
msgid ""
"The other team sent you questions about your solution. Your are now able to "
"answer them, then to exchange freely with the other team. You can click on "
"the Chat button, or to connect to your dedicated Matrix account: "
"<code>@corres2math_%(user_id)s:correspondances-maths.fr</code>. You can use "
"your own Matrix client, or use the dedicated Element client: <a href="
"\"https://element.correspondances-maths.fr\">element.correpondances-maths."
"fr</a>"
msgstr ""
"L'autre équipe vous a envoyé leurs questions à propos de votre solution. "
"Vous pouvez désormais leur répondre, puis échanger librement avec l'autre "
"équipe. Vous pouvez cliquer sur le bouton de chat, ou vous connecter à votre "
"compte Matrix dédié : <code>@corres2math_%(user_id)s:correspondances-maths."
"fr</code>. Vous pouvez utiliser votre propre client Matrix, ou utiliser le "
"client Element dédié : <a href=\"https://element.correspondances-maths.fr"
"\">element.correpondances-maths.fr</a>"
#: apps/participation/templates/participation/participation_detail.html:81
msgid "Received solution"
msgstr "Solution reçue :"
#: apps/participation/templates/participation/participation_detail.html:85
msgid "Team that sent you their solution:"
msgstr "Équipe qui vous a envoyé leur solution :"
#: apps/participation/templates/participation/participation_detail.html:95
#, python-format
msgid ""
"You sent your questions to the other team about their solution. When they "
"answer to your questions, you will be able to exchange freely with the other "
"team. You can click on the Chat button, or to connect to your dedicated "
"Matrix account: <code>@corres2math_%(user_id)s:correspondances-maths.fr</"
"code>. You can use your own Matrix client, or use the dedicated Element "
"client: <a href=\"https://element.correspondances-maths.fr\">element."
"correpondances-maths.fr</a>"
msgstr ""
"Vous avez envoyé vos questions à l'autre équipe à propos de leur solution. "
"Lorsqu'ils auront répondu, vous pourrez échanger librement avec l'autre "
"équipe. Vous pouvez cliquer sur le bouton de chat, ou vous connecter à votre "
"compte Matrix dédié : <code>@corres2math_%(user_id)s:correspondances-maths."
"fr</code>. Vous pouvez utiliser votre propre client Matrix, ou utiliser le "
"client Element dédié : <a href=\"https://element.correspondances-maths.fr"
"\">element.correpondances-maths.fr</a>"
#: apps/participation/templates/participation/participation_detail.html:113
msgid "Upload video"
msgstr "Envoyer la vidéo"
#: apps/participation/templates/participation/participation_detail.html:42
#: apps/participation/templates/participation/participation_detail.html:117
msgid "Display solution"
msgstr "Afficher la solution"
#: apps/participation/templates/participation/participation_detail.html:43
#: apps/participation/templates/participation/participation_detail.html:118
msgid "This video platform is not supported yet."
msgstr "La plateforme de cette vidéo n'est pas encore supportée."
@ -458,182 +522,180 @@ msgstr "Quitter l'équipe"
msgid "Are you sure that you want to leave this team?"
msgstr "Êtes-vous sûr·e de vouloir quitter cette équipe ?"
#: apps/participation/views.py:32 templates/base.html:77
#: apps/participation/views.py:36 templates/base.html:77
#: templates/base.html:230
msgid "Create team"
msgstr "Créer une équipe"
#: apps/participation/views.py:39 apps/participation/views.py:72
#: apps/participation/views.py:43 apps/participation/views.py:89
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."
#: apps/participation/views.py:41 apps/participation/views.py:74
#: apps/participation/views.py:45 apps/participation/views.py:91
msgid "You are already in a team."
msgstr "Vous êtes déjà dans une équipe."
#: apps/participation/views.py:65 templates/base.html:82
#: apps/participation/views.py:82 templates/base.html:82
#: templates/base.html:226
msgid "Join team"
msgstr "Rejoindre une équipe"
#: apps/participation/views.py:103 apps/participation/views.py:254
#: apps/participation/views.py:280
#: apps/participation/views.py:133 apps/participation/views.py:300
#: apps/participation/views.py:333
msgid "You are not in a team."
msgstr "Vous n'êtes pas dans une équipe."
#: apps/participation/views.py:104 apps/participation/views.py:281
#: apps/participation/views.py:134 apps/participation/views.py:334
msgid "You don't participate, so you don't have any team."
msgstr "Vous ne participez pas, vous n'avez donc pas d'équipe."
#: apps/participation/views.py:143
#: apps/participation/views.py:179
msgid "You don't participate, so you can't request the validation of the team."
msgstr ""
"Vous ne participez pas, vous ne pouvez pas demander la validation de "
"l'équipe."
#: apps/participation/views.py:146
#: apps/participation/views.py:182
msgid "The validation of the team is already done or pending."
msgstr "La validation de l'équipe est déjà faite ou en cours."
#: apps/participation/views.py:159
#: apps/participation/views.py:195
msgid "You are not an administrator."
msgstr "Vous n'êtes pas administrateur."
#: apps/participation/views.py:162
#: apps/participation/views.py:198
msgid "This team has no pending validation."
msgstr "L'équipe n'a pas de validation en attente."
#: apps/participation/views.py:181
#: apps/participation/views.py:217
msgid "You must specify if you validate the registration or not."
msgstr "Vous devez spécifier si vous validez l'inscription ou non."
#: apps/participation/views.py:238 apps/registration/views.py:213
#: apps/participation/views.py:280 apps/registration/views.py:235
#, python-brace-format
msgid "Photo authorization of {student}.{ext}"
msgstr "Autorisation de droit à l'image de {student}.{ext}"
#: apps/participation/views.py:242
#: apps/participation/views.py:284
#, python-brace-format
msgid "Photo authorizations of team {trigram}.zip"
msgstr "Autorisations de droit à l'image de l'équipe {trigram}.zip"
#: apps/participation/views.py:256
#, fuzzy
#| msgid "The validation of the team is already done or pending."
#: apps/participation/views.py:302
msgid "The team is already validated or the validation is pending."
msgstr "La validation de l'équipe est déjà faite ou en cours."
#: apps/participation/views.py:290
#: apps/participation/views.py:346
msgid "The team is not validated yet."
msgstr "L'équipe n'est pas encore validée."
#: apps/participation/views.py:299
#: apps/participation/views.py:355
#, python-brace-format
msgid "Participation of team {trigram}"
msgstr "Participation de l'équipe {trigram}"
#: apps/registration/forms.py:13
#: apps/registration/forms.py:18
msgid "role"
msgstr "rôle"
#: apps/registration/forms.py:15
#: apps/registration/forms.py:20
msgid "participant"
msgstr "participant"
#: apps/registration/forms.py:16 apps/registration/models.py:147
#: apps/registration/forms.py:21 apps/registration/models.py:164
msgid "coach"
msgstr "encadrant"
#: apps/registration/forms.py:53
#: apps/registration/forms.py:68
msgid "The uploaded file must be a PDF, PNG of JPEG file."
msgstr "Le fichier envoyé doit être au format PDF, PNG ou JPEG."
#: apps/registration/models.py:22
#: apps/registration/models.py:27
msgid "Grant Animath to contact me in the future about other actions"
msgstr ""
"Autoriser Animath à me recontacter à l'avenir à propos d'autres actions"
#: apps/registration/models.py:27
#: apps/registration/models.py:32
msgid "email confirmed"
msgstr "email confirmé"
#: apps/registration/models.py:31
#: apps/registration/models.py:40
msgid "Activate your Correspondances account"
msgstr "Activez votre compte des Correspondances"
#: apps/registration/models.py:78
#: apps/registration/models.py:87
msgid "registration"
msgstr "inscription"
#: apps/registration/models.py:79
#: apps/registration/models.py:88
msgid "registrations"
msgstr "inscriptions"
#: apps/registration/models.py:98
#: apps/registration/models.py:111
msgid "12th grade"
msgstr "Terminale"
#: apps/registration/models.py:99
#: apps/registration/models.py:112
msgid "11th grade"
msgstr "Première"
#: apps/registration/models.py:100
#: apps/registration/models.py:113
msgid "10th grade or lower"
msgstr "Seconde ou inférieur"
#: apps/registration/models.py:102
#: apps/registration/models.py:115
msgid "student class"
msgstr "classe"
#: apps/registration/models.py:107
#: apps/registration/models.py:120
msgid "school"
msgstr "école"
#: apps/registration/models.py:111
#: apps/registration/models.py:124
msgid "photo authorization"
msgstr "autorisation de droit à l'image"
#: apps/registration/models.py:119
#: apps/registration/models.py:132
msgid "student"
msgstr "étudiant"
#: apps/registration/models.py:127
#: apps/registration/models.py:140
msgid "student registration"
msgstr "inscription d'élève"
#: apps/registration/models.py:128
#: apps/registration/models.py:141
msgid "student registrations"
msgstr "inscriptions d'élève"
#: apps/registration/models.py:142
#: apps/registration/models.py:159
msgid "professional activity"
msgstr "activité professionnelle"
#: apps/registration/models.py:155
#: apps/registration/models.py:172
msgid "coach registration"
msgstr "inscription d'encadrant"
#: apps/registration/models.py:156
#: apps/registration/models.py:173
msgid "coach registrations"
msgstr "inscriptions d'encadrants"
#: apps/registration/models.py:161
#: apps/registration/models.py:182
msgid "role of the administrator"
msgstr "rôle de l'administrateur"
#: apps/registration/models.py:166
#: apps/registration/models.py:187
msgid "admin"
msgstr "admin"
#: apps/registration/models.py:174
#: apps/registration/models.py:195
msgid "admin registration"
msgstr "inscription d'administrateur"
#: apps/registration/models.py:175
#: apps/registration/models.py:196
msgid "admin registrations"
msgstr "inscriptions d'administrateur"
#: apps/registration/tables.py:11
#: apps/registration/tables.py:14
msgid "last name"
msgstr "nom de famille"
@ -856,23 +918,23 @@ msgstr "Modifier l'utilisateur"
msgid "Upload photo authorization"
msgstr "Téléverser l'autorisation de droit à l'image"
#: apps/registration/views.py:60
#: apps/registration/views.py:63
msgid "Email validation"
msgstr "Validation de l'adresse mail"
#: apps/registration/views.py:62
#: apps/registration/views.py:65
msgid "Validate email"
msgstr "Valider l'adresse mail"
#: apps/registration/views.py:101
#: apps/registration/views.py:104
msgid "Email validation unsuccessful"
msgstr "Échec de la validation de l'adresse mail"
#: apps/registration/views.py:112
#: apps/registration/views.py:115
msgid "Email validation email sent"
msgstr "Mail de confirmation de l'adresse mail envoyé"
#: apps/registration/views.py:120
#: apps/registration/views.py:123
msgid "Resend email validation link"
msgstr "Renvoyé le lien de validation de l'adresse mail"