Sidebar structure

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-02-11 19:21:27 +01:00
parent 196ccb69ad
commit e7c207d2af
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
3 changed files with 207 additions and 172 deletions

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: TFJM\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-20 18:25+0100\n"
"POT-Creation-Date: 2024-02-11 19:20+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Emmy D'Anello <emmy.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -38,7 +38,7 @@ msgstr "tournoi"
msgid "round"
msgstr "tour"
#: draw/apps.py:10 tfjm/templates/base.html:98
#: draw/apps.py:10 tfjm/templates/navbar.html:60
msgid "Draw"
msgstr "Tirage au sort"
@ -326,7 +326,7 @@ msgstr "Continuer le tirage"
#: draw/templates/draw/tournament_content.html:216 participation/admin.py:100
#: participation/models.py:115 participation/models.py:300
#: registration/models.py:123
#: registration/models.py:146
msgid "team"
msgstr "équipe"
@ -377,7 +377,7 @@ msgstr "Vous n'êtes pas dans une équipe."
msgid "Logs"
msgstr "Logs"
#: logs/models.py:22 registration/models.py:30
#: logs/models.py:22 registration/models.py:31
msgid "user"
msgstr "utilisateur"
@ -744,8 +744,8 @@ msgid ""
"Number of penalties for the defender. The defender will loose a 0.5 "
"coefficient per penalty."
msgstr ""
"Nombre de pénalités pour l'équipe défenseuse. Elle perd un "
"coefficient 0.5 sur sa présentation orale par pénalité."
"Nombre de pénalités pour l'équipe défenseuse. Elle perd un coefficient 0.5 "
"sur sa présentation orale par pénalité."
#: participation/models.py:549 participation/models.py:552
#: participation/models.py:555 participation/models.py:558
@ -910,12 +910,12 @@ msgstr ""
#: participation/templates/participation/create_team.html:11
#: participation/templates/participation/tournament_form.html:14
#: tfjm/templates/base.html:258
#: tfjm/templates/base.html:83
msgid "Create"
msgstr "Créer"
#: participation/templates/participation/join_team.html:11
#: tfjm/templates/base.html:253
#: tfjm/templates/base.html:78
msgid "Join"
msgstr "Rejoindre"
@ -933,8 +933,8 @@ msgstr "Rejoindre"
#: participation/templates/participation/update_team.html:12
#: registration/templates/registration/payment_form.html:49
#: registration/templates/registration/update_user.html:16
#: registration/templates/registration/user_detail.html:180
#: registration/templates/registration/user_detail.html:217
#: registration/templates/registration/user_detail.html:179
#: registration/templates/registration/user_detail.html:216
msgid "Update"
msgstr "Modifier"
@ -1000,11 +1000,11 @@ msgstr "Envoyer une solution"
#: registration/templates/registration/upload_parental_authorization.html:17
#: registration/templates/registration/upload_photo_authorization.html:18
#: registration/templates/registration/upload_vaccine_sheet.html:13
#: registration/templates/registration/user_detail.html:190
#: registration/templates/registration/user_detail.html:195
#: registration/templates/registration/user_detail.html:200
#: registration/templates/registration/user_detail.html:205
#: registration/templates/registration/user_detail.html:210
#: registration/templates/registration/user_detail.html:189
#: registration/templates/registration/user_detail.html:194
#: registration/templates/registration/user_detail.html:199
#: registration/templates/registration/user_detail.html:204
#: registration/templates/registration/user_detail.html:209
msgid "Upload"
msgstr "Téléverser"
@ -1360,7 +1360,7 @@ msgid "Are you sure that you want to leave this team?"
msgstr "Êtes-vous sûr·e de vouloir quitter cette équipe ?"
#: participation/templates/participation/team_list.html:6
#: tfjm/templates/base.html:246
#: tfjm/templates/base.html:71
msgid "All teams"
msgstr "Toutes les équipes"
@ -1426,7 +1426,7 @@ msgid "Export as CSV"
msgstr "Exporter en CSV"
#: participation/templates/participation/tournament_detail.html:72
#: tfjm/templates/base.html:67
#: tfjm/templates/navbar.html:29
msgid "Teams"
msgstr "Équipes"
@ -1443,7 +1443,7 @@ msgid "Add pool"
msgstr "Ajouter une poule"
#: participation/templates/participation/tournament_list.html:6
#: tfjm/templates/base.html:242
#: tfjm/templates/base.html:67
msgid "All tournaments"
msgstr "Tous les tournois"
@ -1467,8 +1467,8 @@ msgstr "Modèles :"
msgid "Warning: non-free format"
msgstr "Attention : format non libre"
#: participation/views.py:51 tfjm/templates/base.html:73
#: tfjm/templates/base.html:257
#: participation/views.py:51 tfjm/templates/base.html:82
#: tfjm/templates/navbar.html:35
msgid "Create team"
msgstr "Créer une équipe"
@ -1480,8 +1480,8 @@ msgstr "Vous ne participez pas, vous ne pouvez pas créer d'équipe."
msgid "You are already in a team."
msgstr "Vous êtes déjà dans une équipe."
#: participation/views.py:92 tfjm/templates/base.html:78
#: tfjm/templates/base.html:252
#: participation/views.py:92 tfjm/templates/base.html:77
#: tfjm/templates/navbar.html:40
msgid "Join team"
msgstr "Rejoindre une équipe"
@ -1635,7 +1635,7 @@ msgstr "rôle"
msgid "participant"
msgstr "participant⋅e"
#: registration/forms.py:25 registration/models.py:298
#: registration/forms.py:25 registration/models.py:321
msgid "coach"
msgstr "encadrant⋅e"
@ -1647,64 +1647,75 @@ msgstr "En attente"
msgid "You must upload your scholarship attestation."
msgstr "Vous devez envoyer votre attestation de bourse."
#: registration/models.py:35
#: registration/models.py:36
msgid "Grant Animath to contact me in the future about other actions"
msgstr ""
"Autoriser Animath à me recontacter à l'avenir à propos d'autres actions"
#: registration/models.py:40
#: registration/models.py:41
msgid "email confirmed"
msgstr "email confirmé"
#: registration/models.py:48
#: registration/models.py:49
msgid "Activate your TFJM² account"
msgstr "Activez votre compte du TFJM²"
#: registration/models.py:95 registration/models.py:351
#: registration/models.py:98
#, python-brace-format
msgid ""
"Your email address is not validated. Please click on the link you received "
"by email. You can resend a mail by clicking on <a "
"href=\"{send_email_url}\">this link</a>."
msgstr ""
"Votre adresse mail n'est pas validée. Merci de cliquer sur le lien que vous "
"avez reçu par mail. Vous pouvez renvoyer un mail en cliquant sur <a "
"href=\"{send_email_url}\">ce lien</a>."
#: registration/models.py:118 registration/models.py:374
msgid "registration"
msgstr "inscription"
#: registration/models.py:96
#: registration/models.py:119
msgid "registrations"
msgstr "inscriptions"
#: registration/models.py:128
#: registration/models.py:151
msgid "gender"
msgstr "genre"
#: registration/models.py:130
#: registration/models.py:153
msgid "Female"
msgstr "Femme"
#: registration/models.py:131
#: registration/models.py:154
msgid "Male"
msgstr "Homme"
#: registration/models.py:132
#: registration/models.py:155
msgid "Other"
msgstr "Autre"
#: registration/models.py:139
#: registration/models.py:162
msgid "address"
msgstr "adresse"
#: registration/models.py:143
#: registration/models.py:166
msgid "zip code"
msgstr "code postal"
#: registration/models.py:149
#: registration/models.py:172
msgid "city"
msgstr "ville"
#: registration/models.py:153
#: registration/models.py:176
msgid "phone number"
msgstr "numéro de téléphone"
#: registration/models.py:158
#: registration/models.py:181
msgid "health issues"
msgstr "problèmes de santé"
#: registration/models.py:160
#: registration/models.py:183
msgid ""
"You can indicate here your allergies or anything that is important to know "
"for organizers."
@ -1712,11 +1723,11 @@ msgstr ""
"Vous pouvez indiquer ici vos allergies ou n'importe quoi qui peut être bon à "
"savoir pour les organisateur⋅rices."
#: registration/models.py:164
#: registration/models.py:187
msgid "housing constraints"
msgstr "contraintes de logement"
#: registration/models.py:166
#: registration/models.py:189
msgid ""
"You can fill in something here if you have any housing constraints, e.g. "
"medical problems, scheduling issues, gender issues, or anything else you "
@ -1729,83 +1740,83 @@ msgstr ""
"organisateur⋅rices. Laissez vide si vous n'avez rien de spécifique à "
"déclarer."
#: registration/models.py:173
#: registration/models.py:196
msgid "photo authorization"
msgstr "autorisation de droit à l'image"
#: registration/models.py:200
#: registration/models.py:223
msgid "participant registration"
msgstr "inscription de participant⋅e"
#: registration/models.py:201
#: registration/models.py:224
msgid "participant registrations"
msgstr "inscriptions de participant⋅es"
#: registration/models.py:210
#: registration/models.py:233
msgid "birth date"
msgstr "date de naissance"
#: registration/models.py:216
#: registration/models.py:239
msgid "12th grade"
msgstr "Terminale"
#: registration/models.py:217
#: registration/models.py:240
msgid "11th grade"
msgstr "Première"
#: registration/models.py:218
#: registration/models.py:241
msgid "10th grade or lower"
msgstr "Seconde ou inférieur"
#: registration/models.py:220
#: registration/models.py:243
msgid "student class"
msgstr "classe"
#: registration/models.py:225
#: registration/models.py:248
msgid "school"
msgstr "école"
#: registration/models.py:230
#: registration/models.py:253
msgid "responsible name"
msgstr "nom d'un⋅e responsable légal⋅e"
#: registration/models.py:235
#: registration/models.py:258
msgid "responsible phone number"
msgstr "numéro de téléphone d'un⋅e responsable légal⋅e"
#: registration/models.py:240
#: registration/models.py:263
msgid "responsible email address"
msgstr "adresse e-mail d'un⋅e responsable légal⋅e"
#: registration/models.py:245
#: registration/models.py:268
msgid "parental authorization"
msgstr "autorisation parentale"
#: registration/models.py:252
#: registration/models.py:275
msgid "health sheet"
msgstr "fiche sanitaire"
#: registration/models.py:259
#: registration/models.py:282
msgid "vaccine sheet"
msgstr "carnet de vaccination"
#: registration/models.py:267
#: registration/models.py:290
msgid "student"
msgstr "étudiant⋅e"
#: registration/models.py:275
#: registration/models.py:298
msgid "student registration"
msgstr "inscription d'élève"
#: registration/models.py:276
#: registration/models.py:299
msgid "student registrations"
msgstr "inscriptions d'élève"
#: registration/models.py:287
#: registration/models.py:310
msgid "most recent degree in mathematics, computer science or physics"
msgstr "Dernier diplôme obtenu en mathématiques, informatique ou physique"
#: registration/models.py:288
#: registration/models.py:311
msgid ""
"Your most recent degree in maths, computer science or physics, or your last "
"entrance exam (CAPES, Agrégation,…)"
@ -1813,23 +1824,23 @@ msgstr ""
"Votre dernier diplôme en mathématiques, informatique ou physique, ou votre "
"dernier concours obtenu (CAPES, Agrégation, …)"
#: registration/models.py:293 registration/models.py:315
#: registration/models.py:316 registration/models.py:338
msgid "professional activity"
msgstr "activité professionnelle"
#: registration/models.py:306
#: registration/models.py:329
msgid "coach registration"
msgstr "inscription d'encadrant⋅e"
#: registration/models.py:307
#: registration/models.py:330
msgid "coach registrations"
msgstr "inscriptions d'encadrant⋅es"
#: registration/models.py:319
#: registration/models.py:342
msgid "administrator"
msgstr "administrateur⋅rice"
#: registration/models.py:320
#: registration/models.py:343
msgid ""
"An administrator has all rights. Please don't give this right to all juries "
"and volunteers."
@ -1837,76 +1848,76 @@ msgstr ""
"Un⋅e administrateur⋅rice a tous les droits. Merci de ne pas donner ce droit "
"à toustes les juré⋅es et bénévoles."
#: registration/models.py:330
#: registration/models.py:353
msgid "admin"
msgstr "admin"
#: registration/models.py:330
#: registration/models.py:353
msgid "volunteer"
msgstr "bénévole"
#: registration/models.py:338
#: registration/models.py:361
msgid "volunteer registration"
msgstr "inscription de bénévole"
#: registration/models.py:339
#: registration/models.py:362
msgid "volunteer registrations"
msgstr "inscriptions de bénévoles"
#: registration/models.py:355
#: registration/models.py:378
msgid "type"
msgstr "type"
#: registration/models.py:358
#: registration/models.py:381
msgid "No payment"
msgstr "Pas de paiement"
#: registration/models.py:360
#: registration/models.py:383
msgid "Scholarship"
msgstr "Notification de bourse"
#: registration/models.py:361
#: registration/models.py:384
msgid "Bank transfer"
msgstr "Virement bancaire"
#: registration/models.py:362
#: registration/models.py:385
msgid "Other (please indicate)"
msgstr "Autre (veuillez spécifier)"
#: registration/models.py:363
#: registration/models.py:386
msgid "The tournament is free"
msgstr "Le tournoi est gratuit"
#: registration/models.py:370
#: registration/models.py:393
msgid "scholarship file"
msgstr "Notification de bourse"
#: registration/models.py:371
#: registration/models.py:394
msgid "only if you have a scholarship."
msgstr "Nécessaire seulement si vous déclarez être boursier."
#: registration/models.py:378
#: registration/models.py:401
msgid "additional information"
msgstr "informations additionnelles"
#: registration/models.py:379
#: registration/models.py:402
msgid "To help us to find your payment."
msgstr "Pour nous aider à retrouver votre paiement, si nécessaire."
#: registration/models.py:385
#: registration/models.py:408
msgid "payment valid"
msgstr "paiement valide"
#: registration/models.py:394
#: registration/models.py:417
#, python-brace-format
msgid "Payment of {registration}"
msgstr "Paiement de {registration}"
#: registration/models.py:397
#: registration/models.py:420
msgid "payment"
msgstr "paiement"
#: registration/models.py:398
#: registration/models.py:421
msgid "payments"
msgstr "paiements"
@ -2017,8 +2028,8 @@ msgid "Your password has been set. You may go ahead and log in now."
msgstr "Votre mot de passe a été changé. Vous pouvez désormais vous connecter."
#: registration/templates/registration/password_reset_complete.html:10
#: tfjm/templates/base.html:136 tfjm/templates/base.html:262
#: tfjm/templates/base.html:263 tfjm/templates/registration/login.html:7
#: tfjm/templates/base.html:87 tfjm/templates/base.html:88
#: tfjm/templates/navbar.html:98 tfjm/templates/registration/login.html:7
#: tfjm/templates/registration/login.html:8
#: tfjm/templates/registration/login.html:30
msgid "Log in"
@ -2251,53 +2262,53 @@ msgstr "Activité professionnelle :"
msgid "Admin:"
msgstr "Administrateur⋅rice :"
#: registration/templates/registration/user_detail.html:142
#: registration/templates/registration/user_detail.html:141
msgid "Grant Animath to contact me in the future about other actions:"
msgstr "Autorise Animath à recontacter à propos d'autres actions :"
#: registration/templates/registration/user_detail.html:150
#: registration/templates/registration/user_detail.html:149
msgid "Payment information:"
msgstr "Informations de paiement :"
#: registration/templates/registration/user_detail.html:152
#: registration/templates/registration/user_detail.html:151
msgid "yes,no,pending"
msgstr "oui,non,en attente"
#: registration/templates/registration/user_detail.html:156
#: registration/templates/registration/user_detail.html:159
#: registration/templates/registration/user_detail.html:155
#: registration/templates/registration/user_detail.html:158
msgid "valid:"
msgstr "valide :"
#: registration/templates/registration/user_detail.html:163
#: registration/templates/registration/user_detail.html:216
#: registration/templates/registration/user_detail.html:162
#: registration/templates/registration/user_detail.html:215
msgid "Update payment"
msgstr "Modifier le paiement"
#: registration/templates/registration/user_detail.html:169
#: registration/templates/registration/user_detail.html:168
msgid "Download scholarship attestation"
msgstr "Télécharger l'attestation de bourse"
#: registration/templates/registration/user_detail.html:182
#: registration/templates/registration/user_detail.html:181
msgid "Impersonate"
msgstr "Impersonifier"
#: registration/templates/registration/user_detail.html:189
#: registration/templates/registration/user_detail.html:188
#: registration/views.py:312
msgid "Upload photo authorization"
msgstr "Téléverser l'autorisation de droit à l'image"
#: registration/templates/registration/user_detail.html:194
#: registration/templates/registration/user_detail.html:193
#: registration/views.py:333
msgid "Upload health sheet"
msgstr "Téléverser la fiche sanitaire"
#: registration/templates/registration/user_detail.html:199
#: registration/templates/registration/user_detail.html:198
#: registration/views.py:354
msgid "Upload vaccine sheet"
msgstr "Téléverser le carnet de vaccination"
#: registration/templates/registration/user_detail.html:204
#: registration/templates/registration/user_detail.html:209
#: registration/templates/registration/user_detail.html:203
#: registration/templates/registration/user_detail.html:208
#: registration/views.py:375
msgid "Upload parental authorization"
msgstr "Téléverser l'autorisation parentale"
@ -2422,76 +2433,65 @@ msgstr ""
"avec les détails de l'erreur. Vous pouvez désormais retourner chercher "
"d'autres solutions.."
#: tfjm/templates/base.html:55
msgid "Home"
msgstr "Accueil"
#: tfjm/templates/base.html:74
msgid "Search results"
msgstr "Résultats de la recherche"
#: tfjm/templates/base.html:59
msgid "Tournaments"
msgstr "Tournois"
#: tfjm/templates/base.html:64
msgid "Users"
msgstr "Utilisateur⋅rices"
#: tfjm/templates/base.html:84
msgid "My team"
msgstr "Mon équipe"
#: tfjm/templates/base.html:89
msgid "My participation"
msgstr "Ma participation"
#: tfjm/templates/base.html:105
msgid "Chat"
msgstr "Chat"
#: tfjm/templates/base.html:110
msgid "Administration"
msgstr "Administration"
#: tfjm/templates/base.html:118
msgid "Search…"
msgstr "Chercher…"
#: tfjm/templates/base.html:127
msgid "Return to admin view"
msgstr "Retourner à l'interface administrateur⋅rice"
#: tfjm/templates/base.html:132
msgid "Register"
msgstr "S'inscrire"
#: tfjm/templates/base.html:148
msgid "My account"
msgstr "Mon compte"
#: tfjm/templates/base.html:153
msgid "Log out"
msgstr "Déconnexion"
#: tfjm/templates/base.html:171
#, python-format
msgid ""
"Your email address is not validated. Please click on the link you received "
"by email. You can resend a mail by clicking on <a "
"href=\"%(send_email_url)s\">this link</a>."
msgstr ""
"Votre adresse mail n'est pas validée. Merci de cliquer sur le lien que vous "
"avez reçu par mail. Vous pouvez renvoyer un mail en cliquant sur <a "
"href=\"%(send_email_url)s\">ce lien</a>."
#: tfjm/templates/base.html:200
#: tfjm/templates/footer.html:10
msgid "Contact us"
msgstr "Nous contacter"
#: tfjm/templates/base.html:227
#: tfjm/templates/footer.html:37
msgid "About"
msgstr "À propos"
#: tfjm/templates/base.html:249
msgid "Search results"
msgstr "Résultats de la recherche"
#: tfjm/templates/navbar.html:17
msgid "Home"
msgstr "Accueil"
#: tfjm/templates/navbar.html:21
msgid "Tournaments"
msgstr "Tournois"
#: tfjm/templates/navbar.html:26
msgid "Users"
msgstr "Utilisateur⋅rices"
#: tfjm/templates/navbar.html:46
msgid "My team"
msgstr "Mon équipe"
#: tfjm/templates/navbar.html:51
msgid "My participation"
msgstr "Ma participation"
#: tfjm/templates/navbar.html:67
msgid "Chat"
msgstr "Chat"
#: tfjm/templates/navbar.html:72
msgid "Administration"
msgstr "Administration"
#: tfjm/templates/navbar.html:80
msgid "Search…"
msgstr "Chercher…"
#: tfjm/templates/navbar.html:89
msgid "Return to admin view"
msgstr "Retourner à l'interface administrateur⋅rice"
#: tfjm/templates/navbar.html:94
msgid "Register"
msgstr "S'inscrire"
#: tfjm/templates/navbar.html:110
msgid "My account"
msgstr "Mon compte"
#: tfjm/templates/navbar.html:115
msgid "Log out"
msgstr "Déconnexion"
#: tfjm/templates/registration/logged_out.html:8
msgid "Thanks for spending some quality time with the Web site today."
@ -2529,3 +2529,7 @@ msgstr "Résultats"
#: tfjm/templates/search/search.html:25
msgid "No results found."
msgstr "Aucun résultat."
#: tfjm/templates/sidebar.html:6
msgid "Informations"
msgstr "Informations"

View File

@ -12,6 +12,7 @@ from django.utils import timezone
from django.utils.crypto import get_random_string
from django.utils.encoding import force_bytes
from django.utils.http import urlsafe_base64_encode
from django.utils.text import format_lazy
from django.utils.translation import gettext_lazy as _
from phonenumber_field.modelfields import PhoneNumberField
from polymorphic.models import PolymorphicModel
@ -88,6 +89,28 @@ class Registration(PolymorphicModel):
def get_absolute_url(self):
return reverse_lazy("registration:user_detail", args=(self.user_id,))
def registration_informations(self):
return []
def important_informations(self):
informations = []
if not self.email_confirmed:
text = _("Your email address is not validated. Please click on the link you received by email. "
"You can resend a mail by clicking on <a href=\"{send_email_url}\">this link</a>.")
send_email_url = reverse_lazy("registration:email_validation_resend", args=(self.user_id,))
content = format_lazy(text, send_email_url=send_email_url)
informations.append({
'title': "Validation e-mail",
'type': "warning",
'priority': 0,
'content': content,
})
informations.extend(self.registration_informations())
informations.sort(key=lambda info: (info['priority'], info['title']))
return informations
def __str__(self):
return f"{self.user.first_name} {self.user.last_name}"

View File

@ -1,13 +1,21 @@
{% load i18n %}
<div>
{% if user.is_authenticated and not user.registration.email_confirmed %}
<div class="alert alert-warning" role="alert">
{% url "registration:email_validation_resend" pk=user.pk as send_email_url %}
{% blocktrans trimmed %}
Your email address is not validated. Please click on the link you received by email.
You can resend a mail by clicking on <a href="{{ send_email_url }}">this link</a>.
{% endblocktrans %}
{% if user.is_authenticated %}
<div class="card">
<div class="card-header bg-dark-subtle">
<h3 class="card-title">{% trans "Informations" %}</h3>
</div>
{% endif %}
</div>
<div class="card-body">
{% for information in user.registration.important_informations %}
<div class="card">
<div class="card-header bg-dark-subtle">
<h4 class="card-title">{{ information.title }}</h4>
</div>
<div class="card-body bg-warning-subtle">
{{ information.content|safe }}
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}