1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-02-24 07:01:18 +00:00

Compare commits

..

No commits in common. "700df123b74fa852f145c1835a5c55c0b5e6043e" and "ba6a6338f5cfcbd3c586f6681ca338d7d6580605" have entirely different histories.

5 changed files with 214 additions and 66 deletions

View File

@ -57,7 +57,7 @@ class TournamentSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = Tournament model = Tournament
fields = ('id', 'pk', 'name', 'date_start', 'date_end', 'place', 'max_teams', 'price', 'remote', fields = ('name', 'date_start', 'date_end', 'place', 'max_teams', 'price', 'remote',
'inscription_limit', 'solution_limit', 'solutions_draw', 'syntheses_first_phase_limit', 'inscription_limit', 'solution_limit', 'solutions_draw', 'syntheses_first_phase_limit',
'solutions_available_second_phase', 'syntheses_second_phase_limit', 'solutions_available_second_phase', 'syntheses_second_phase_limit',
'description', 'organizers', 'final', 'participations',) 'description', 'organizers', 'final', 'participations',)

View File

@ -561,7 +561,7 @@ class Solution(models.Model):
def __str__(self): def __str__(self):
return _("Solution of team {team} for problem {problem}")\ return _("Solution of team {team} for problem {problem}")\
.format(team=self.participation.team.name, problem=self.problem)\ .format(team=self.participation.team.name, problem=self.problem)\
+ (" " + str(_("for final")) if self.final_solution else "") + (" " + _("for final") if self.final_solution else "")
class Meta: class Meta:
verbose_name = _("solution") verbose_name = _("solution")

View File

@ -24,33 +24,24 @@
<dt class="col-sm-2">{% trans "Solutions:" %}</dt> <dt class="col-sm-2">{% trans "Solutions:" %}</dt>
<dd class="col-sm-10"> <dd class="col-sm-10">
<ul> {% for solution in participation.solutions.all %}
{% for solution in participation.solutions.all %} <a href="{{ solution.file.url }}" data-turbolinks="false">{{ solution }}{% if not forloop.last %}, {% endif %}</a>
<li><a href="{{ solution.file.url }}" data-turbolinks="false">{{ solution }}</a></li> {% empty %}
{% empty %} {% trans "No solution was uploaded yet." %}
<li>{% trans "No solution was uploaded yet." %}</li> {% endfor %}
{% endfor %}
</ul>
</dd> </dd>
{% if participation.pools.all %} {% if participation.pools.all %}
<dt class="col-sm-2">{% trans "Pools:" %}</dt> <dt class="col-sm-2">{% trans "Pools:" %}</dt>
<dd class="col-sm-10"> <dd class="col-sm-10">
<ul> {% for pool in participation.pools.all %}
{% for pool in participation.pools.all %} <a href="{{ pool.get_absolute_url }}" data-turbolinks="false">{{ pool }}{% if not forloop.last %}, {% endif %}</a>
<li><a href="{{ pool.get_absolute_url }}" data-turbolinks="false">{{ pool }}{% if not forloop.last %}, {% endif %}</a></li> {% endfor %}
{% endfor %}
</ul>
</dd> </dd>
{% endif %} {% endif %}
</dl> </dl>
</div> </div>
<div class="card-footer text-center"> <div class="card-footer text-center">
{% if participation.final %}
<div class="alert alert-info">
{% trans "If you upload a solution, this will replace the version for the final tournament." %}
</div>
{% endif %}
<button class="btn btn-primary" data-toggle="modal" data-target="#uploadSolutionModal">{% trans "Upload solution" %}</button> <button class="btn btn-primary" data-toggle="modal" data-target="#uploadSolutionModal">{% trans "Upload solution" %}</button>
</div> </div>
</div> </div>

View File

@ -553,8 +553,7 @@ class SolutionView(LoginRequiredMixin, View):
passage_participant_qs = Passage.objects.none() passage_participant_qs = Passage.objects.none()
if not (user.registration.is_admin if not (user.registration.is_admin
or user.registration.is_volunteer and user.registration or user.registration.is_volunteer and user.registration
in (solution.participation.tournament in solution.participation.tournament.organizers.all()
if not solution.final_solution else Tournament.final_tournament()).organizers.all()
or user.registration.is_volunteer or user.registration.is_volunteer
and Passage.objects.filter(Q(pool__juries=user.registration) and Passage.objects.filter(Q(pool__juries=user.registration)
| Q(pool__tournament__in=user.registration.organized_tournaments.all()), | Q(pool__tournament__in=user.registration.organized_tournaments.all()),

View File

@ -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: 2021-05-11 17:03+0200\n" "POT-Creation-Date: 2021-04-29 15:45+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"
@ -602,27 +602,20 @@ msgstr "Tournoi :"
msgid "Solutions:" msgid "Solutions:"
msgstr "Solutions :" msgstr "Solutions :"
#: apps/participation/templates/participation/participation_detail.html:31 #: apps/participation/templates/participation/participation_detail.html:30
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."
#: apps/participation/templates/participation/participation_detail.html:37 #: apps/participation/templates/participation/participation_detail.html:35
msgid "Pools:" msgid "Pools:"
msgstr "Poules :" msgstr "Poules :"
#: apps/participation/templates/participation/participation_detail.html:51 #: apps/participation/templates/participation/participation_detail.html:45
msgid "" #: apps/participation/templates/participation/participation_detail.html:49
"If you upload a solution, this will replace the version for the final "
"tournament."
msgstr ""
"Si vous envoyez une solution, elle va remplacer la version pour la finale."
#: apps/participation/templates/participation/participation_detail.html:54
#: apps/participation/templates/participation/participation_detail.html:58
msgid "Upload solution" msgid "Upload solution"
msgstr "Envoyer une solution" msgstr "Envoyer une solution"
#: apps/participation/templates/participation/participation_detail.html:59 #: apps/participation/templates/participation/participation_detail.html:50
#: apps/participation/templates/participation/passage_detail.html:117 #: apps/participation/templates/participation/passage_detail.html:117
#: apps/participation/templates/participation/team_detail.html:172 #: apps/participation/templates/participation/team_detail.html:172
#: apps/participation/templates/participation/upload_motivation_letter.html:13 #: apps/participation/templates/participation/upload_motivation_letter.html:13
@ -901,7 +894,7 @@ msgid "Invalidate"
msgstr "Invalider" msgstr "Invalider"
#: apps/participation/templates/participation/team_detail.html:171 #: apps/participation/templates/participation/team_detail.html:171
#: apps/participation/views.py:327 #: apps/participation/views.py:323
msgid "Upload motivation letter" msgid "Upload motivation letter"
msgstr "Envoyer la lettre de motivation" msgstr "Envoyer la lettre de motivation"
@ -910,7 +903,7 @@ msgid "Update team"
msgstr "Modifier l'équipe" msgstr "Modifier l'équipe"
#: apps/participation/templates/participation/team_detail.html:181 #: apps/participation/templates/participation/team_detail.html:181
#: apps/participation/views.py:429 #: apps/participation/views.py:423
msgid "Leave team" msgid "Leave team"
msgstr "Quitter l'équipe" msgstr "Quitter l'équipe"
@ -1036,31 +1029,31 @@ msgstr "Vous êtes déjà dans une équipe."
msgid "Join team" msgid "Join team"
msgstr "Rejoindre une équipe" msgstr "Rejoindre une équipe"
#: apps/participation/views.py:150 apps/participation/views.py:435 #: apps/participation/views.py:150 apps/participation/views.py:429
#: apps/participation/views.py:468 #: apps/participation/views.py:462
msgid "You are not in a team." msgid "You are not in a team."
msgstr "Vous n'êtes pas dans une équipe." msgstr "Vous n'êtes pas dans une équipe."
#: apps/participation/views.py:151 apps/participation/views.py:469 #: apps/participation/views.py:151 apps/participation/views.py:463
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."
#: apps/participation/views.py:177 #: apps/participation/views.py:175
#, 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}"
#: apps/participation/views.py:213 #: apps/participation/views.py:211
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."
#: apps/participation/views.py:216 #: apps/participation/views.py:214
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."
#: apps/participation/views.py:219 #: apps/participation/views.py:217
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."
@ -1069,66 +1062,66 @@ 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."
#: apps/participation/views.py:241 #: apps/participation/views.py:239
msgid "You are not an organizer of the tournament." msgid "You are not an organizer of the tournament."
msgstr "Vous n'êtes pas un organisateur du tournoi." msgstr "Vous n'êtes pas un organisateur du tournoi."
#: apps/participation/views.py:244 #: apps/participation/views.py:242
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."
#: apps/participation/views.py:274 #: apps/participation/views.py:272
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."
#: apps/participation/views.py:307 #: apps/participation/views.py:303
#, 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}"
#: apps/participation/views.py:365 apps/participation/views.py:415 #: apps/participation/views.py:361 apps/participation/views.py:409
#, 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}"
#: apps/participation/views.py:396 #: apps/participation/views.py:390
#, python-brace-format #, 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}"
#: apps/participation/views.py:402 #: apps/participation/views.py:396
#, 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}"
#: apps/participation/views.py:409 #: apps/participation/views.py:403
#, 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}"
#: apps/participation/views.py:419 #: apps/participation/views.py:413
#, python-brace-format #, python-brace-format
msgid "Photo authorizations of team {trigram}.zip" msgid "Photo authorizations of team {trigram}.zip"
msgstr "Autorisations de droit à l'image de l'équipe {trigram}.zip" msgstr "Autorisations de droit à l'image de l'équipe {trigram}.zip"
#: apps/participation/views.py:437 #: apps/participation/views.py:431
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."
#: apps/participation/views.py:483 #: apps/participation/views.py:477
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:497 #: apps/participation/views.py:489
#, 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}"
#: apps/participation/views.py:589 #: apps/participation/views.py:580
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."
#: apps/participation/views.py:775 #: apps/participation/views.py:766
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."
@ -1711,18 +1704,18 @@ msgid "Impersonate"
msgstr "Impersonifier" msgstr "Impersonifier"
#: apps/registration/templates/registration/user_detail.html:162 #: apps/registration/templates/registration/user_detail.html:162
#: apps/registration/views.py:315 #: apps/registration/views.py:313
msgid "Upload photo authorization" msgid "Upload photo authorization"
msgstr "Téléverser l'autorisation de droit à l'image" msgstr "Téléverser l'autorisation de droit à l'image"
#: apps/registration/templates/registration/user_detail.html:167 #: apps/registration/templates/registration/user_detail.html:167
#: apps/registration/views.py:336 #: apps/registration/views.py:334
msgid "Upload health sheet" msgid "Upload health sheet"
msgstr "Téléverser la fiche sanitaire" msgstr "Téléverser la fiche sanitaire"
#: apps/registration/templates/registration/user_detail.html:172 #: apps/registration/templates/registration/user_detail.html:172
#: apps/registration/templates/registration/user_detail.html:177 #: apps/registration/templates/registration/user_detail.html:177
#: apps/registration/views.py:357 #: apps/registration/views.py:355
msgid "Upload parental authorization" msgid "Upload parental authorization"
msgstr "Téléverser l'autorisation parentale" msgstr "Téléverser l'autorisation parentale"
@ -1750,32 +1743,32 @@ msgstr "Mail de confirmation de l'adresse mail envoyé"
msgid "Resend email validation link" msgid "Resend email validation link"
msgstr "Renvoyé le lien de validation de l'adresse mail" msgstr "Renvoyé le lien de validation de l'adresse mail"
#: apps/registration/views.py:255 #: apps/registration/views.py:253
#, python-brace-format #, python-brace-format
msgid "Detail of user {user}" msgid "Detail of user {user}"
msgstr "Détails de l'utilisateur {user}" msgstr "Détails de l'utilisateur {user}"
#: apps/registration/views.py:279 #: apps/registration/views.py:277
#, python-brace-format #, python-brace-format
msgid "Update user {user}" msgid "Update user {user}"
msgstr "Mise à jour de l'utilisateur {user}" msgstr "Mise à jour de l'utilisateur {user}"
#: apps/registration/views.py:463 #: apps/registration/views.py:461
#, python-brace-format #, python-brace-format
msgid "Photo authorization of {student}.{ext}" msgid "Photo authorization of {student}.{ext}"
msgstr "Autorisation de droit à l'image de {student}.{ext}" msgstr "Autorisation de droit à l'image de {student}.{ext}"
#: apps/registration/views.py:486 #: apps/registration/views.py:484
#, python-brace-format #, python-brace-format
msgid "Health sheet of {student}.{ext}" msgid "Health sheet of {student}.{ext}"
msgstr "Fiche sanitaire de {student}.{ext}" msgstr "Fiche sanitaire de {student}.{ext}"
#: apps/registration/views.py:509 #: apps/registration/views.py:507
#, python-brace-format #, python-brace-format
msgid "Parental authorization of {student}.{ext}" msgid "Parental authorization of {student}.{ext}"
msgstr "Autorisation parentale de {student}.{ext}" msgstr "Autorisation parentale de {student}.{ext}"
#: apps/registration/views.py:531 #: apps/registration/views.py:529
#, python-brace-format #, python-brace-format
msgid "Scholarship attestation of {user}.{ext}" msgid "Scholarship attestation of {user}.{ext}"
msgstr "Notification de bourse de {user}.{ext}" msgstr "Notification de bourse de {user}.{ext}"
@ -1944,3 +1937,168 @@ msgstr "Résultats"
#: tfjm/templates/search/search.html:25 #: tfjm/templates/search/search.html:25
msgid "No results found." msgid "No results found."
msgstr "Aucun résultat." msgstr "Aucun résultat."
#, fuzzy
#~| msgid "This name is already used."
#~ msgid "This field is required."
#~ msgstr "Ce nom est déjà utilisé."
#, fuzzy
#~| msgid "passages"
#~ msgid "Messages"
#~ msgstr "passages"
#, fuzzy
#~| msgid "responsible email address"
#~ msgid "Enter a valid email address."
#~ msgstr "adresse e-mail du responsable légal"
#, fuzzy
#~| msgid "phone number"
#~ msgid "Enter a number."
#~ msgstr "numéro de téléphone"
#, fuzzy
#~| msgid "end"
#~ msgid "and"
#~ msgstr "fin"
#, fuzzy
#~| msgid "phone number"
#~ msgid "Decimal number"
#~ msgstr "numéro de téléphone"
#, fuzzy
#~| msgid "action"
#~ msgid "Duration"
#~ msgstr "action"
#, fuzzy
#~| msgid "address"
#~ msgid "Email address"
#~ msgstr "adresse"
#, fuzzy
#~| msgid "phone number"
#~ msgid "Floating point number"
#~ msgstr "numéro de téléphone"
#, fuzzy
#~| msgid "IP Address"
#~ msgid "IPv4 address"
#~ msgstr "Adresse IP"
#, fuzzy
#~| msgid "IP Address"
#~ msgid "IP address"
#~ msgstr "Adresse IP"
#, fuzzy
#~| msgid "phone number"
#~ msgid "Enter a whole number."
#~ msgstr "numéro de téléphone"
#, fuzzy
#~| msgid "Not validated"
#~ msgid "Enter a valid date."
#~ msgstr "Non validée"
#, fuzzy
#~| msgid "Email validation"
#~ msgid "Enter a valid duration."
#~ msgstr "Validation de l'adresse mail"
#, fuzzy
#~| msgid "delete"
#~ msgid "Delete"
#~ msgstr "supprimer"
#, fuzzy
#~| msgid "changelog"
#~ msgid "Change"
#~ msgstr "changelog"
#, fuzzy
#~| msgid "yes,no,pending"
#~ msgid "yes,no,maybe"
#~ msgstr "oui,non,en attente"
#, fuzzy
#~| msgid "end"
#~ msgid "Wed"
#~ msgstr "fin"
#, fuzzy
#~| msgid "Search"
#~ msgid "March"
#~ msgstr "Chercher"
#, fuzzy
#~| msgid "any"
#~ msgid "May"
#~ msgstr "aucun·e"
#, fuzzy
#~| msgid "phone number"
#~ msgid "November"
#~ msgstr "numéro de téléphone"
#, fuzzy
#~| msgid "any"
#~ msgid "jan"
#~ msgstr "aucun·e"
#, fuzzy
#~| msgid "any"
#~ msgid "may"
#~ msgstr "aucun·e"
#, fuzzy
#~| msgid "Search"
#~ msgctxt "abbrev. month"
#~ msgid "March"
#~ msgstr "Chercher"
#, fuzzy
#~| msgid "any"
#~ msgctxt "abbrev. month"
#~ msgid "May"
#~ msgstr "aucun·e"
#, fuzzy
#~| msgid "Search"
#~ msgctxt "alt. month"
#~ msgid "March"
#~ msgstr "Chercher"
#, fuzzy
#~| msgid "any"
#~ msgctxt "alt. month"
#~ msgid "May"
#~ msgstr "aucun·e"
#, fuzzy
#~| msgid "phone number"
#~ msgctxt "alt. month"
#~ msgid "November"
#~ msgstr "numéro de téléphone"
#, fuzzy
#~| msgid "The team is not validated yet."
#~ msgid "This is not a valid IPv6 address."
#~ msgstr "L'équipe n'est pas encore validée."
#, fuzzy
#~| msgid "Search"
#~ msgid "Search In"
#~ msgstr "Chercher"
#, fuzzy
#~| msgid "Search results"
#~ msgid "Search Queries"
#~ msgstr "Résultats de la recherche"
#, fuzzy
#~| msgid "Contact us"
#~ msgid "Contents"
#~ msgstr "Nous contacter"