diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 5cec58b..347ec10 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: TFJM\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-29 18:56+0100\n" +"POT-Creation-Date: 2024-03-29 19:18+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Emmy D'Anello \n" "Language-Team: LANGUAGE \n" @@ -1073,10 +1073,10 @@ msgid "No defined team" msgstr "Pas d'équipe définie" #: participation/tables.py:142 -#: participation/templates/participation/note_form.html:13 +#: participation/templates/participation/note_form.html:14 #: participation/templates/participation/passage_detail.html:54 -#: participation/templates/participation/passage_detail.html:120 -#: participation/templates/participation/passage_detail.html:126 +#: participation/templates/participation/passage_detail.html:153 +#: participation/templates/participation/passage_detail.html:159 #: participation/templates/participation/pool_detail.html:117 #: participation/templates/participation/pool_detail.html:135 #: participation/templates/participation/pool_detail.html:140 @@ -1116,6 +1116,14 @@ msgstr "Rejoindre" msgid "Notes of" msgstr "Notes de" +#: participation/templates/participation/note_form.html:9 +msgid "Defense of" +msgstr "Défense de" + +#: participation/templates/participation/note_form.html:9 +msgid "Pb." +msgstr "Pb." + #: participation/templates/participation/participation_detail.html:6 #: participation/templates/participation/participation_detail.html:21 #: participation/templates/participation/passage_detail.html:6 @@ -1171,7 +1179,7 @@ msgid "Upload solution" msgstr "Envoyer une solution" #: participation/templates/participation/participation_detail.html:65 -#: participation/templates/participation/passage_detail.html:132 +#: participation/templates/participation/passage_detail.html:165 #: participation/templates/participation/pool_detail.html:145 #: participation/templates/participation/team_detail.html:210 #: participation/templates/participation/upload_motivation_letter.html:13 @@ -1233,12 +1241,12 @@ msgid "No synthesis was uploaded yet." msgstr "Aucune note de synthèse n'a encore été envoyée." #: participation/templates/participation/passage_detail.html:52 -#: participation/templates/participation/passage_detail.html:125 +#: participation/templates/participation/passage_detail.html:158 msgid "Update notes" msgstr "Modifier les notes" #: participation/templates/participation/passage_detail.html:58 -#: participation/templates/participation/passage_detail.html:131 +#: participation/templates/participation/passage_detail.html:164 msgid "Upload synthesis" msgstr "Envoyer une note de synthèse" @@ -1246,51 +1254,51 @@ msgstr "Envoyer une note de synthèse" msgid "Notes detail" msgstr "Détails des notes" -#: participation/templates/participation/passage_detail.html:73 -msgid "Average points for the defender writing:" -msgstr "Moyenne de l'écrit de l'équipe défenseuse :" +#: participation/templates/participation/passage_detail.html:74 +msgid "Average points for the defender writing" +msgstr "Moyenne de l'écrit de l'équipe défenseuse" -#: participation/templates/participation/passage_detail.html:76 -msgid "Average points for the defender oral:" -msgstr "Moyenne de l'oral de l'équipe défenseuse :" +#: participation/templates/participation/passage_detail.html:80 +msgid "Average points for the defender oral" +msgstr "Moyenne de l'oral de l'équipe défenseuse" -#: participation/templates/participation/passage_detail.html:79 -msgid "Average points for the opponent writing:" -msgstr "Moyenne de l'écrit de l'équipe opposante :" - -#: participation/templates/participation/passage_detail.html:82 -msgid "Average points for the opponent oral:" -msgstr "Moyenne de l'oral de l'équipe opposante :" - -#: participation/templates/participation/passage_detail.html:85 -msgid "Average points for the reporter writing:" -msgstr "Moyenne de l'écrit de l'équipe rapportrice :" - -#: participation/templates/participation/passage_detail.html:88 -msgid "Average points for the reporter oral:" -msgstr "Moyenne de l'oral de l'équipe rapportrice :" +#: participation/templates/participation/passage_detail.html:86 +msgid "Average points for the opponent writing" +msgstr "Moyenne de l'écrit de l'équipe opposante" #: participation/templates/participation/passage_detail.html:92 -msgid "Average points for the observer oral:" -msgstr "Moyenne de l'oral de l'observateur⋅rice :" +msgid "Average points for the opponent oral" +msgstr "Moyenne de l'oral de l'équipe opposante" -#: participation/templates/participation/passage_detail.html:100 -msgid "Defender points:" -msgstr "Points de l'équipe défenseuse :" +#: participation/templates/participation/passage_detail.html:98 +msgid "Average points for the reporter writing" +msgstr "Moyenne de l'écrit de l'équipe rapportrice" -#: participation/templates/participation/passage_detail.html:103 -msgid "Opponent points:" -msgstr "Points de l'équipe opposante :" +#: participation/templates/participation/passage_detail.html:104 +msgid "Average points for the reporter oral" +msgstr "Moyenne de l'oral de l'équipe rapportrice" -#: participation/templates/participation/passage_detail.html:106 -msgid "Reporter points:" -msgstr "Points de l'équipe rapportrice :" +#: participation/templates/participation/passage_detail.html:111 +msgid "Average points for the observer oral" +msgstr "Moyenne de l'oral de l'observateur⋅rice" -#: participation/templates/participation/passage_detail.html:110 -msgid "Observer points:" -msgstr "Points de l'équipe observatrice :" +#: participation/templates/participation/passage_detail.html:122 +msgid "Defender points" +msgstr "Points de l'équipe défenseuse" -#: participation/templates/participation/passage_detail.html:119 +#: participation/templates/participation/passage_detail.html:128 +msgid "Opponent points" +msgstr "Points de l'équipe opposante" + +#: participation/templates/participation/passage_detail.html:134 +msgid "Reporter points" +msgstr "Points de l'équipe rapportrice" + +#: participation/templates/participation/passage_detail.html:141 +msgid "Observer points" +msgstr "Points de l'équipe observatrice" + +#: participation/templates/participation/passage_detail.html:152 #: participation/templates/participation/passage_form.html:11 msgid "Update passage" msgstr "Modifier le passage" @@ -1890,7 +1898,7 @@ msgstr "Feuilles de notations pour la poule {pool} du tournoi {tournament}.zip" msgid "Notation sheets of {tournament}.zip" msgstr "Feuilles de notation de {tournament}.zip" -#: participation/views.py:1911 +#: participation/views.py:1922 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." diff --git a/participation/templates/participation/note_form.html b/participation/templates/participation/note_form.html index 7a92d99..1b55439 100644 --- a/participation/templates/participation/note_form.html +++ b/participation/templates/participation/note_form.html @@ -6,6 +6,7 @@

{% trans "Notes of" %} {{ note.jury }}

+
{% trans "Defense of" %} {{ note.passage.defender.team.trigram }}, {% trans "Pb." %} {{ note.passage.solution_number }}

{% csrf_token %} {{ form|crispy }} diff --git a/participation/templates/participation/passage_detail.html b/participation/templates/participation/passage_detail.html index 7a42988..603aa08 100644 --- a/participation/templates/participation/passage_detail.html +++ b/participation/templates/participation/passage_detail.html @@ -70,26 +70,47 @@
-
{% trans "Average points for the defender writing:" %}
+
+ {% trans "Average points for the defender writing" %} + ({{ passage.defender.team.trigram }}) : +
{{ passage.average_defender_writing|floatformat }}/20
-
{% trans "Average points for the defender oral:" %}
+
+ {% trans "Average points for the defender oral" %} + ({{ passage.defender.team.trigram }}) : +
{{ passage.average_defender_oral|floatformat }}/16
-
{% trans "Average points for the opponent writing:" %}
+
+ {% trans "Average points for the opponent writing" %} + ({{ passage.opponent.team.trigram }}) : +
{{ passage.average_opponent_writing|floatformat }}/9
-
{% trans "Average points for the opponent oral:" %}
+
+ {% trans "Average points for the opponent oral" %} + ({{ passage.opponent.team.trigram }}) : +
{{ passage.average_opponent_oral|floatformat }}/10
-
{% trans "Average points for the reporter writing:" %}
+
+ {% trans "Average points for the reporter writing" %} + ({{ passage.reporter.team.trigram }}) : +
{{ passage.average_reporter_writing|floatformat }}/9
-
{% trans "Average points for the reporter oral:" %}
+
+ {% trans "Average points for the reporter oral" %} + ({{ passage.reporter.team.trigram }}) : +
{{ passage.average_reporter_oral|floatformat }}/10
{% if passage.observer %} -
{% trans "Average points for the observer oral:" %}
+
+ {% trans "Average points for the observer oral" %} + ({{ passage.observer.team.trigram }}) : +
{{ passage.average_observer|floatformat }}/4
{% endif %}
@@ -97,17 +118,29 @@
-
{% trans "Defender points:" %}
+
+ {% trans "Defender points" %} + ({{ passage.defender.team.trigram }}) : +
{{ passage.average_defender|floatformat }}/52
-
{% trans "Opponent points:" %}
+
+ {% trans "Opponent points" %} + ({{ passage.opponent.team.trigram }}) : +
{{ passage.average_opponent|floatformat }}/29
-
{% trans "Reporter points:" %}
+
+ {% trans "Reporter points" %} + ({{ passage.reporter.team.trigram }}) : +
{{ passage.average_reporter|floatformat }}/19
{% if passage.observer %} -
{% trans "Observer points:" %}
+
+ {% trans "Observer points" %} + ({{ passage.observer.team.trigram }}) : +
{{ passage.average_observer|floatformat }}/4
{% endif %}
diff --git a/participation/views.py b/participation/views.py index 0c390ca..fd49503 100644 --- a/participation/views.py +++ b/participation/views.py @@ -1852,9 +1852,20 @@ class PassageDetailView(LoginRequiredMixin, DetailView): context["notes"] = NoteTable(notes) # Only display the observer column for 4-teams pools - context['notes']._sequence.remove('observer_oral') + if self.object.pool.participations.count() != 4: + context['notes']._sequence.remove('observer_oral') if 'notes' in context and not self.request.user.registration.is_admin: context['notes']._sequence.remove('update') + + context['notes'].columns['defender_writing'].column.verbose_name += f" ({self.object.defender.team.trigram})" + context['notes'].columns['defender_oral'].column.verbose_name += f" ({self.object.defender.team.trigram})" + context['notes'].columns['opponent_writing'].column.verbose_name += f" ({self.object.opponent.team.trigram})" + context['notes'].columns['opponent_oral'].column.verbose_name += f" ({self.object.opponent.team.trigram})" + context['notes'].columns['reporter_writing'].column.verbose_name += f" ({self.object.reporter.team.trigram})" + context['notes'].columns['reporter_oral'].column.verbose_name += f" ({self.object.reporter.team.trigram})" + if self.object.observer: + context['notes'].columns['observer_oral'].column.verbose_name += f" ({self.object.observer.team.trigram})" + return context @@ -1942,7 +1953,15 @@ class NoteUpdateView(VolunteerMixin, UpdateView): def get_form(self, form_class=None): form = super().get_form(form_class) - if not self.object.passage.observer: + form.fields['defender_writing'].label += f" ({self.object.passage.defender.team.trigram})" + form.fields['defender_oral'].label += f" ({self.object.passage.defender.team.trigram})" + form.fields['opponent_writing'].label += f" ({self.object.passage.opponent.team.trigram})" + form.fields['opponent_oral'].label += f" ({self.object.passage.opponent.team.trigram})" + form.fields['reporter_writing'].label += f" ({self.object.passage.reporter.team.trigram})" + form.fields['reporter_oral'].label += f" ({self.object.passage.reporter.team.trigram})" + if self.object.passage.observer: + form.fields['observer_oral'].label += f" ({self.object.passage.observer.team.trigram})" + else: # Set the note of the observer only for 4-teams pools del form.fields['observer_oral'] return form