mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-02-24 19:41:18 +00:00
Compare commits
No commits in common. "5084bb65d96685c99a0ac878d536f8eb3cb45855" and "4ea93d34262f243f231fc748c63baf2b5eb1d038" have entirely different histories.
5084bb65d9
...
4ea93d3426
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: TFJM\n"
|
"Project-Id-Version: TFJM\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-03-27 00:47+0100\n"
|
"POT-Creation-Date: 2024-03-24 22:21+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: Emmy D'Anello <emmy.danello@animath.fr>\n"
|
"Last-Translator: Emmy D'Anello <emmy.danello@animath.fr>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -76,9 +76,9 @@ msgstr "Le tirage a commencé !"
|
|||||||
msgid "The draw for the tournament {tournament} will start."
|
msgid "The draw for the tournament {tournament} will start."
|
||||||
msgstr "Le tirage au sort du tournoi {tournament} va commencer."
|
msgstr "Le tirage au sort du tournoi {tournament} va commencer."
|
||||||
|
|
||||||
#: draw/consumers.py:240 draw/consumers.py:266 draw/consumers.py:674
|
#: draw/consumers.py:240 draw/consumers.py:266 draw/consumers.py:676
|
||||||
#: draw/consumers.py:891 draw/consumers.py:980 draw/consumers.py:998
|
#: draw/consumers.py:893 draw/consumers.py:982 draw/consumers.py:1000
|
||||||
#: draw/consumers.py:1088 draw/templates/draw/tournament_content.html:5
|
#: draw/consumers.py:1090 draw/templates/draw/tournament_content.html:5
|
||||||
msgid "The draw has not started yet."
|
msgid "The draw has not started yet."
|
||||||
msgstr "Le tirage au sort n'a pas encore commencé."
|
msgstr "Le tirage au sort n'a pas encore commencé."
|
||||||
|
|
||||||
@ -87,8 +87,8 @@ msgstr "Le tirage au sort n'a pas encore commencé."
|
|||||||
msgid "The draw for the tournament {tournament} is aborted."
|
msgid "The draw for the tournament {tournament} is aborted."
|
||||||
msgstr "Le tirage au sort du tournoi {tournament} est annulé."
|
msgstr "Le tirage au sort du tournoi {tournament} est annulé."
|
||||||
|
|
||||||
#: draw/consumers.py:293 draw/consumers.py:314 draw/consumers.py:609
|
#: draw/consumers.py:293 draw/consumers.py:314 draw/consumers.py:611
|
||||||
#: draw/consumers.py:679 draw/consumers.py:896
|
#: draw/consumers.py:681 draw/consumers.py:898
|
||||||
msgid "This is not the time for this."
|
msgid "This is not the time for this."
|
||||||
msgstr "Ce n'est pas le moment pour cela."
|
msgstr "Ce n'est pas le moment pour cela."
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ msgid "Dices from teams {teams} are identical. Please relaunch your dices."
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Les dés des équipes {teams} sont identiques. Merci de relancer vos dés."
|
"Les dés des équipes {teams} sont identiques. Merci de relancer vos dés."
|
||||||
|
|
||||||
#: draw/consumers.py:1001
|
#: draw/consumers.py:1003
|
||||||
msgid "This is only available for the final tournament."
|
msgid "This is only available for the final tournament."
|
||||||
msgstr "Cela n'est possible que pour la finale."
|
msgstr "Cela n'est possible que pour la finale."
|
||||||
|
|
||||||
@ -377,8 +377,8 @@ msgstr "Êtes-vous sûr·e de vouloir annuler le tirage au sort ?"
|
|||||||
msgid "Close"
|
msgid "Close"
|
||||||
msgstr "Fermer"
|
msgstr "Fermer"
|
||||||
|
|
||||||
#: draw/views.py:31 participation/views.py:155 participation/views.py:469
|
#: draw/views.py:31 participation/views.py:156 participation/views.py:442
|
||||||
#: participation/views.py:500
|
#: participation/views.py:473
|
||||||
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."
|
||||||
|
|
||||||
@ -474,74 +474,75 @@ msgstr "rapporteur⋅e"
|
|||||||
msgid "problem"
|
msgid "problem"
|
||||||
msgstr "numéro de problème"
|
msgstr "numéro de problème"
|
||||||
|
|
||||||
#: participation/forms.py:30
|
#: participation/forms.py:32
|
||||||
msgid "This name is already used."
|
msgid "This name is already used."
|
||||||
msgstr "Ce nom est déjà utilisé."
|
msgstr "Ce nom est déjà utilisé."
|
||||||
|
|
||||||
#: participation/forms.py:37 participation/models.py:39
|
#: participation/forms.py:39 participation/models.py:39
|
||||||
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."
|
||||||
|
|
||||||
#: participation/forms.py:40
|
#: participation/forms.py:42
|
||||||
msgid "This trigram is already used."
|
msgid "This trigram is already used."
|
||||||
msgstr "Ce trigramme est déjà utilisé."
|
msgstr "Ce trigramme est déjà utilisé."
|
||||||
|
|
||||||
#: participation/forms.py:55
|
#: participation/forms.py:57
|
||||||
msgid "No team was found with this access code."
|
msgid "No team was found with this access code."
|
||||||
msgstr "Aucune équipe n'a été trouvée avec ce code d'accès."
|
msgstr "Aucune équipe n'a été trouvée avec ce code d'accès."
|
||||||
|
|
||||||
#: participation/forms.py:59 participation/views.py:471
|
#: participation/forms.py:61 participation/views.py:444
|
||||||
msgid "The team is already validated or the validation is pending."
|
msgid "The team is already validated or the validation is pending."
|
||||||
msgstr "La validation de l'équipe est déjà faite ou en cours."
|
msgstr "La validation de l'équipe est déjà faite ou en cours."
|
||||||
|
|
||||||
#: participation/forms.py:88 participation/forms.py:358
|
#: participation/forms.py:90 participation/forms.py:360
|
||||||
#: registration/forms.py:122 registration/forms.py:144
|
#: registration/forms.py:122 registration/forms.py:144
|
||||||
#: registration/forms.py:166 registration/forms.py:188
|
#: registration/forms.py:166 registration/forms.py:188
|
||||||
#: registration/forms.py:237 registration/forms.py:270
|
#: registration/forms.py:237 registration/forms.py:270
|
||||||
msgid "The uploaded file size must be under 2 Mo."
|
msgid "The uploaded file size must be under 2 Mo."
|
||||||
msgstr "Le fichier envoyé doit peser moins de 2 Mo."
|
msgstr "Le fichier envoyé doit peser moins de 2 Mo."
|
||||||
|
|
||||||
#: participation/forms.py:90 registration/forms.py:124
|
#: participation/forms.py:92 registration/forms.py:124
|
||||||
#: registration/forms.py:146 registration/forms.py:168
|
#: registration/forms.py:146 registration/forms.py:168
|
||||||
#: registration/forms.py:190 registration/forms.py:239
|
#: registration/forms.py:190 registration/forms.py:239
|
||||||
#: registration/forms.py:272
|
#: registration/forms.py:272
|
||||||
msgid "The uploaded file must be a PDF, PNG of JPEG file."
|
msgid "The uploaded file must be a PDF, PNG of JPEG file."
|
||||||
msgstr "Le fichier envoyé doit être au format PDF, PNG ou JPEG."
|
msgstr "Le fichier envoyé doit être au format PDF, PNG ou JPEG."
|
||||||
|
|
||||||
#: participation/forms.py:108
|
#: participation/forms.py:110
|
||||||
msgid "I engage myself to participate to the whole TFJM²."
|
msgid "I engage myself to participate to the whole TFJM²."
|
||||||
msgstr "Je m'engage à participer à l'intégralité du TFJM²."
|
msgstr "Je m'engage à participer à l'intégralité du TFJM²."
|
||||||
|
|
||||||
#: participation/forms.py:123
|
#: participation/forms.py:125
|
||||||
msgid "Message to address to the team:"
|
msgid "Message to address to the team:"
|
||||||
msgstr "Message à adresser à l'équipe :"
|
msgstr "Message à adresser à l'équipe :"
|
||||||
|
|
||||||
#: participation/forms.py:158
|
#: participation/forms.py:160
|
||||||
msgid "The uploaded file size must be under 5 Mo."
|
msgid "The uploaded file size must be under 5 Mo."
|
||||||
msgstr "Le fichier envoyé doit peser moins de 5 Mo."
|
msgstr "Le fichier envoyé doit peser moins de 5 Mo."
|
||||||
|
|
||||||
#: participation/forms.py:160 participation/forms.py:360
|
#: participation/forms.py:162 participation/forms.py:362
|
||||||
msgid "The uploaded file must be a PDF file."
|
msgid "The uploaded file must be a PDF file."
|
||||||
msgstr "Le fichier envoyé doit être au format PDF."
|
msgstr "Le fichier envoyé doit être au format PDF."
|
||||||
|
|
||||||
#: participation/forms.py:164
|
#: participation/forms.py:166
|
||||||
msgid "The PDF file must not have more than 30 pages."
|
msgid "The PDF file must not have more than 30 pages."
|
||||||
msgstr "Le fichier PDF ne doit pas avoir plus de 30 pages."
|
msgstr "Le fichier PDF ne doit pas avoir plus de 30 pages."
|
||||||
|
|
||||||
#: participation/forms.py:236
|
#: participation/forms.py:238
|
||||||
#: participation/templates/participation/pool_detail.html:123
|
#: participation/templates/participation/pool_detail.html:123
|
||||||
|
#: participation/templates/participation/tournament_detail.html:139
|
||||||
msgid "Add"
|
msgid "Add"
|
||||||
msgstr "Ajouter"
|
msgstr "Ajouter"
|
||||||
|
|
||||||
#: participation/forms.py:251
|
#: participation/forms.py:253
|
||||||
msgid "This user already exists, but is a participant."
|
msgid "This user already exists, but is a participant."
|
||||||
msgstr "Cet⋅te utilisateur⋅rice existe déjà, mais en tant que participant⋅e."
|
msgstr "Cet⋅te utilisateur⋅rice existe déjà, mais en tant que participant⋅e."
|
||||||
|
|
||||||
#: participation/forms.py:262
|
#: participation/forms.py:264
|
||||||
msgid "CSV file:"
|
msgid "CSV file:"
|
||||||
msgstr "Tableur au format CSV :"
|
msgstr "Tableur au format CSV :"
|
||||||
|
|
||||||
#: participation/forms.py:286
|
#: participation/forms.py:288
|
||||||
msgid ""
|
msgid ""
|
||||||
"This file contains non-UTF-8 and non-ISO-8859-1 content. Please send your "
|
"This file contains non-UTF-8 and non-ISO-8859-1 content. Please send your "
|
||||||
"sheet as a CSV file."
|
"sheet as a CSV file."
|
||||||
@ -549,30 +550,30 @@ msgstr ""
|
|||||||
"Ce fichier contient des éléments non-UTF-8 et non-ISO-8859-1. Merci "
|
"Ce fichier contient des éléments non-UTF-8 et non-ISO-8859-1. Merci "
|
||||||
"d'envoyer votre tableur au format CSV."
|
"d'envoyer votre tableur au format CSV."
|
||||||
|
|
||||||
#: participation/forms.py:301
|
#: participation/forms.py:303
|
||||||
msgid "Can't determine the pool size. Are you sure your file is correct?"
|
msgid "Can't determine the pool size. Are you sure your file is correct?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossible de déterminer la taille de la poule. Êtes-vous sûr⋅e que le "
|
"Impossible de déterminer la taille de la poule. Êtes-vous sûr⋅e que le "
|
||||||
"fichier est correct ?"
|
"fichier est correct ?"
|
||||||
|
|
||||||
#: participation/forms.py:321
|
#: participation/forms.py:323
|
||||||
msgid "The following note is higher of the maximum expected value:"
|
msgid "The following note is higher of the maximum expected value:"
|
||||||
msgstr "La note suivante est supérieure au maximum attendu :"
|
msgstr "La note suivante est supérieure au maximum attendu :"
|
||||||
|
|
||||||
#: participation/forms.py:327
|
#: participation/forms.py:329
|
||||||
msgid "The following user was not found:"
|
msgid "The following user was not found:"
|
||||||
msgstr "L'utilisateur⋅rice suivant n'a pas été trouvé :"
|
msgstr "L'utilisateur⋅rice suivant n'a pas été trouvé :"
|
||||||
|
|
||||||
#: participation/forms.py:341
|
#: participation/forms.py:343
|
||||||
msgid "The defender, the opponent and the reporter must be different."
|
msgid "The defender, the opponent and the reporter must be different."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Les équipes défenseuse, opposante et rapportrice doivent être différent⋅es."
|
"Les équipes défenseuse, opposante et rapportrice doivent être différent⋅es."
|
||||||
|
|
||||||
#: participation/forms.py:345
|
#: participation/forms.py:347
|
||||||
msgid "This defender did not work on this problem."
|
msgid "This defender did not work on this problem."
|
||||||
msgstr "Ce⋅tte défenseur⋅se ne travaille pas sur ce problème."
|
msgstr "Ce⋅tte défenseur⋅se ne travaille pas sur ce problème."
|
||||||
|
|
||||||
#: participation/forms.py:364
|
#: participation/forms.py:366
|
||||||
msgid "The PDF file must not have more than 2 pages."
|
msgid "The PDF file must not have more than 2 pages."
|
||||||
msgstr "Le fichier PDF ne doit pas avoir plus de 2 pages."
|
msgstr "Le fichier PDF ne doit pas avoir plus de 2 pages."
|
||||||
|
|
||||||
@ -1150,27 +1151,23 @@ msgstr "Solutions :"
|
|||||||
msgid "No solution was uploaded yet."
|
msgid "No solution was uploaded yet."
|
||||||
msgstr "Aucune solution n'a encore été envoyée."
|
msgstr "Aucune solution n'a encore été envoyée."
|
||||||
|
|
||||||
#: participation/templates/participation/participation_detail.html:36
|
#: participation/templates/participation/participation_detail.html:37
|
||||||
msgid "Download as ZIP"
|
|
||||||
msgstr "Télécharger en tant que ZIP"
|
|
||||||
|
|
||||||
#: participation/templates/participation/participation_detail.html:43
|
|
||||||
msgid "Pools:"
|
msgid "Pools:"
|
||||||
msgstr "Poules :"
|
msgstr "Poules :"
|
||||||
|
|
||||||
#: participation/templates/participation/participation_detail.html:57
|
#: participation/templates/participation/participation_detail.html:51
|
||||||
msgid ""
|
msgid ""
|
||||||
"If you upload a solution, this will replace the version for the final "
|
"If you upload a solution, this will replace the version for the final "
|
||||||
"tournament."
|
"tournament."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Si vous envoyez une solution, elle va remplacer la version pour la finale."
|
"Si vous envoyez une solution, elle va remplacer la version pour la finale."
|
||||||
|
|
||||||
#: participation/templates/participation/participation_detail.html:60
|
#: participation/templates/participation/participation_detail.html:54
|
||||||
#: participation/templates/participation/participation_detail.html:64
|
#: participation/templates/participation/participation_detail.html:58
|
||||||
msgid "Upload solution"
|
msgid "Upload solution"
|
||||||
msgstr "Envoyer une solution"
|
msgstr "Envoyer une solution"
|
||||||
|
|
||||||
#: participation/templates/participation/participation_detail.html:65
|
#: participation/templates/participation/participation_detail.html:59
|
||||||
#: participation/templates/participation/passage_detail.html:132
|
#: participation/templates/participation/passage_detail.html:132
|
||||||
#: participation/templates/participation/pool_detail.html:138
|
#: participation/templates/participation/pool_detail.html:138
|
||||||
#: participation/templates/participation/team_detail.html:210
|
#: participation/templates/participation/team_detail.html:210
|
||||||
@ -1329,7 +1326,7 @@ msgid "BigBlueButton link:"
|
|||||||
msgstr "Lien BigBlueButton :"
|
msgstr "Lien BigBlueButton :"
|
||||||
|
|
||||||
#: participation/templates/participation/pool_detail.html:71
|
#: participation/templates/participation/pool_detail.html:71
|
||||||
#: participation/templates/participation/tournament_detail.html:98
|
#: participation/templates/participation/tournament_detail.html:105
|
||||||
msgid "Ranking"
|
msgid "Ranking"
|
||||||
msgstr "Classement"
|
msgstr "Classement"
|
||||||
|
|
||||||
@ -1553,7 +1550,7 @@ msgid "Invalidate"
|
|||||||
msgstr "Invalider"
|
msgstr "Invalider"
|
||||||
|
|
||||||
#: participation/templates/participation/team_detail.html:209
|
#: participation/templates/participation/team_detail.html:209
|
||||||
#: participation/views.py:326
|
#: participation/views.py:327
|
||||||
msgid "Upload motivation letter"
|
msgid "Upload motivation letter"
|
||||||
msgstr "Envoyer la lettre de motivation"
|
msgstr "Envoyer la lettre de motivation"
|
||||||
|
|
||||||
@ -1562,7 +1559,7 @@ msgid "Update team"
|
|||||||
msgstr "Modifier l'équipe"
|
msgstr "Modifier l'équipe"
|
||||||
|
|
||||||
#: participation/templates/participation/team_detail.html:219
|
#: participation/templates/participation/team_detail.html:219
|
||||||
#: participation/views.py:463
|
#: participation/views.py:436
|
||||||
msgid "Leave team"
|
msgid "Leave team"
|
||||||
msgstr "Quitter l'équipe"
|
msgstr "Quitter l'équipe"
|
||||||
|
|
||||||
@ -1635,30 +1632,38 @@ msgstr "Pour contacter les équipes valides"
|
|||||||
msgid "Edit tournament"
|
msgid "Edit tournament"
|
||||||
msgstr "Modifier le tournoi"
|
msgstr "Modifier le tournoi"
|
||||||
|
|
||||||
#: participation/templates/participation/tournament_detail.html:71
|
#: participation/templates/participation/tournament_detail.html:65
|
||||||
|
msgid "Export as CSV"
|
||||||
|
msgstr "Exporter en CSV"
|
||||||
|
|
||||||
|
#: participation/templates/participation/tournament_detail.html:72
|
||||||
#: tfjm/templates/navbar.html:29
|
#: tfjm/templates/navbar.html:29
|
||||||
msgid "Teams"
|
msgid "Teams"
|
||||||
msgstr "Équipes"
|
msgstr "Équipes"
|
||||||
|
|
||||||
#: participation/templates/participation/tournament_detail.html:79
|
#: participation/templates/participation/tournament_detail.html:80
|
||||||
msgid "Access to payments list"
|
msgid "Access to payments list"
|
||||||
msgstr "Accéder à la liste des paiements"
|
msgstr "Accéder à la liste des paiements"
|
||||||
|
|
||||||
#: participation/templates/participation/tournament_detail.html:87
|
#: participation/templates/participation/tournament_detail.html:88
|
||||||
msgid "Pools"
|
msgid "Pools"
|
||||||
msgstr "Poules"
|
msgstr "Poules"
|
||||||
|
|
||||||
#: participation/templates/participation/tournament_detail.html:114
|
#: participation/templates/participation/tournament_detail.html:96
|
||||||
|
msgid "Add new pool"
|
||||||
|
msgstr "Ajouter une nouvelle poule"
|
||||||
|
|
||||||
|
#: participation/templates/participation/tournament_detail.html:121
|
||||||
msgid "Publish notes for first round"
|
msgid "Publish notes for first round"
|
||||||
msgstr "Publier les notes pour le premier tour"
|
msgstr "Publier les notes pour le premier tour"
|
||||||
|
|
||||||
#: participation/templates/participation/tournament_detail.html:120
|
#: participation/templates/participation/tournament_detail.html:127
|
||||||
msgid "Publish notes for second round"
|
msgid "Publish notes for second round"
|
||||||
msgstr "Publier les notes pour le second tour"
|
msgstr "Publier les notes pour le second tour"
|
||||||
|
|
||||||
#: participation/templates/participation/tournament_detail.html:133
|
#: participation/templates/participation/tournament_detail.html:138
|
||||||
msgid "Files available for download"
|
msgid "Add pool"
|
||||||
msgstr "Fichiers disponibles au téléchargement"
|
msgstr "Ajouter une poule"
|
||||||
|
|
||||||
#: participation/templates/participation/tournament_list.html:6
|
#: participation/templates/participation/tournament_list.html:6
|
||||||
#: tfjm/templates/base.html:67
|
#: tfjm/templates/base.html:67
|
||||||
@ -1689,44 +1694,44 @@ msgstr "Modèles :"
|
|||||||
msgid "Warning: non-free format"
|
msgid "Warning: non-free format"
|
||||||
msgstr "Attention : format non libre"
|
msgstr "Attention : format non libre"
|
||||||
|
|
||||||
#: participation/views.py:55 tfjm/templates/base.html:79
|
#: participation/views.py:56 tfjm/templates/base.html:79
|
||||||
#: tfjm/templates/navbar.html:35
|
#: tfjm/templates/navbar.html:35
|
||||||
msgid "Create team"
|
msgid "Create team"
|
||||||
msgstr "Créer une équipe"
|
msgstr "Créer une équipe"
|
||||||
|
|
||||||
#: participation/views.py:64 participation/views.py:105
|
#: participation/views.py:65 participation/views.py:106
|
||||||
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."
|
||||||
|
|
||||||
#: participation/views.py:66 participation/views.py:107
|
#: participation/views.py:67 participation/views.py:108
|
||||||
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."
|
||||||
|
|
||||||
#: participation/views.py:96 tfjm/templates/base.html:74
|
#: participation/views.py:97 tfjm/templates/base.html:74
|
||||||
#: tfjm/templates/navbar.html:40
|
#: tfjm/templates/navbar.html:40
|
||||||
msgid "Join team"
|
msgid "Join team"
|
||||||
msgstr "Rejoindre une équipe"
|
msgstr "Rejoindre une équipe"
|
||||||
|
|
||||||
#: participation/views.py:156 participation/views.py:501
|
#: participation/views.py:157 participation/views.py:474
|
||||||
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."
|
||||||
|
|
||||||
#: participation/views.py:182
|
#: participation/views.py:183
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Detail of team {trigram}"
|
msgid "Detail of team {trigram}"
|
||||||
msgstr "Détails de l'équipe {trigram}"
|
msgstr "Détails de l'équipe {trigram}"
|
||||||
|
|
||||||
#: participation/views.py:211
|
#: participation/views.py:212
|
||||||
msgid "You don't participate, so you can't request the validation of the team."
|
msgid "You don't participate, so you can't request the validation of the team."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Vous ne participez pas, vous ne pouvez pas demander la validation de "
|
"Vous ne participez pas, vous ne pouvez pas demander la validation de "
|
||||||
"l'équipe."
|
"l'équipe."
|
||||||
|
|
||||||
#: participation/views.py:214
|
#: participation/views.py:215
|
||||||
msgid "The validation of the team is already done or pending."
|
msgid "The validation of the team is already done or pending."
|
||||||
msgstr "La validation de l'équipe est déjà faite ou en cours."
|
msgstr "La validation de l'équipe est déjà faite ou en cours."
|
||||||
|
|
||||||
#: participation/views.py:217
|
#: participation/views.py:218
|
||||||
msgid ""
|
msgid ""
|
||||||
"The team can't be validated: missing email address confirmations, "
|
"The team can't be validated: missing email address confirmations, "
|
||||||
"authorizations, people, motivation letter or the tournament is not set."
|
"authorizations, people, motivation letter or the tournament is not set."
|
||||||
@ -1735,148 +1740,123 @@ msgstr ""
|
|||||||
"d'adresse e-mail, soit une autorisation, soit des personnes, soit la lettre "
|
"d'adresse e-mail, soit une autorisation, soit des personnes, soit la lettre "
|
||||||
"de motivation, soit le tournoi n'a pas été choisi."
|
"de motivation, soit le tournoi n'a pas été choisi."
|
||||||
|
|
||||||
#: participation/views.py:239
|
#: participation/views.py:240
|
||||||
msgid "You are not an organizer of the tournament."
|
msgid "You are not an organizer of the tournament."
|
||||||
msgstr "Vous n'êtes pas un⋅e organisateur⋅rice du tournoi."
|
msgstr "Vous n'êtes pas un⋅e organisateur⋅rice du tournoi."
|
||||||
|
|
||||||
#: participation/views.py:242
|
#: participation/views.py:243
|
||||||
msgid "This team has no pending validation."
|
msgid "This team has no pending validation."
|
||||||
msgstr "L'équipe n'a pas de validation en attente."
|
msgstr "L'équipe n'a pas de validation en attente."
|
||||||
|
|
||||||
#: participation/views.py:269
|
#: participation/views.py:270
|
||||||
msgid "You must specify if you validate the registration or not."
|
msgid "You must specify if you validate the registration or not."
|
||||||
msgstr "Vous devez spécifier si vous validez l'inscription ou non."
|
msgstr "Vous devez spécifier si vous validez l'inscription ou non."
|
||||||
|
|
||||||
#: participation/views.py:304
|
#: participation/views.py:305
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Update team {trigram}"
|
msgid "Update team {trigram}"
|
||||||
msgstr "Mise à jour de l'équipe {trigram}"
|
msgstr "Mise à jour de l'équipe {trigram}"
|
||||||
|
|
||||||
#: participation/views.py:365 participation/views.py:448
|
#: participation/views.py:366 participation/views.py:422
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Motivation letter of {team}.{ext}"
|
msgid "Motivation letter of {team}.{ext}"
|
||||||
msgstr "Lettre de motivation de {team}.{ext}"
|
msgstr "Lettre de motivation de {team}.{ext}"
|
||||||
|
|
||||||
#: participation/views.py:397
|
#: participation/views.py:397
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Authorizations of team {trigram}.zip"
|
|
||||||
msgstr "Autorisations de l'équipe {trigram}.zip"
|
|
||||||
|
|
||||||
#: participation/views.py:401
|
|
||||||
#, python-brace-format
|
|
||||||
msgid "Authorizations of {tournament}.zip"
|
|
||||||
msgstr "Autorisations du tournoi {tournament}.zip"
|
|
||||||
|
|
||||||
#: participation/views.py:417
|
|
||||||
#, python-brace-format
|
|
||||||
msgid "Photo authorization of {participant}.{ext}"
|
msgid "Photo authorization of {participant}.{ext}"
|
||||||
msgstr "Autorisation de droit à l'image de {participant}.{ext}"
|
msgstr "Autorisation de droit à l'image de {participant}.{ext}"
|
||||||
|
|
||||||
#: participation/views.py:425
|
#: participation/views.py:403
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Parental authorization of {participant}.{ext}"
|
msgid "Parental authorization of {participant}.{ext}"
|
||||||
msgstr "Autorisation parentale de {participant}.{ext}"
|
msgstr "Autorisation parentale de {participant}.{ext}"
|
||||||
|
|
||||||
#: participation/views.py:433
|
#: participation/views.py:410
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Health sheet of {participant}.{ext}"
|
msgid "Health sheet of {participant}.{ext}"
|
||||||
msgstr "Fiche sanitaire de {participant}.{ext}"
|
msgstr "Fiche sanitaire de {participant}.{ext}"
|
||||||
|
|
||||||
#: participation/views.py:441
|
#: participation/views.py:416
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Vaccine sheet of {participant}.{ext}"
|
msgid "Vaccine sheet of {participant}.{ext}"
|
||||||
msgstr "Carnet de vaccination de {participant}.{ext}"
|
msgstr "Carnet de vaccination de {participant}.{ext}"
|
||||||
|
|
||||||
#: participation/views.py:515
|
#: participation/views.py:426
|
||||||
|
#, python-brace-format
|
||||||
|
msgid "Photo authorizations of team {trigram}.zip"
|
||||||
|
msgstr "Autorisations de droit à l'image de l'équipe {trigram}.zip"
|
||||||
|
|
||||||
|
#: participation/views.py:488
|
||||||
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."
|
||||||
|
|
||||||
#: participation/views.py:529
|
#: participation/views.py:502
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Participation of team {trigram}"
|
msgid "Participation of team {trigram}"
|
||||||
msgstr "Participation de l'équipe {trigram}"
|
msgstr "Participation de l'équipe {trigram}"
|
||||||
|
|
||||||
#: participation/views.py:611
|
#: participation/views.py:584
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Payments of {tournament}"
|
msgid "Payments of {tournament}"
|
||||||
msgstr "Paiements de {tournament}"
|
msgstr "Paiements de {tournament}"
|
||||||
|
|
||||||
#: participation/views.py:706
|
#: participation/views.py:657
|
||||||
msgid "Notes published!"
|
msgid "Notes published!"
|
||||||
msgstr "Notes publiées !"
|
msgstr "Notes publiées !"
|
||||||
|
|
||||||
#: participation/views.py:742
|
#: participation/views.py:693
|
||||||
msgid "You can't upload a solution after the deadline."
|
msgid "You can't upload a solution after the deadline."
|
||||||
msgstr "Vous ne pouvez pas envoyer de solution après la date limite."
|
msgstr "Vous ne pouvez pas envoyer de solution après la date limite."
|
||||||
|
|
||||||
#: participation/views.py:866
|
#: participation/views.py:802
|
||||||
#, python-brace-format
|
|
||||||
msgid "Solutions of team {trigram}.zip"
|
|
||||||
msgstr "Solutions de l'équipe {trigram}.zip"
|
|
||||||
|
|
||||||
#: participation/views.py:866
|
|
||||||
#, python-brace-format
|
|
||||||
msgid "Syntheses of team {trigram}.zip"
|
|
||||||
msgstr "Notes de synthèse de l'équipe {trigram}.zip"
|
|
||||||
|
|
||||||
#: participation/views.py:883 participation/views.py:898
|
|
||||||
#, python-brace-format
|
|
||||||
msgid "Solutions of {tournament}.zip"
|
|
||||||
msgstr "Solutions de {tournament}.zip"
|
|
||||||
|
|
||||||
#: participation/views.py:883 participation/views.py:898
|
|
||||||
#, python-brace-format
|
|
||||||
msgid "Syntheses of {tournament}.zip"
|
|
||||||
msgstr "Notes de synthèse de {tournament}.zip"
|
|
||||||
|
|
||||||
#: participation/views.py:907
|
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Solutions for pool {pool} of tournament {tournament}.zip"
|
msgid "Solutions for pool {pool} of tournament {tournament}.zip"
|
||||||
msgstr "Solutions pour la poule {pool} du tournoi {tournament}.zip"
|
msgstr "Solutions pour la poule {pool} du tournoi {tournament}.zip"
|
||||||
|
|
||||||
#: participation/views.py:908
|
#: participation/views.py:803
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Syntheses for pool {pool} of tournament {tournament}.zip"
|
msgid "Syntheses for pool {pool} of tournament {tournament}.zip"
|
||||||
msgstr "Notes de synthèses pour la poule {pool} du tournoi {tournament}.zip"
|
msgstr "Notes de synthèses pour la poule {pool} du tournoi {tournament}.zip"
|
||||||
|
|
||||||
#: participation/views.py:950
|
#: participation/views.py:833
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Jury of pool {pool} for {tournament} with teams {teams}"
|
msgid "Jury of pool {pool} for {tournament} with teams {teams}"
|
||||||
msgstr "Jury de la poule {pool} pour {tournament} avec les équipes {teams}"
|
msgstr "Jury de la poule {pool} pour {tournament} avec les équipes {teams}"
|
||||||
|
|
||||||
#: participation/views.py:966
|
#: participation/views.py:849
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "The jury {name} is already in the pool!"
|
msgid "The jury {name} is already in the pool!"
|
||||||
msgstr "{name} est déjà dans la poule !"
|
msgstr "{name} est déjà dans la poule !"
|
||||||
|
|
||||||
#: participation/views.py:986
|
#: participation/views.py:869
|
||||||
msgid "New TFJM² jury account"
|
msgid "New TFJM² jury account"
|
||||||
msgstr "Nouveau compte de juré⋅e pour le TFJM²"
|
msgstr "Nouveau compte de juré⋅e pour le TFJM²"
|
||||||
|
|
||||||
#: participation/views.py:1003
|
#: participation/views.py:886
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "The jury {name} has been successfully added!"
|
msgid "The jury {name} has been successfully added!"
|
||||||
msgstr "{name} a été ajouté⋅e avec succès en tant que juré⋅e !"
|
msgstr "{name} a été ajouté⋅e avec succès en tant que juré⋅e !"
|
||||||
|
|
||||||
#: participation/views.py:1038
|
#: participation/views.py:921
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "The jury {name} has been successfully removed!"
|
msgid "The jury {name} has been successfully removed!"
|
||||||
msgstr "{name} a été retiré⋅e avec succès du jury !"
|
msgstr "{name} a été retiré⋅e avec succès du jury !"
|
||||||
|
|
||||||
#: participation/views.py:1064
|
#: participation/views.py:947
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "The jury {name} has been successfully promoted president!"
|
msgid "The jury {name} has been successfully promoted president!"
|
||||||
msgstr "{name} a été nommé⋅e président⋅e du jury !"
|
msgstr "{name} a été nommé⋅e président⋅e du jury !"
|
||||||
|
|
||||||
#: participation/views.py:1092
|
#: participation/views.py:975
|
||||||
msgid "The following user is not registered as a jury:"
|
msgid "The following user is not registered as a jury:"
|
||||||
msgstr "L'utilisateur⋅rice suivant n'est pas inscrit⋅e en tant que juré⋅e :"
|
msgstr "L'utilisateur⋅rice suivant n'est pas inscrit⋅e en tant que juré⋅e :"
|
||||||
|
|
||||||
#: participation/views.py:1106
|
#: participation/views.py:989
|
||||||
msgid "Notes were successfully uploaded."
|
msgid "Notes were successfully uploaded."
|
||||||
msgstr "Les notes ont bien été envoyées."
|
msgstr "Les notes ont bien été envoyées."
|
||||||
|
|
||||||
#: participation/views.py:1811
|
#: participation/views.py:1694
|
||||||
msgid "You can't upload a synthesis after the deadline."
|
msgid "You can't upload a synthesis after the deadline."
|
||||||
msgstr "Vous ne pouvez pas envoyer de note de synthèse après la date limite."
|
msgstr "Vous ne pouvez pas envoyer de note de synthèse après la date limite."
|
||||||
|
|
||||||
@ -3346,12 +3326,3 @@ msgstr "Aucun résultat."
|
|||||||
#: tfjm/templates/sidebar.html:10 tfjm/templates/sidebar.html:21
|
#: tfjm/templates/sidebar.html:10 tfjm/templates/sidebar.html:21
|
||||||
msgid "Informations"
|
msgid "Informations"
|
||||||
msgstr "Informations"
|
msgstr "Informations"
|
||||||
|
|
||||||
#~ msgid "Export as CSV"
|
|
||||||
#~ msgstr "Exporter en CSV"
|
|
||||||
|
|
||||||
#~ msgid "Add new pool"
|
|
||||||
#~ msgstr "Ajouter une nouvelle poule"
|
|
||||||
|
|
||||||
#~ msgid "Add pool"
|
|
||||||
#~ msgstr "Ajouter une poule"
|
|
||||||
|
@ -30,12 +30,6 @@
|
|||||||
{% empty %}
|
{% empty %}
|
||||||
<li>{% trans "No solution was uploaded yet." %}</li>
|
<li>{% trans "No solution was uploaded yet." %}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<li>
|
|
||||||
<a href="{% url "participation:participation_solutions" team_id=participation.team_id %}"
|
|
||||||
class="btn btn-sm btn-info">
|
|
||||||
<i class="fas fa-archive"></i> {% trans "Download as ZIP" %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
{% for passage in pool.passages.all %}
|
{% for passage in pool.passages.all %}
|
||||||
<a href="{{ passage.defended_solution.file.url }}">{{ passage.defender.team.trigram }} — {{ passage.get_solution_number_display }}</a>{% if not forloop.last %}, {% endif %}
|
<a href="{{ passage.defended_solution.file.url }}">{{ passage.defender.team.trigram }} — {{ passage.get_solution_number_display }}</a>{% if not forloop.last %}, {% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<a href="{% url 'participation:pool_download_solutions' pool_id=pool.id %}" class="badge rounded-pill text-bg-secondary">
|
<a href="{% url 'participation:pool_download_solutions' pk=pool.pk %}" class="badge rounded-pill text-bg-secondary">
|
||||||
<i class="fas fa-download"></i> {% trans "Download all" %}
|
<i class="fas fa-download"></i> {% trans "Download all" %}
|
||||||
</a>
|
</a>
|
||||||
</dd>
|
</dd>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<a href="{% url 'participation:pool_download_syntheses' pool_id=pool.id %}" class="badge rounded-pill text-bg-secondary">
|
<a href="{% url 'participation:pool_download_syntheses' pk=pool.pk %}" class="badge rounded-pill text-bg-secondary">
|
||||||
<i class="fas fa-download"></i> {% trans "Download all" %}
|
<i class="fas fa-download"></i> {% trans "Download all" %}
|
||||||
</a>
|
</a>
|
||||||
</dd>
|
</dd>
|
||||||
|
@ -116,7 +116,7 @@
|
|||||||
{% if user.registration.is_volunteer %}
|
{% if user.registration.is_volunteer %}
|
||||||
{% if user.registration in self.team.participation.tournament.organizers or user.registration.is_admin %}
|
{% if user.registration in self.team.participation.tournament.organizers or user.registration.is_admin %}
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<a class="btn btn-info" href="{% url "participation:team_authorizations" team_id=team.id %}">
|
<a class="btn btn-info" href="{% url "participation:team_authorizations" pk=team.pk %}">
|
||||||
<i class="fas fa-file-archive"></i> {% trans "Download all submitted authorizations" %}
|
<i class="fas fa-file-archive"></i> {% trans "Download all submitted authorizations" %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
{% if user.registration.is_admin or user.registration in tournament.organizers.all %}
|
{% if user.registration.is_admin or user.registration in tournament.organizers.all %}
|
||||||
<div class="card-footer text-center">
|
<div class="card-footer text-center">
|
||||||
<a href="{% url "participation:tournament_update" pk=tournament.pk %}"><button class="btn btn-secondary">{% trans "Edit tournament" %}</button></a>
|
<a href="{% url "participation:tournament_update" pk=tournament.pk %}"><button class="btn btn-secondary">{% trans "Edit tournament" %}</button></a>
|
||||||
|
<a href="{% url "participation:tournament_csv" pk=tournament.pk %}"><button class="btn btn-success">{% trans "Export as CSV" %}</button></a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@ -90,6 +91,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if user.registration.is_admin %}
|
||||||
|
<div class="d-grid">
|
||||||
|
<button class="btn gap-0 btn-success" data-bs-toggle="modal" data-bs-target="#addPoolModal">{% trans "Add new pool" %}</button>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if notes %}
|
{% if notes %}
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
@ -127,86 +134,20 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if user.registration.is_admin or user.registration in tournament.organizers.all %}
|
{% if user.registration.is_admin %}
|
||||||
<hr>
|
{% trans "Add pool" as modal_title %}
|
||||||
|
{% trans "Add" as modal_button %}
|
||||||
<h3>{% trans "Files available for download" %}</h3>
|
{% url "participation:pool_create" as modal_action %}
|
||||||
|
{% include "base_modal.html" with modal_id="addPool" %}
|
||||||
<div class="alert alert-warning fade show files-to-download-collapse" id="files-to-download-popup">
|
|
||||||
<h4>IMPORTANT</h4>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Les fichiers accessibles ci-dessous peuvent contenir des informations personnelles.
|
|
||||||
Par conformité avec le droit européen et par respect de la confidentialité des données
|
|
||||||
des participant⋅es, vous ne devez utiliser ces données que dans un cadre strictement
|
|
||||||
nécessaire en lien avec l'organisation du tournoi.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
De plus, il est de votre responsabilité de supprimer ces fichiers une fois que vous
|
|
||||||
n'en avez plus besoin, notamment à la fin du tournoi.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p class="text-center">
|
|
||||||
<button class="btn btn-warning" data-bs-toggle="collapse" href=".files-to-download-collapse"
|
|
||||||
role="button" aria-expanded="false" aria-controls="files-to-download files-to-download-popup">
|
|
||||||
Je m'engage à ne pas divulguer les données des participant⋅es
|
|
||||||
et de les supprimer à l'issue du tournoi
|
|
||||||
</button>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card bg-body shadow fade collapse files-to-download-collapse" id="files-to-download">
|
|
||||||
<div class="card-body">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="{% url "participation:tournament_csv" pk=tournament.pk %}">
|
|
||||||
Tableur de données des participant⋅es des équipes validées
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url "participation:tournament_csv" pk=tournament.pk %}?all">
|
|
||||||
Tableur de données des participant⋅es de toutes les équipes
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url "participation:tournament_authorizations" tournament_id=tournament.id %}">
|
|
||||||
Archive de toutes les autorisations triées par équipe et par personne
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url "participation:tournament_solutions" tournament_id=tournament.id %}">
|
|
||||||
Archive de toutes les solutions envoyées triées par équipe
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url "participation:tournament_solutions" tournament_id=tournament.id %}?sort_by=problem">
|
|
||||||
Archive de toutes les solutions envoyées triées par problème
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url "participation:tournament_solutions" tournament_id=tournament.id %}?sort_by=pool">
|
|
||||||
Archive de toutes les solutions envoyées triées par poule
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url "participation:tournament_syntheses" tournament_id=tournament.id %}?sort_by=pool">
|
|
||||||
Archive de toutes les notes de synthèse triées par poule et par passage
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a>
|
|
||||||
Archive de tous les barèmes de notes à imprimer triés par poule
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a>
|
|
||||||
Archive de tous les tableurs de notes à saisir triés par poule
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block extrajavascript %}
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
{% if user.registration.is_admin %}
|
||||||
|
initModal("addPool", "{% url "participation:pool_create" %}")
|
||||||
|
{% endif %}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -6,12 +6,12 @@ from django.views.generic import TemplateView
|
|||||||
|
|
||||||
from .views import CreateTeamView, FinalNotationSheetTemplateView, JoinTeamView, MyParticipationDetailView, \
|
from .views import CreateTeamView, FinalNotationSheetTemplateView, JoinTeamView, MyParticipationDetailView, \
|
||||||
MyTeamDetailView, NoteUpdateView, ParticipationDetailView, PassageCreateView, PassageDetailView, \
|
MyTeamDetailView, NoteUpdateView, ParticipationDetailView, PassageCreateView, PassageDetailView, \
|
||||||
PassageUpdateView, PoolCreateView, PoolDetailView, PoolJuryView, PoolNotesTemplateView, \
|
PassageUpdateView, PoolCreateView, PoolDetailView, PoolDownloadView, PoolJuryView, PoolNotesTemplateView, \
|
||||||
PoolPresideJuryView, PoolRemoveJuryView, PoolUpdateTeamsView, PoolUpdateView, PoolUploadNotesView, \
|
PoolPresideJuryView, PoolRemoveJuryView, PoolUpdateTeamsView, PoolUpdateView, PoolUploadNotesView, \
|
||||||
ScaleNotationSheetTemplateView, SolutionsDownloadView, SolutionUploadView, SynthesisUploadView, \
|
ScaleNotationSheetTemplateView, SolutionUploadView, SynthesisUploadView, TeamAuthorizationsView, TeamDetailView, \
|
||||||
TeamAuthorizationsView, TeamDetailView, TeamLeaveView, TeamListView, TeamUpdateView, \
|
TeamLeaveView, TeamListView, TeamUpdateView, TeamUploadMotivationLetterView, TournamentCreateView, \
|
||||||
TeamUploadMotivationLetterView, TournamentCreateView, TournamentDetailView, TournamentExportCSVView, \
|
TournamentDetailView, TournamentExportCSVView, TournamentListView, TournamentPaymentsView, \
|
||||||
TournamentListView, TournamentPaymentsView, TournamentPublishNotesView, TournamentUpdateView
|
TournamentPublishNotesView, TournamentUpdateView
|
||||||
|
|
||||||
|
|
||||||
app_name = "participation"
|
app_name = "participation"
|
||||||
@ -25,31 +25,24 @@ urlpatterns = [
|
|||||||
path("team/<int:pk>/update/", TeamUpdateView.as_view(), name="update_team"),
|
path("team/<int:pk>/update/", TeamUpdateView.as_view(), name="update_team"),
|
||||||
path("team/<int:pk>/upload-motivation-letter/", TeamUploadMotivationLetterView.as_view(),
|
path("team/<int:pk>/upload-motivation-letter/", TeamUploadMotivationLetterView.as_view(),
|
||||||
name="upload_team_motivation_letter"),
|
name="upload_team_motivation_letter"),
|
||||||
path("team/<int:team_id>/authorizations/", TeamAuthorizationsView.as_view(), name="team_authorizations"),
|
path("team/<int:pk>/authorizations/", TeamAuthorizationsView.as_view(), name="team_authorizations"),
|
||||||
path("team/leave/", TeamLeaveView.as_view(), name="team_leave"),
|
path("team/leave/", TeamLeaveView.as_view(), name="team_leave"),
|
||||||
path("detail/", MyParticipationDetailView.as_view(), name="my_participation_detail"),
|
path("detail/", MyParticipationDetailView.as_view(), name="my_participation_detail"),
|
||||||
path("detail/<int:pk>/", ParticipationDetailView.as_view(), name="participation_detail"),
|
path("detail/<int:pk>/", ParticipationDetailView.as_view(), name="participation_detail"),
|
||||||
path("detail/<int:pk>/solution/", SolutionUploadView.as_view(), name="upload_solution"),
|
path("detail/<int:pk>/solution/", SolutionUploadView.as_view(), name="upload_solution"),
|
||||||
path("detail/<int:team_id>/solutions/", SolutionsDownloadView.as_view(), name="participation_solutions"),
|
|
||||||
path("tournament/", TournamentListView.as_view(), name="tournament_list"),
|
path("tournament/", TournamentListView.as_view(), name="tournament_list"),
|
||||||
path("tournament/create/", TournamentCreateView.as_view(), name="tournament_create"),
|
path("tournament/create/", TournamentCreateView.as_view(), name="tournament_create"),
|
||||||
path("tournament/<int:pk>/", TournamentDetailView.as_view(), name="tournament_detail"),
|
path("tournament/<int:pk>/", TournamentDetailView.as_view(), name="tournament_detail"),
|
||||||
path("tournament/<int:pk>/update/", TournamentUpdateView.as_view(), name="tournament_update"),
|
path("tournament/<int:pk>/update/", TournamentUpdateView.as_view(), name="tournament_update"),
|
||||||
path("tournament/<int:pk>/payments/", TournamentPaymentsView.as_view(), name="tournament_payments"),
|
path("tournament/<int:pk>/payments/", TournamentPaymentsView.as_view(), name="tournament_payments"),
|
||||||
path("tournament/<int:pk>/csv/", TournamentExportCSVView.as_view(), name="tournament_csv"),
|
path("tournament/<int:pk>/csv/", TournamentExportCSVView.as_view(), name="tournament_csv"),
|
||||||
path("tournament/<int:tournament_id>/authorizations/", TeamAuthorizationsView.as_view(),
|
|
||||||
name="tournament_authorizations"),
|
|
||||||
path("tournament/<int:tournament_id>/solutions/", SolutionsDownloadView.as_view(),
|
|
||||||
name="tournament_solutions"),
|
|
||||||
path("tournament/<int:tournament_id>/syntheses/", SolutionsDownloadView.as_view(),
|
|
||||||
name="tournament_syntheses"),
|
|
||||||
path("tournament/<int:pk>/publish-notes/<int:round>/", TournamentPublishNotesView.as_view(),
|
path("tournament/<int:pk>/publish-notes/<int:round>/", TournamentPublishNotesView.as_view(),
|
||||||
name="tournament_publish_notes"),
|
name="tournament_publish_notes"),
|
||||||
path("pools/create/", PoolCreateView.as_view(), name="pool_create"),
|
path("pools/create/", PoolCreateView.as_view(), name="pool_create"),
|
||||||
path("pools/<int:pk>/", PoolDetailView.as_view(), name="pool_detail"),
|
path("pools/<int:pk>/", PoolDetailView.as_view(), name="pool_detail"),
|
||||||
path("pools/<int:pk>/update/", PoolUpdateView.as_view(), name="pool_update"),
|
path("pools/<int:pk>/update/", PoolUpdateView.as_view(), name="pool_update"),
|
||||||
path("pools/<int:pool_id>/solutions/", SolutionsDownloadView.as_view(), name="pool_download_solutions"),
|
path("pools/<int:pk>/solutions/", PoolDownloadView.as_view(), name="pool_download_solutions"),
|
||||||
path("pools/<int:pool_id>/syntheses/", SolutionsDownloadView.as_view(), name="pool_download_syntheses"),
|
path("pools/<int:pk>/syntheses/", PoolDownloadView.as_view(), name="pool_download_syntheses"),
|
||||||
path("pools/<int:pk>/notation/scale/", ScaleNotationSheetTemplateView.as_view(), name="pool_scale_note_sheet"),
|
path("pools/<int:pk>/notation/scale/", ScaleNotationSheetTemplateView.as_view(), name="pool_scale_note_sheet"),
|
||||||
path("pools/<int:pk>/notation/final/", FinalNotationSheetTemplateView.as_view(), name="pool_final_note_sheet"),
|
path("pools/<int:pk>/notation/final/", FinalNotationSheetTemplateView.as_view(), name="pool_final_note_sheet"),
|
||||||
path("pools/<int:pk>/update-teams/", PoolUpdateTeamsView.as_view(), name="pool_update_teams"),
|
path("pools/<int:pk>/update-teams/", PoolUpdateTeamsView.as_view(), name="pool_update_teams"),
|
||||||
|
@ -33,7 +33,7 @@ from odf.opendocument import OpenDocumentSpreadsheet
|
|||||||
from odf.style import Style, TableCellProperties, TableColumnProperties, TextProperties
|
from odf.style import Style, TableCellProperties, TableColumnProperties, TextProperties
|
||||||
from odf.table import CoveredTableCell, Table, TableCell, TableColumn, TableRow
|
from odf.table import CoveredTableCell, Table, TableCell, TableColumn, TableRow
|
||||||
from odf.text import P
|
from odf.text import P
|
||||||
from registration.models import Payment, VolunteerRegistration
|
from registration.models import Payment, StudentRegistration, VolunteerRegistration
|
||||||
from registration.tables import PaymentTable
|
from registration.tables import PaymentTable
|
||||||
from tfjm.lists import get_sympa_client
|
from tfjm.lists import get_sympa_client
|
||||||
from tfjm.views import AdminMixin, VolunteerMixin
|
from tfjm.views import AdminMixin, VolunteerMixin
|
||||||
@ -366,91 +366,63 @@ class MotivationLetterView(LoginRequiredMixin, View):
|
|||||||
return FileResponse(open(path, "rb"), content_type=mime_type, filename=true_file_name)
|
return FileResponse(open(path, "rb"), content_type=mime_type, filename=true_file_name)
|
||||||
|
|
||||||
|
|
||||||
class TeamAuthorizationsView(LoginRequiredMixin, View):
|
class TeamAuthorizationsView(LoginRequiredMixin, DetailView):
|
||||||
"""
|
"""
|
||||||
Get as a ZIP archive all the authorizations that are sent
|
Get as a ZIP archive all the authorizations that are sent
|
||||||
"""
|
"""
|
||||||
|
model = Team
|
||||||
|
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
user = request.user
|
user = request.user
|
||||||
if not user.is_authenticated:
|
if not user.is_authenticated:
|
||||||
return super().handle_no_permission()
|
return super().handle_no_permission()
|
||||||
|
|
||||||
if 'team_id' in kwargs:
|
|
||||||
team = Team.objects.get(pk=kwargs["team_id"])
|
|
||||||
tournament = team.participation.tournament
|
|
||||||
else:
|
|
||||||
team = None
|
|
||||||
tournament = Tournament.objects.get(pk=kwargs["tournament_id"])
|
|
||||||
|
|
||||||
if user.registration.is_admin or user.registration.is_volunteer \
|
if user.registration.is_admin or user.registration.is_volunteer \
|
||||||
and (user.registration in tournament.organizers
|
and (user.registration in self.get_object().participation.tournament.organizers
|
||||||
or (team is not None and team.participation.final
|
or self.get_object().participation.final
|
||||||
and user.registration in Tournament.final_tournament().organizers)):
|
and user.registration in Tournament.final_tournament().organizers):
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
raise PermissionDenied
|
raise PermissionDenied
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
if 'team_id' in kwargs:
|
team = self.get_object()
|
||||||
team = Team.objects.get(pk=kwargs["team_id"])
|
|
||||||
teams = [team]
|
|
||||||
filename = _("Authorizations of team {trigram}.zip").format(trigram=team.trigram)
|
|
||||||
else:
|
|
||||||
tournament = Tournament.objects.get(pk=kwargs["tournament_id"])
|
|
||||||
teams = [p.team for p in tournament.participations.filter(valid=True)]
|
|
||||||
filename = _("Authorizations of {tournament}.zip").format(tournament=tournament.name)
|
|
||||||
|
|
||||||
magic = Magic(mime=True)
|
magic = Magic(mime=True)
|
||||||
output = BytesIO()
|
output = BytesIO()
|
||||||
zf = ZipFile(output, "w")
|
zf = ZipFile(output, "w")
|
||||||
for team in teams:
|
|
||||||
team_prefix = f"{team.trigram}/" if len(teams) > 1 else ""
|
|
||||||
|
|
||||||
for participant in team.participants.all():
|
for participant in team.participants.all():
|
||||||
user_prefix = f"{team_prefix}{participant.user.first_name} {participant.user.last_name}/"
|
if participant.photo_authorization:
|
||||||
|
|
||||||
if participant.photo_authorization \
|
|
||||||
and participant.photo_authorization.storage.exists(participant.photo_authorization.path):
|
|
||||||
mime_type = magic.from_file("media/" + participant.photo_authorization.name)
|
mime_type = magic.from_file("media/" + participant.photo_authorization.name)
|
||||||
ext = mime_type.split("/")[1].replace("jpeg", "jpg")
|
ext = mime_type.split("/")[1].replace("jpeg", "jpg")
|
||||||
zf.write("media/" + participant.photo_authorization.name,
|
zf.write("media/" + participant.photo_authorization.name,
|
||||||
user_prefix + _("Photo authorization of {participant}.{ext}")
|
_("Photo authorization of {participant}.{ext}").format(participant=str(participant), ext=ext))
|
||||||
.format(participant=str(participant), ext=ext))
|
|
||||||
|
|
||||||
if participant.is_student and participant.parental_authorization \
|
if isinstance(participant, StudentRegistration) and participant.parental_authorization:
|
||||||
and participant.parental_authorization.storage.exists(participant.parental_authorization.path):
|
|
||||||
mime_type = magic.from_file("media/" + participant.parental_authorization.name)
|
mime_type = magic.from_file("media/" + participant.parental_authorization.name)
|
||||||
ext = mime_type.split("/")[1].replace("jpeg", "jpg")
|
ext = mime_type.split("/")[1].replace("jpeg", "jpg")
|
||||||
zf.write("media/" + participant.parental_authorization.name,
|
zf.write("media/" + participant.parental_authorization.name,
|
||||||
user_prefix + _("Parental authorization of {participant}.{ext}")
|
_("Parental authorization of {participant}.{ext}")
|
||||||
.format(participant=str(participant), ext=ext))
|
.format(participant=str(participant), ext=ext))
|
||||||
|
|
||||||
if participant.is_student and participant.health_sheet \
|
if isinstance(participant, StudentRegistration) and participant.health_sheet:
|
||||||
and participant.health_sheet.storage.exists(participant.health_sheet.path):
|
|
||||||
mime_type = magic.from_file("media/" + participant.health_sheet.name)
|
mime_type = magic.from_file("media/" + participant.health_sheet.name)
|
||||||
ext = mime_type.split("/")[1].replace("jpeg", "jpg")
|
ext = mime_type.split("/")[1].replace("jpeg", "jpg")
|
||||||
zf.write("media/" + participant.health_sheet.name,
|
zf.write("media/" + participant.health_sheet.name,
|
||||||
user_prefix + _("Health sheet of {participant}.{ext}")
|
_("Health sheet of {participant}.{ext}").format(participant=str(participant), ext=ext))
|
||||||
.format(participant=str(participant), ext=ext))
|
|
||||||
|
|
||||||
if participant.is_student and participant.vaccine_sheet \
|
if isinstance(participant, StudentRegistration) and participant.vaccine_sheet:
|
||||||
and participant.vaccine_sheet.storage.exists(participant.vaccine_sheet.path):
|
|
||||||
mime_type = magic.from_file("media/" + participant.vaccine_sheet.name)
|
mime_type = magic.from_file("media/" + participant.vaccine_sheet.name)
|
||||||
ext = mime_type.split("/")[1].replace("jpeg", "jpg")
|
ext = mime_type.split("/")[1].replace("jpeg", "jpg")
|
||||||
zf.write("media/" + participant.vaccine_sheet.name,
|
zf.write("media/" + participant.vaccine_sheet.name,
|
||||||
user_prefix + _("Vaccine sheet of {participant}.{ext}")
|
_("Vaccine sheet of {participant}.{ext}").format(participant=str(participant), ext=ext))
|
||||||
.format(participant=str(participant), ext=ext))
|
|
||||||
|
|
||||||
if team.motivation_letter and team.motivation_letter.storage.exists(team.motivation_letter.path):
|
if team.motivation_letter:
|
||||||
mime_type = magic.from_file("media/" + team.motivation_letter.name)
|
mime_type = magic.from_file("media/" + team.motivation_letter.name)
|
||||||
ext = mime_type.split("/")[1].replace("jpeg", "jpg")
|
ext = mime_type.split("/")[1].replace("jpeg", "jpg")
|
||||||
zf.write("media/" + team.motivation_letter.name,
|
zf.write("media/" + team.motivation_letter.name,
|
||||||
team_prefix + _("Motivation letter of {team}.{ext}")
|
_("Motivation letter of {team}.{ext}").format(team=str(team), ext=ext))
|
||||||
.format(team=str(team), ext=ext))
|
|
||||||
|
|
||||||
zf.close()
|
zf.close()
|
||||||
response = HttpResponse(content_type="application/zip")
|
response = HttpResponse(content_type="application/zip")
|
||||||
response["Content-Disposition"] = f"attachment; filename=\"{filename}\""
|
response["Content-Disposition"] = "attachment; filename=\"{filename}\"" \
|
||||||
|
.format(filename=_("Photo authorizations of team {trigram}.zip").format(trigram=team.trigram))
|
||||||
response.write(output.getvalue())
|
response.write(output.getvalue())
|
||||||
return response
|
return response
|
||||||
|
|
||||||
@ -626,7 +598,7 @@ class TournamentPaymentsView(VolunteerMixin, SingleTableMixin, DetailView):
|
|||||||
|
|
||||||
class TournamentExportCSVView(VolunteerMixin, DetailView):
|
class TournamentExportCSVView(VolunteerMixin, DetailView):
|
||||||
"""
|
"""
|
||||||
Export all team informations in a CSV file.
|
Export team information in a CSV file.
|
||||||
"""
|
"""
|
||||||
model = Tournament
|
model = Tournament
|
||||||
|
|
||||||
@ -637,46 +609,24 @@ class TournamentExportCSVView(VolunteerMixin, DetailView):
|
|||||||
content_type='text/csv',
|
content_type='text/csv',
|
||||||
headers={'Content-Disposition': f'attachment; filename="Tournoi de {tournament.name}.csv"'},
|
headers={'Content-Disposition': f'attachment; filename="Tournoi de {tournament.name}.csv"'},
|
||||||
)
|
)
|
||||||
writer = csv.DictWriter(resp, ('Tournoi', 'Équipe', 'Trigramme', 'Sélectionnée',
|
writer = csv.DictWriter(resp, ('Tournoi', 'Équipe', 'Trigramme', 'Nom', 'Prénom', 'Email',
|
||||||
'Nom', 'Prénom', 'Email', 'Type', 'Genre', 'Date de naissance',
|
'Genre', 'Date de naissance'))
|
||||||
'Adresse', 'Code postal', 'Ville', 'Téléphone',
|
|
||||||
'Classe', 'Établissement',
|
|
||||||
'Nom responsable légal⋅e', 'Téléphone responsable légal⋅e',
|
|
||||||
'Email responsable légal⋅e',
|
|
||||||
'Problèmes de santé', 'Contraintes de logement'))
|
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
|
|
||||||
participations = tournament.participations
|
for participation in tournament.participations.filter(valid=True).order_by('team__trigram').all():
|
||||||
if 'all' not in request.GET:
|
|
||||||
participations = participations.filter(valid=True)
|
|
||||||
for participation in participations.order_by('-valid', 'team__trigram').all():
|
|
||||||
for registration in participation.team.participants\
|
for registration in participation.team.participants\
|
||||||
.order_by('coachregistration', 'user__last_name').all():
|
.order_by('coachregistration', 'user__last_name').all():
|
||||||
writer.writerow({
|
writer.writerow({
|
||||||
'Tournoi': tournament.name,
|
'Tournoi': tournament.name,
|
||||||
'Équipe': participation.team.name,
|
'Équipe': participation.team.name,
|
||||||
'Trigramme': participation.team.trigram,
|
'Trigramme': participation.team.trigram,
|
||||||
'Sélectionnée': ("oui" if participation.valid else
|
|
||||||
"en attente" if participation.valid is False else "non"),
|
|
||||||
'Nom': registration.user.last_name,
|
'Nom': registration.user.last_name,
|
||||||
'Prénom': registration.user.first_name,
|
'Prénom': registration.user.first_name,
|
||||||
'Email': registration.user.email,
|
'Email': registration.user.email,
|
||||||
'Type': registration.type.capitalize(),
|
'Genre': registration.get_gender_display() if isinstance(registration, StudentRegistration)
|
||||||
'Genre': registration.get_gender_display() if registration.is_student else '',
|
else 'Encadrant⋅e',
|
||||||
'Date de naissance': registration.birth_date if registration.is_student else '',
|
'Date de naissance': registration.birth_date if isinstance(registration, StudentRegistration)
|
||||||
'Adresse': registration.address,
|
else 'Encadrant⋅e',
|
||||||
'Code postal': registration.zip_code,
|
|
||||||
'Ville': registration.city,
|
|
||||||
'Téléphone': registration.phone_number,
|
|
||||||
'Classe': registration.get_student_class_display() if registration.is_student
|
|
||||||
else registration.last_degree,
|
|
||||||
'Établissement': registration.school if registration.is_student
|
|
||||||
else registration.professional_activity,
|
|
||||||
'Nom responsable légal⋅e': registration.responsible_name if registration.is_student else '',
|
|
||||||
'Téléphone responsable légal⋅e': registration.responsible_phone if registration.is_student else '',
|
|
||||||
'Email responsable légal⋅e': registration.responsible_email if registration.is_student else '',
|
|
||||||
'Problèmes de santé': registration.health_issues,
|
|
||||||
'Contraintes de logement': registration.housing_constraints,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return resp
|
return resp
|
||||||
@ -819,107 +769,38 @@ class PoolUpdateTeamsView(VolunteerMixin, UpdateView):
|
|||||||
return self.handle_no_permission()
|
return self.handle_no_permission()
|
||||||
|
|
||||||
|
|
||||||
class SolutionsDownloadView(VolunteerMixin, View):
|
class PoolDownloadView(VolunteerMixin, DetailView):
|
||||||
"""
|
"""
|
||||||
Download all solutions or syntheses as a ZIP archive.
|
Download all solutions or syntheses as a ZIP archive.
|
||||||
"""
|
"""
|
||||||
|
model = Pool
|
||||||
|
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
if not request.user.is_authenticated:
|
if not request.user.is_authenticated:
|
||||||
return self.handle_no_permission()
|
return self.handle_no_permission()
|
||||||
|
|
||||||
reg = request.user.registration
|
reg = request.user.registration
|
||||||
if reg.is_admin:
|
if reg.is_admin or reg.is_volunteer \
|
||||||
|
and (self.get_object().tournament in reg.organized_tournaments.all()
|
||||||
|
or reg in self.get_object().juries.all()
|
||||||
|
or reg.pools_presided.filter(tournament=self.get_object().tournament).exists()):
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
if 'team_id' in kwargs:
|
|
||||||
team = Team.objects.get(pk=kwargs["team_id"])
|
|
||||||
tournament = team.participation.tournament
|
|
||||||
if reg.participates and reg.team == team \
|
|
||||||
or reg.is_volunteer and (reg in tournament.organizers.all() or team.participation.final
|
|
||||||
and reg in Tournament.final_tournament().organizers):
|
|
||||||
return super().dispatch(request, *args, **kwargs)
|
|
||||||
elif 'tournament_id' in kwargs:
|
|
||||||
tournament = Tournament.objects.get(pk=kwargs["tournament_id"])
|
|
||||||
if reg.is_volunteer \
|
|
||||||
and (tournament in reg.organized_tournaments.all()
|
|
||||||
or reg.pools_presided.filter(tournament=tournament).exists()):
|
|
||||||
return super().dispatch(request, *args, **kwargs)
|
|
||||||
else:
|
|
||||||
pool = Pool.objects.get(pk=kwargs["pool_id"])
|
|
||||||
tournament = pool.tournament
|
|
||||||
if reg.is_volunteer \
|
|
||||||
and (reg in tournament.organizers.all()
|
|
||||||
or reg in pool.juries.all()
|
|
||||||
or reg.pools_presided.filter(tournament=tournament).exists()):
|
|
||||||
return super().dispatch(request, *args, **kwargs)
|
|
||||||
|
|
||||||
return self.handle_no_permission()
|
return self.handle_no_permission()
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
|
pool = self.get_object()
|
||||||
|
|
||||||
is_solution = 'solutions' in request.path
|
is_solution = 'solutions' in request.path
|
||||||
|
|
||||||
if 'team_id' in kwargs:
|
|
||||||
team = Team.objects.get(pk=kwargs["team_id"])
|
|
||||||
solutions = Solution.objects.filter(participation=team.participation).all()
|
|
||||||
syntheses = Synthesis.objects.filter(participation=team.participation).all()
|
|
||||||
filename = _("Solutions of team {trigram}.zip") if is_solution else _("Syntheses of team {trigram}.zip")
|
|
||||||
filename = filename.format(trigram=team.trigram)
|
|
||||||
|
|
||||||
def prefix(s: Solution | Synthesis) -> str:
|
|
||||||
return ""
|
|
||||||
elif 'tournament_id' in kwargs:
|
|
||||||
tournament = Tournament.objects.get(pk=kwargs["tournament_id"])
|
|
||||||
sort_by = request.GET.get('sort_by', 'team').lower()
|
|
||||||
|
|
||||||
if sort_by == 'pool':
|
|
||||||
pools = Pool.objects.filter(tournament=tournament).all()
|
|
||||||
solutions = []
|
|
||||||
for pool in pools:
|
|
||||||
for sol in pool.solutions:
|
|
||||||
sol.pool = pool
|
|
||||||
solutions.append(sol)
|
|
||||||
syntheses = Synthesis.objects.filter(passage__pool__tournament=tournament).all()
|
|
||||||
filename = _("Solutions of {tournament}.zip") if is_solution else _("Syntheses of {tournament}.zip")
|
|
||||||
filename = filename.format(tournament=tournament.name)
|
|
||||||
|
|
||||||
def prefix(s: Solution | Synthesis) -> str:
|
|
||||||
pool = s.pool if is_solution else s.passage.pool
|
|
||||||
p = f"Poule {pool.get_letter_display()}{pool.round}/"
|
|
||||||
if not is_solution:
|
|
||||||
p += f"Passage {s.passage.position}/"
|
|
||||||
return p
|
|
||||||
else:
|
|
||||||
if not tournament.final:
|
|
||||||
solutions = Solution.objects.filter(participation__tournament=tournament).all()
|
|
||||||
else:
|
|
||||||
solutions = Solution.objects.filter(final_solution=True).all()
|
|
||||||
syntheses = Synthesis.objects.filter(passage__pool__tournament=tournament).all()
|
|
||||||
filename = _("Solutions of {tournament}.zip") if is_solution else _("Syntheses of {tournament}.zip")
|
|
||||||
filename = filename.format(tournament=tournament.name)
|
|
||||||
|
|
||||||
def prefix(s: Solution | Synthesis) -> str:
|
|
||||||
return f"{s.participation.team.trigram}/" if sort_by == "team" else f"Problème {s.problem}/"
|
|
||||||
else:
|
|
||||||
pool = Pool.objects.get(pk=kwargs["pool_id"])
|
|
||||||
solutions = pool.solutions
|
|
||||||
syntheses = Synthesis.objects.filter(passage__pool=pool).all()
|
|
||||||
filename = _("Solutions for pool {pool} of tournament {tournament}.zip") \
|
|
||||||
if is_solution else _("Syntheses for pool {pool} of tournament {tournament}.zip")
|
|
||||||
filename = filename.format(pool=pool.get_letter_display() + str(pool.round),
|
|
||||||
tournament=pool.tournament.name)
|
|
||||||
|
|
||||||
def prefix(s: Solution | Synthesis) -> str:
|
|
||||||
return ""
|
|
||||||
|
|
||||||
output = BytesIO()
|
output = BytesIO()
|
||||||
zf = ZipFile(output, "w")
|
zf = ZipFile(output, "w")
|
||||||
for s in (solutions if is_solution else syntheses):
|
for s in (pool.solutions if is_solution else Synthesis.objects.filter(passage__pool=pool).all()):
|
||||||
if s.file.storage.exists(s.file.path):
|
zf.write("media/" + s.file.name, f"{s}.pdf")
|
||||||
zf.write("media/" + s.file.name, prefix(s) + f"{s}.pdf")
|
|
||||||
|
|
||||||
zf.close()
|
zf.close()
|
||||||
response = HttpResponse(content_type="application/zip")
|
response = HttpResponse(content_type="application/zip")
|
||||||
|
filename = _("Solutions for pool {pool} of tournament {tournament}.zip") \
|
||||||
|
if is_solution else _("Syntheses for pool {pool} of tournament {tournament}.zip")
|
||||||
|
filename = filename.format(pool=pool.get_letter_display() + str(pool.round), tournament=pool.tournament.name)
|
||||||
response["Content-Disposition"] = "attachment; filename=\"{filename}\"" \
|
response["Content-Disposition"] = "attachment; filename=\"{filename}\"" \
|
||||||
.format(filename=filename)
|
.format(filename=filename)
|
||||||
response.write(output.getvalue())
|
response.write(output.getvalue())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user