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

Rename video in solution since there will be multiple videos in one page

This commit is contained in:
Yohann D'ANELLO 2020-10-20 15:25:28 +02:00
parent f2704b3f13
commit 8c8ab4c0b7
2 changed files with 92 additions and 77 deletions

View File

@ -20,14 +20,14 @@
<div id="solution-container"> <div id="solution-container">
<dl class="row"> <dl class="row">
{% trans "No video sent" as novideo %} {% trans "No video sent" as novideo %}
<dt class="col-sm-2">{% trans "Video link:" %}</dt> <dt class="col-sm-2">{% trans "Proposed solution:" %}</dt>
<dd class="col-sm-10"><a href="{{ participation.solution.link|default:"#" }}" target="_blank"> <dd class="col-sm-10"><a href="{{ participation.solution.link|default:"#" }}" target="_blank">
{{ participation.solution.link|default:novideo }}</a> {{ participation.solution.link|default:novideo }}</a>
{% if current_phase.phase_number == 1 or participation.solution.link == "" %} {% if current_phase.phase_number == 1 or participation.solution.link == "" %}
<button class="btn btn-primary" data-toggle="modal" data-target="#uploadVideoModal">{% trans "Upload" %}</button> <button class="btn btn-primary" data-toggle="modal" data-target="#uploadSolutionModal">{% trans "Upload" %}</button>
{% endif %} {% endif %}
{% if participation.solution.link %} {% if participation.solution.link %}
<button class="btn btn-info" data-toggle="modal" data-target="#displayVideoModal">{% trans "Display" %}</button> <button class="btn btn-info" data-toggle="modal" data-target="#displaySolutionModal">{% trans "Display" %}</button>
{% endif %} {% endif %}
</dd> </dd>
</dl> </dl>
@ -38,17 +38,17 @@
{% trans "Upload video" as modal_title %} {% trans "Upload video" as modal_title %}
{% trans "Upload" as modal_button %} {% trans "Upload" as modal_button %}
{% url "participation:upload_video" pk=participation.solution_id as modal_action %} {% url "participation:upload_video" pk=participation.solution_id as modal_action %}
{% include "base_modal.html" with modal_id="uploadVideo" %} {% include "base_modal.html" with modal_id="uploadSolution" %}
{% trans "Display solution" as modal_title %} {% trans "Display solution" as modal_title %}
{% trans "This video platform is not supported yet." as unsupported_platform %} {% trans "This video platform is not supported yet." as unsupported_platform %}
{% include "base_modal.html" with modal_id="displayVideo" modal_action="" modal_button="" modal_additional_class="modal-lg" modal_content=participation.solution.as_iframe|default:unsupported_platform %} {% include "base_modal.html" with modal_id="displaySolution" modal_action="" modal_button="" modal_additional_class="modal-lg" modal_content=participation.solution.as_iframe|default:unsupported_platform %}
{% endblock %} {% endblock %}
{% block extrajavascript %} {% block extrajavascript %}
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$('button[data-target="#uploadVideoModal"]').click(function() { $('button[data-target="#uploadSolutionModal"]').click(function() {
let modalBody = $("#uploadVideoModal div.modal-body"); let modalBody = $("#uploadSolutionModal div.modal-body");
if (!modalBody.html().trim()) if (!modalBody.html().trim())
modalBody.load("{% url "participation:upload_video" pk=participation.solution_id %} #form-content"); modalBody.load("{% url "participation:upload_video" pk=participation.solution_id %} #form-content");
}); });

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-10-20 14:11+0200\n" "POT-Creation-Date: 2020-10-20 15:21+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"
@ -99,7 +99,7 @@ msgstr "changelogs"
msgid "Changelog of type \"{action}\" for model {model} at {timestamp}" msgid "Changelog of type \"{action}\" for model {model} at {timestamp}"
msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}" msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}"
#: apps/participation/forms.py:15 apps/participation/models.py:25 #: apps/participation/forms.py:15 apps/participation/models.py:27
msgid "The trigram must be composed of three uppercase letters." msgid "The trigram must be composed of three uppercase letters."
msgstr "Le trigramme doit être composé de trois lettres majuscules." msgstr "Le trigramme doit être composé de trois lettres majuscules."
@ -115,40 +115,44 @@ msgstr "Je m'engage à participer à l'intégralité des Correspondances."
msgid "Message to address to the team:" msgid "Message to address to the team:"
msgstr "Message à adresser à l'équipe :" msgstr "Message à adresser à l'équipe :"
#: apps/participation/forms.py:91 #: apps/participation/forms.py:79
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
msgid "Start date must be before the end date." msgid "Start date must be before the end date."
msgstr "La date de début doit être avant la date de fin." msgstr "La date de début doit être avant la date de fin."
#: apps/participation/forms.py:93 #: apps/participation/forms.py:98
msgid "This phase must start after the previous phases." msgid "This phase must start after the previous phases."
msgstr "Cette phase doit commencer après les phases précédentes." msgstr "Cette phase doit commencer après les phases précédentes."
#: apps/participation/forms.py:95 #: apps/participation/forms.py:100
msgid "This phase must end after the next phases." msgid "This phase must end after the next phases."
msgstr "Cette phase doit finir avant les phases suivantes." msgstr "Cette phase doit finir avant les phases suivantes."
#: apps/participation/models.py:18 apps/participation/tables.py:30 #: apps/participation/models.py:20 apps/participation/tables.py:30
#: apps/participation/tables.py:52 apps/participation/tables.py:78 #: apps/participation/tables.py:52 apps/participation/tables.py:78
msgid "name" msgid "name"
msgstr "nom" msgstr "nom"
#: apps/participation/models.py:24 apps/participation/tables.py:57 #: apps/participation/models.py:26 apps/participation/tables.py:57
msgid "trigram" msgid "trigram"
msgstr "trigramme" msgstr "trigramme"
#: apps/participation/models.py:32 #: apps/participation/models.py:34
msgid "access code" msgid "access code"
msgstr "code d'accès" msgstr "code d'accès"
#: apps/participation/models.py:33 #: apps/participation/models.py:35
msgid "The access code let other people to join the team." 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." msgstr "Le code d'accès permet aux autres participants de rejoindre l'équipe."
#: apps/participation/models.py:37 #: apps/participation/models.py:39
msgid "Grant Animath to publish my video" msgid "Grant Animath to publish my video"
msgstr "Autoriser Animath à publier ma vidéo" msgstr "Autoriser Animath à publier ma vidéo"
#: apps/participation/models.py:38 #: apps/participation/models.py:40
msgid "" msgid ""
"Give the authorisation to publish the video on the main website to promote " "Give the authorisation to publish the video on the main website to promote "
"the action." "the action."
@ -156,101 +160,101 @@ msgstr ""
"Donner l'autorisation de publier la vidéo sur le site principal pour " "Donner l'autorisation de publier la vidéo sur le site principal pour "
"promouvoir les Correspondances." "promouvoir les Correspondances."
#: apps/participation/models.py:65 #: apps/participation/models.py:67
#, python-brace-format #, python-brace-format
msgid "Team {name} ({trigram})" msgid "Team {name} ({trigram})"
msgstr "Équipe {name} ({trigram})" msgstr "Équipe {name} ({trigram})"
#: apps/participation/models.py:68 apps/participation/models.py:79 #: apps/participation/models.py:70 apps/participation/models.py:81
#: apps/registration/models.py:89 apps/registration/models.py:134 #: apps/registration/models.py:89 apps/registration/models.py:134
msgid "team" msgid "team"
msgstr "équipe" msgstr "équipe"
#: apps/participation/models.py:69 #: apps/participation/models.py:71
msgid "teams" msgid "teams"
msgstr "équipes" msgstr "équipes"
#: apps/participation/models.py:83 #: apps/participation/models.py:85
#, python-brace-format #, python-brace-format
msgid "Problem #{problem:d}" msgid "Problem #{problem:d}"
msgstr "Problème n°{problem:d}" msgstr "Problème n°{problem:d}"
#: apps/participation/models.py:86 apps/participation/tables.py:35 #: apps/participation/models.py:88 apps/participation/tables.py:35
#: apps/participation/tables.py:62 #: apps/participation/tables.py:62
msgid "problem number" msgid "problem number"
msgstr "numéro de problème" msgstr "numéro de problème"
#: apps/participation/models.py:92 apps/participation/models.py:143 #: apps/participation/models.py:94 apps/participation/models.py:145
msgid "valid" msgid "valid"
msgstr "valide" msgstr "valide"
#: apps/participation/models.py:93 apps/participation/models.py:144 #: apps/participation/models.py:95 apps/participation/models.py:146
msgid "The video got the validation of the administrators." msgid "The video got the validation of the administrators."
msgstr "La vidéo a été validée par les administrateurs." msgstr "La vidéo a été validée par les administrateurs."
#: apps/participation/models.py:102 #: apps/participation/models.py:104
msgid "solution video" msgid "solution video"
msgstr "vidéo de solution" msgstr "vidéo de solution"
#: apps/participation/models.py:111 #: apps/participation/models.py:113
msgid "received participation" msgid "received participation"
msgstr "participation reçue" msgstr "participation reçue"
#: apps/participation/models.py:120 #: apps/participation/models.py:122
msgid "synthesis video" msgid "synthesis video"
msgstr "vidéo de synthèse" msgstr "vidéo de synthèse"
#: apps/participation/models.py:127 #: apps/participation/models.py:129
#, python-brace-format #, python-brace-format
msgid "Participation of the team {name} ({trigram})" msgid "Participation of the team {name} ({trigram})"
msgstr "Participation de l'équipe {name} ({trigram})" msgstr "Participation de l'équipe {name} ({trigram})"
#: apps/participation/models.py:130 #: apps/participation/models.py:132
msgid "participation" msgid "participation"
msgstr "participation" msgstr "participation"
#: apps/participation/models.py:131 #: apps/participation/models.py:133
msgid "participations" msgid "participations"
msgstr "participations" msgstr "participations"
#: apps/participation/models.py:136 #: apps/participation/models.py:138
msgid "link" msgid "link"
msgstr "lien" msgstr "lien"
#: apps/participation/models.py:137 #: apps/participation/models.py:139
msgid "The full video link." msgid "The full video link."
msgstr "Le lien complet de la vidéo." msgstr "Le lien complet de la vidéo."
#: apps/participation/models.py:166 #: apps/participation/models.py:173
#, python-brace-format #, python-brace-format
msgid "Video of team {name} ({trigram})" msgid "Video of team {name} ({trigram})"
msgstr "Vidéo de l'équipe {name} ({trigram})" msgstr "Vidéo de l'équipe {name} ({trigram})"
#: apps/participation/models.py:170 #: apps/participation/models.py:177
msgid "video" msgid "video"
msgstr "vidéo" msgstr "vidéo"
#: apps/participation/models.py:171 #: apps/participation/models.py:178
msgid "videos" msgid "videos"
msgstr "vidéos" msgstr "vidéos"
#: apps/participation/models.py:178 #: apps/participation/models.py:185
msgid "phase number" msgid "phase number"
msgstr "phase" msgstr "phase"
#: apps/participation/models.py:183 #: apps/participation/models.py:190
msgid "phase description" msgid "phase description"
msgstr "description" msgstr "description"
#: apps/participation/models.py:187 #: apps/participation/models.py:194
msgid "start date of the given phase" msgid "start date of the given phase"
msgstr "début de la phase" msgstr "début de la phase"
#: apps/participation/models.py:192 #: apps/participation/models.py:199
msgid "end date of the given phase" msgid "end date of the given phase"
msgstr "fin de la phase" msgstr "fin de la phase"
#: apps/participation/models.py:197 #: apps/participation/models.py:214
msgid "" msgid ""
"Phase {phase_number:d} starts on {start:%Y-%m-%d %H:%M} and ends on {end:%Y-" "Phase {phase_number:d} starts on {start:%Y-%m-%d %H:%M} and ends on {end:%Y-"
"%m-%d %H:%M}" "%m-%d %H:%M}"
@ -258,21 +262,21 @@ msgstr ""
"Phase {phase_number:d} démarrant le {start:%d/%m/%Y %H:%M} et finissant le " "Phase {phase_number:d} démarrant le {start:%d/%m/%Y %H:%M} et finissant le "
"{end:%d/%m/%Y %H:%M}" "{end:%d/%m/%Y %H:%M}"
#: apps/participation/models.py:201 #: apps/participation/models.py:218
msgid "phase" msgid "phase"
msgstr "phase" msgstr "phase"
#: apps/participation/models.py:202 #: apps/participation/models.py:219
msgid "phases" msgid "phases"
msgstr "phases" msgstr "phases"
#: apps/participation/templates/participation/create_team.html:11 #: apps/participation/templates/participation/create_team.html:11
#: templates/base.html:223 #: templates/base.html:229
msgid "Create" msgid "Create"
msgstr "Créer" msgstr "Créer"
#: apps/participation/templates/participation/join_team.html:11 #: apps/participation/templates/participation/join_team.html:11
#: templates/base.html:219 #: templates/base.html:225
msgid "Join" msgid "Join"
msgstr "Rejoindre" msgstr "Rejoindre"
@ -304,27 +308,35 @@ 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:23 #: apps/participation/templates/participation/participation_detail.html:23
msgid "Video link:" msgid "Proposed solution:"
msgstr "Lien de la vidéo :" msgstr "Solution proposée :"
#: apps/participation/templates/participation/participation_detail.html:26 #: apps/participation/templates/participation/participation_detail.html:27
#: apps/participation/templates/participation/participation_detail.html:41 #: apps/participation/templates/participation/participation_detail.html:39
#: 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:78 #: apps/registration/templates/registration/user_detail.html:78
msgid "Upload" msgid "Upload"
msgstr "Téléverser" msgstr "Téléverser"
#: apps/participation/templates/participation/participation_detail.html:33 #: apps/participation/templates/participation/participation_detail.html:30
msgid "This video platform is not supported yet." msgid "Display"
msgstr "La plateforme de cette vidéo n'est pas encore supportée." msgstr "Afficher"
#: apps/participation/templates/participation/participation_detail.html:40 #: apps/participation/templates/participation/participation_detail.html:38
msgid "Upload video" msgid "Upload video"
msgstr "Envoyer la vidéo" msgstr "Envoyer la vidéo"
#: apps/participation/templates/participation/participation_detail.html:42
msgid "Display solution"
msgstr "Afficher la solution"
#: apps/participation/templates/participation/participation_detail.html:43
msgid "This video platform is not supported yet."
msgstr "La plateforme de cette vidéo n'est pas encore supportée."
#: apps/participation/templates/participation/phase_form.html:11 #: apps/participation/templates/participation/phase_form.html:11
#: apps/participation/templates/participation/phase_list.html:13 #: apps/participation/templates/participation/phase_list.html:18
#: apps/participation/templates/participation/team_detail.html:61 #: apps/participation/templates/participation/team_detail.html:61
#: apps/participation/templates/participation/team_detail.html:117 #: apps/participation/templates/participation/team_detail.html:117
#: apps/participation/templates/participation/update_team.html:12 #: apps/participation/templates/participation/update_team.html:12
@ -334,12 +346,12 @@ msgstr "Envoyer la vidéo"
msgid "Update" msgid "Update"
msgstr "Modifier" msgstr "Modifier"
#: apps/participation/templates/participation/phase_list.html:6 #: apps/participation/templates/participation/phase_list.html:10
#: templates/base.html:67 #: templates/base.html:68 templates/base.html:70 templates/base.html:215
msgid "Calendar" msgid "Calendar"
msgstr "Calendrier" msgstr "Calendrier"
#: apps/participation/templates/participation/phase_list.html:12 #: apps/participation/templates/participation/phase_list.html:17
msgid "Update phase" msgid "Update phase"
msgstr "Modifier la phase" msgstr "Modifier la phase"
@ -427,8 +439,8 @@ msgstr "Invalider"
msgid "Update team" msgid "Update team"
msgstr "Modifier l'équipe" msgstr "Modifier l'équipe"
#: apps/participation/views.py:30 templates/base.html:73 #: apps/participation/views.py:30 templates/base.html:77
#: templates/base.html:222 #: templates/base.html:228
msgid "Create team" msgid "Create team"
msgstr "Créer une équipe" msgstr "Créer une équipe"
@ -440,8 +452,8 @@ msgstr "Vous ne participez pas, vous ne pouvez pas créer d'équipe."
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:60 templates/base.html:78 #: apps/participation/views.py:60 templates/base.html:82
#: templates/base.html:218 #: templates/base.html:224
msgid "Join team" msgid "Join team"
msgstr "Rejoindre une équipe" msgstr "Rejoindre une équipe"
@ -489,6 +501,12 @@ msgstr "Autorisations de droit à l'image de l'équipe {trigram}.zip"
msgid "The team is not validated yet." msgid "The team is not validated yet."
msgstr "L'équipe n'est pas encore validée." msgstr "L'équipe n'est pas encore validée."
#: apps/participation/views.py:268
#, fuzzy, python-brace-format
#| msgid "Participation of the team {name} ({trigram})"
msgid "Participation of team {trigram}"
msgstr "Participation de l'équipe {name} ({trigram})"
#: apps/registration/forms.py:13 #: apps/registration/forms.py:13
msgid "role" msgid "role"
msgstr "rôle" msgstr "rôle"
@ -678,7 +696,7 @@ msgid "Your password has been set. You may go ahead and log in now."
msgstr "Votre mot de passe a été changé. Vous pouvez désormais vous connecter." msgstr "Votre mot de passe a été changé. Vous pouvez désormais vous connecter."
#: apps/registration/templates/registration/password_reset_complete.html:10 #: apps/registration/templates/registration/password_reset_complete.html:10
#: templates/base.html:126 templates/base.html:213 templates/base.html:214 #: templates/base.html:130 templates/base.html:219 templates/base.html:220
#: templates/registration/login.html:7 templates/registration/login.html:8 #: templates/registration/login.html:7 templates/registration/login.html:8
#: templates/registration/login.html:25 #: templates/registration/login.html:25
msgid "Log in" msgid "Log in"
@ -902,43 +920,43 @@ msgstr ""
msgid "Home" msgid "Home"
msgstr "Accueil" msgstr "Accueil"
#: templates/base.html:84 #: templates/base.html:88
msgid "My team" msgid "My team"
msgstr "Mon équipe" msgstr "Mon équipe"
#: templates/base.html:89 #: templates/base.html:93
msgid "My participation" msgid "My participation"
msgstr "Ma participation" msgstr "Ma participation"
#: templates/base.html:96 #: templates/base.html:100
msgid "Make a gift" msgid "Make a gift"
msgstr "Faire un don" msgstr "Faire un don"
#: templates/base.html:100 #: templates/base.html:104
msgid "Administration" msgid "Administration"
msgstr "Administration" msgstr "Administration"
#: templates/base.html:108 #: templates/base.html:112
msgid "Search..." msgid "Search..."
msgstr "Chercher ..." msgstr "Chercher ..."
#: templates/base.html:117 #: templates/base.html:121
msgid "Return to admin view" msgid "Return to admin view"
msgstr "Retourner à l'interface administrateur" msgstr "Retourner à l'interface administrateur"
#: templates/base.html:122 #: templates/base.html:126
msgid "Register" msgid "Register"
msgstr "S'inscrire" msgstr "S'inscrire"
#: templates/base.html:138 #: templates/base.html:142
msgid "My account" msgid "My account"
msgstr "Mon compte" msgstr "Mon compte"
#: templates/base.html:141 #: templates/base.html:145
msgid "Log out" msgid "Log out"
msgstr "Déconnexion" msgstr "Déconnexion"
#: templates/base.html:157 #: templates/base.html:161
#, python-format #, python-format
msgid "" msgid ""
"Your email address is not validated. Please click on the link you received " "Your email address is not validated. Please click on the link you received "
@ -949,11 +967,11 @@ msgstr ""
"avez reçu par mail. Vous pouvez renvoyer un mail en cliquant sur <a href=" "avez reçu par mail. Vous pouvez renvoyer un mail en cliquant sur <a href="
"\"%(send_email_url)s\">ce lien</a>." "\"%(send_email_url)s\">ce lien</a>."
#: templates/base.html:180 #: templates/base.html:184
msgid "Contact us" msgid "Contact us"
msgstr "Nous contacter" msgstr "Nous contacter"
#: templates/base.html:211 #: templates/base.html:217
msgid "Search results" msgid "Search results"
msgstr "Résultats de la recherche" msgstr "Résultats de la recherche"
@ -989,6 +1007,3 @@ msgstr "Résultats"
#: templates/search/search.html:26 #: templates/search/search.html:26
msgid "No results found." msgid "No results found."
msgstr "Aucun résultat." msgstr "Aucun résultat."
#~ msgid "Only administrators are allowed to perform a full research."
#~ msgstr "Seuls les administrateurs sont autorisés à effectuer une recherche."