mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-24 17:42:23 +00:00
Display pending validations for organizers
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
bc67d1cf1f
commit
c1ce7cb70f
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: TFJM\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-02-11 22:18+0100\n"
|
||||
"POT-Creation-Date: 2024-02-11 22:35+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"
|
||||
@ -710,7 +710,7 @@ msgstr ""
|
||||
"L'équipe {trigram} n'a pas encore été validée par les organisateurices. "
|
||||
"Merci de patienter."
|
||||
|
||||
#: participation/models.py:193
|
||||
#: participation/models.py:193 registration/models.py:458
|
||||
msgid "Pending validation"
|
||||
msgstr "Validation en attente"
|
||||
|
||||
@ -1792,7 +1792,7 @@ msgstr ""
|
||||
"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:445
|
||||
#: registration/models.py:118 registration/models.py:480
|
||||
msgid "registration"
|
||||
msgstr "inscription"
|
||||
|
||||
@ -2043,68 +2043,93 @@ msgstr "admin"
|
||||
msgid "volunteer"
|
||||
msgstr "bénévole"
|
||||
|
||||
#: registration/models.py:432
|
||||
#: registration/models.py:437
|
||||
msgid ""
|
||||
"Registrations for tournament {tournament} are closing on {date:%Y-%m-%d %H:"
|
||||
"%M}. There are for now {validated_teams} validated teams (+ {pending_teams} "
|
||||
"pending) on {max_teams} expected."
|
||||
msgstr ""
|
||||
"Les inscriptions pour le tournoi {tournament} ferment le {date:%d/%m/%Y à %H:"
|
||||
"%M}. Il y a pour l'instant {validated_teams} équipes validées (+ {pending_"
|
||||
"teams} en attente) sur {max_teams} attendues."
|
||||
|
||||
#: registration/models.py:445
|
||||
msgid "Registrations"
|
||||
msgstr "Inscriptions"
|
||||
|
||||
#: registration/models.py:452
|
||||
#, python-brace-format
|
||||
msgid ""
|
||||
"The team {trigram} requested to be validated for the tournament of "
|
||||
"{tournament}. You can check the status of the team on the <a "
|
||||
"href=\"{url}\">team page</a>."
|
||||
msgstr ""
|
||||
"L'équipe {trigram} a demandé à être validée pour le tournoi {tournament}. "
|
||||
"Vous pouvez vérifier le statut de l'équipe sur la <a href=\"{url}\">page de "
|
||||
"l'équipe</a>."
|
||||
|
||||
#: registration/models.py:467
|
||||
msgid "volunteer registration"
|
||||
msgstr "inscription de bénévole"
|
||||
|
||||
#: registration/models.py:433
|
||||
#: registration/models.py:468
|
||||
msgid "volunteer registrations"
|
||||
msgstr "inscriptions de bénévoles"
|
||||
|
||||
#: registration/models.py:449
|
||||
#: registration/models.py:484
|
||||
msgid "type"
|
||||
msgstr "type"
|
||||
|
||||
#: registration/models.py:452
|
||||
#: registration/models.py:487
|
||||
msgid "No payment"
|
||||
msgstr "Pas de paiement"
|
||||
|
||||
#: registration/models.py:454
|
||||
#: registration/models.py:489
|
||||
msgid "Scholarship"
|
||||
msgstr "Notification de bourse"
|
||||
|
||||
#: registration/models.py:455
|
||||
#: registration/models.py:490
|
||||
msgid "Bank transfer"
|
||||
msgstr "Virement bancaire"
|
||||
|
||||
#: registration/models.py:456
|
||||
#: registration/models.py:491
|
||||
msgid "Other (please indicate)"
|
||||
msgstr "Autre (veuillez spécifier)"
|
||||
|
||||
#: registration/models.py:457
|
||||
#: registration/models.py:492
|
||||
msgid "The tournament is free"
|
||||
msgstr "Le tournoi est gratuit"
|
||||
|
||||
#: registration/models.py:464
|
||||
#: registration/models.py:499
|
||||
msgid "scholarship file"
|
||||
msgstr "Notification de bourse"
|
||||
|
||||
#: registration/models.py:465
|
||||
#: registration/models.py:500
|
||||
msgid "only if you have a scholarship."
|
||||
msgstr "Nécessaire seulement si vous déclarez être boursier."
|
||||
|
||||
#: registration/models.py:472
|
||||
#: registration/models.py:507
|
||||
msgid "additional information"
|
||||
msgstr "informations additionnelles"
|
||||
|
||||
#: registration/models.py:473
|
||||
#: registration/models.py:508
|
||||
msgid "To help us to find your payment."
|
||||
msgstr "Pour nous aider à retrouver votre paiement, si nécessaire."
|
||||
|
||||
#: registration/models.py:479
|
||||
#: registration/models.py:514
|
||||
msgid "payment valid"
|
||||
msgstr "paiement valide"
|
||||
|
||||
#: registration/models.py:488
|
||||
#: registration/models.py:523
|
||||
#, python-brace-format
|
||||
msgid "Payment of {registration}"
|
||||
msgstr "Paiement de {registration}"
|
||||
|
||||
#: registration/models.py:491
|
||||
#: registration/models.py:526
|
||||
msgid "payment"
|
||||
msgstr "paiement"
|
||||
|
||||
#: registration/models.py:492
|
||||
#: registration/models.py:527
|
||||
msgid "payments"
|
||||
msgstr "paiements"
|
||||
|
||||
|
@ -428,6 +428,41 @@ class VolunteerRegistration(Registration):
|
||||
from registration.forms import VolunteerRegistrationForm
|
||||
return VolunteerRegistrationForm
|
||||
|
||||
def important_informations(self):
|
||||
informations = []
|
||||
|
||||
for tournament in self.organized_tournaments.all():
|
||||
if timezone.now() < tournament.inscription_limit \
|
||||
or tournament.participations.filter(valid=True).count() < tournament.max_teams:
|
||||
text = _("Registrations for tournament {tournament} are closing on {date:%Y-%m-%d %H:%M}. "
|
||||
"There are for now {validated_teams} validated teams (+ {pending_teams} pending) "
|
||||
"on {max_teams} expected.")
|
||||
content = format_lazy(text, tournament=tournament.name, date=tournament.inscription_limit,
|
||||
validated_teams=tournament.participations.filter(valid=True).count(),
|
||||
pending_teams=tournament.participations.filter(valid=False).count(),
|
||||
max_teams=tournament.max_teams)
|
||||
informations.append({
|
||||
'title': _("Registrations"),
|
||||
'type': "info",
|
||||
'priority': 2,
|
||||
'content': content,
|
||||
})
|
||||
|
||||
for pending_participation in tournament.participations.filter(valid=False).all():
|
||||
text = _("The team {trigram} requested to be validated for the tournament of {tournament}. "
|
||||
"You can check the status of the team on the <a href=\"{url}\">team page</a>.")
|
||||
url = reverse_lazy("participation:team_detail", args=(pending_participation.team.id,))
|
||||
content = format_lazy(text, trigram=pending_participation.team.trigram,
|
||||
tournament=tournament.name, url=url)
|
||||
informations.append({
|
||||
'title': _("Pending validation"),
|
||||
'type': "warning",
|
||||
'priority': 4,
|
||||
'content': content,
|
||||
})
|
||||
|
||||
return informations
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("volunteer registration")
|
||||
verbose_name_plural = _("volunteer registrations")
|
||||
|
Loading…
Reference in New Issue
Block a user