mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-02-12 11:01:19 +00:00
Compare commits
12 Commits
b0a3a22f83
...
982b61fe03
Author | SHA1 | Date | |
---|---|---|---|
|
982b61fe03 | ||
|
ace1dbdc75 | ||
|
731f8711ff | ||
|
d3e18a8fbb | ||
|
ece1e800ab | ||
|
2e0028c063 | ||
|
d304c3565c | ||
|
0fe1f9c348 | ||
|
9867e5e2a8 | ||
|
48b34e4362 | ||
|
10932d1cc5 | ||
|
02ca1d1efe |
@ -16,10 +16,8 @@ class Command(BaseCommand):
|
|||||||
if not os.path.isfile(".matrix_avatar"):
|
if not os.path.isfile(".matrix_avatar"):
|
||||||
stat_file = os.stat("corres2math/static/logo.png")
|
stat_file = os.stat("corres2math/static/logo.png")
|
||||||
with open("corres2math/static/logo.png", "rb") as f:
|
with open("corres2math/static/logo.png", "rb") as f:
|
||||||
resp, _ = Matrix.upload(f, filename="logo.png", content_type="image/png",
|
resp = Matrix.upload(f, filename="logo.png", content_type="image/png",
|
||||||
filesize=stat_file.st_size)
|
filesize=stat_file.st_size)[0][0]
|
||||||
if not hasattr(resp, "content_uri"):
|
|
||||||
raise Exception(resp)
|
|
||||||
avatar_uri = resp.content_uri
|
avatar_uri = resp.content_uri
|
||||||
with open(".matrix_avatar", "w") as f:
|
with open(".matrix_avatar", "w") as f:
|
||||||
f.write(avatar_uri)
|
f.write(avatar_uri)
|
||||||
@ -58,9 +56,20 @@ class Command(BaseCommand):
|
|||||||
preset=RoomPreset.public_chat,
|
preset=RoomPreset.public_chat,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not async_to_sync(Matrix.resolve_room_alias)("#flood:correspondances-maths.fr"):
|
||||||
|
Matrix.create_room(
|
||||||
|
visibility=RoomVisibility.public,
|
||||||
|
alias="flood",
|
||||||
|
name="Flood",
|
||||||
|
topic="Discutez de tout et de rien !",
|
||||||
|
federate=False,
|
||||||
|
preset=RoomPreset.public_chat,
|
||||||
|
)
|
||||||
|
|
||||||
Matrix.set_room_avatar("#annonces:correspondances-maths.fr", avatar_uri)
|
Matrix.set_room_avatar("#annonces:correspondances-maths.fr", avatar_uri)
|
||||||
Matrix.set_room_avatar("#faq:correspondances-maths.fr", avatar_uri)
|
Matrix.set_room_avatar("#faq:correspondances-maths.fr", avatar_uri)
|
||||||
Matrix.set_room_avatar("#je-cherche-une-equipe:correspondances-maths.fr", avatar_uri)
|
Matrix.set_room_avatar("#je-cherche-une-equipe:correspondances-maths.fr", avatar_uri)
|
||||||
|
Matrix.set_room_avatar("#flood:correspondances-maths.fr", avatar_uri)
|
||||||
|
|
||||||
Matrix.set_room_power_level_event("#annonces:correspondances-maths.fr", "events_default", 50)
|
Matrix.set_room_power_level_event("#annonces:correspondances-maths.fr", "events_default", 50)
|
||||||
|
|
||||||
@ -69,9 +78,12 @@ class Command(BaseCommand):
|
|||||||
Matrix.invite("#faq:correspondances-maths.fr", f"@{r.matrix_username}:correspondances-maths.fr")
|
Matrix.invite("#faq:correspondances-maths.fr", f"@{r.matrix_username}:correspondances-maths.fr")
|
||||||
Matrix.invite("#je-cherche-une-equipe:correspondances-maths.fr",
|
Matrix.invite("#je-cherche-une-equipe:correspondances-maths.fr",
|
||||||
f"@{r.matrix_username}:correspondances-maths.fr")
|
f"@{r.matrix_username}:correspondances-maths.fr")
|
||||||
|
Matrix.invite("#flood:correspondances-maths.fr", f"@{r.matrix_username}:correspondances-maths.fr")
|
||||||
|
|
||||||
for admin in AdminRegistration.objects.all():
|
for admin in AdminRegistration.objects.all():
|
||||||
Matrix.set_room_power_level("#annonces:correspondances-maths.fr",
|
Matrix.set_room_power_level("#annonces:correspondances-maths.fr",
|
||||||
f"@{admin.matrix_username}:correspondances-maths.fr", 95)
|
f"@{admin.matrix_username}:correspondances-maths.fr", 95)
|
||||||
Matrix.set_room_power_level("#faq:correspondances-maths.fr",
|
Matrix.set_room_power_level("#faq:correspondances-maths.fr",
|
||||||
f"@{admin.matrix_username}:correspondances-maths.fr", 95)
|
f"@{admin.matrix_username}:correspondances-maths.fr", 95)
|
||||||
|
Matrix.set_room_power_level("#flood:correspondances-maths.fr",
|
||||||
|
f"@{admin.matrix_username}:correspondances-maths.fr", 95)
|
||||||
|
38
apps/participation/management/commands/fix_sympa_lists.py
Normal file
38
apps/participation/management/commands/fix_sympa_lists.py
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
from corres2math.lists import get_sympa_client
|
||||||
|
from django.core.management import BaseCommand
|
||||||
|
from django.db.models import Q
|
||||||
|
from participation.models import Team
|
||||||
|
from registration.models import CoachRegistration, StudentRegistration
|
||||||
|
|
||||||
|
|
||||||
|
class Command(BaseCommand):
|
||||||
|
def handle(self, *args, **options):
|
||||||
|
"""
|
||||||
|
Create Sympa mailing lists and register teams.
|
||||||
|
"""
|
||||||
|
sympa = get_sympa_client()
|
||||||
|
|
||||||
|
sympa.create_list("equipes", "Équipes des Correspondances", "hotline",
|
||||||
|
"Liste de diffusion pour contacter toutes les équipes validées des Correspondances.",
|
||||||
|
"education", raise_error=False)
|
||||||
|
sympa.create_list("equipes-non-valides", "Équipes des Correspondances", "hotline",
|
||||||
|
"Liste de diffusion pour contacter toutes les équipes non-validées des Correspondances.",
|
||||||
|
"education", raise_error=False)
|
||||||
|
|
||||||
|
for problem in range(1, 4):
|
||||||
|
sympa.create_list(f"probleme-{problem}",
|
||||||
|
f"Équipes des Correspondances participant au problème {problem}", "hotline",
|
||||||
|
f"Liste de diffusion pour contacter les équipes participant au problème {problem}"
|
||||||
|
f" des Correspondances.", "education", raise_error=False)
|
||||||
|
|
||||||
|
for team in Team.objects.filter(participation__valid=True).all():
|
||||||
|
sympa.subscribe(team.email, "equipes", f"Equipe {team.name}", True, True)
|
||||||
|
sympa.subscribe(team.email, f"probleme-{team.participation.problem}", f"Equipe {team.name}", True)
|
||||||
|
|
||||||
|
for team in Team.objects.filter(Q(participation__valid=False) | Q(participation__valid__isnull=True)).all():
|
||||||
|
sympa.subscribe(team.email, "equipes-non-valides", f"Equipe {team.name}", True)
|
||||||
|
|
||||||
|
for student in StudentRegistration.objects.filter(team__isnull=False).all():
|
||||||
|
sympa.subscribe(student.user.email, f"equipe-{student.team.trigram.lower}", True, f"{student}")
|
||||||
|
for coach in CoachRegistration.objects.filter(team__isnull=False).all():
|
||||||
|
sympa.subscribe(coach.user.email, f"equipe-{coach.team.trigram.lower}", True, f"{coach}")
|
@ -65,11 +65,22 @@ class Team(models.Model):
|
|||||||
"education",
|
"education",
|
||||||
raise_error=False,
|
raise_error=False,
|
||||||
)
|
)
|
||||||
|
if self.pk and self.participation.valid: # pragma: no cover
|
||||||
|
get_sympa_client().subscribe(self.email, "equipes", False, f"Equipe {self.name}")
|
||||||
|
get_sympa_client().subscribe(self.email, f"probleme-{self.participation.problem}", False,
|
||||||
|
f"Equipe {self.name}")
|
||||||
|
else:
|
||||||
|
get_sympa_client().subscribe(self.email, "equipes-non-valides", False)
|
||||||
|
|
||||||
def delete_mailing_list(self):
|
def delete_mailing_list(self):
|
||||||
"""
|
"""
|
||||||
Drop the Sympa mailing list, if the team is empty or if the trigram changed.
|
Drop the Sympa mailing list, if the team is empty or if the trigram changed.
|
||||||
"""
|
"""
|
||||||
|
if self.participation.valid: # pragma: no cover
|
||||||
|
get_sympa_client().unsubscribe(self.email, "equipes", False)
|
||||||
|
get_sympa_client().unsubscribe(self.email, f"probleme-{self.participation.problem}", False)
|
||||||
|
else:
|
||||||
|
get_sympa_client().unsubscribe(self.email, "equipes-non-valides", False)
|
||||||
get_sympa_client().delete_list(f"equipe-{self.trigram}")
|
get_sympa_client().delete_list(f"equipe-{self.trigram}")
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
@ -281,10 +292,8 @@ class Phase(models.Model):
|
|||||||
qs = Phase.objects.filter(start__lte=timezone.now(), end__gte=timezone.now())
|
qs = Phase.objects.filter(start__lte=timezone.now(), end__gte=timezone.now())
|
||||||
if qs.exists():
|
if qs.exists():
|
||||||
return qs.get()
|
return qs.get()
|
||||||
qs = Phase.objects.order_by("phase_number").all()
|
qs = Phase.objects.filter(start__lte=timezone.now()).order_by("phase_number").all()
|
||||||
if timezone.now() < qs.first().start:
|
return qs.last() if qs.exists() else None
|
||||||
return qs.first()
|
|
||||||
return qs.last()
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return _("Phase {phase_number:d} starts on {start:%Y-%m-%d %H:%M} and ends on {end:%Y-%m-%d %H:%M}")\
|
return _("Phase {phase_number:d} starts on {start:%Y-%m-%d %H:%M} and ends on {end:%Y-%m-%d %H:%M}")\
|
||||||
|
@ -2,7 +2,7 @@ from corres2math.lists import get_sympa_client
|
|||||||
from participation.models import Participation, Team, Video
|
from participation.models import Participation, Team, Video
|
||||||
|
|
||||||
|
|
||||||
def create_team_participation(instance, **_):
|
def create_team_participation(instance, created, **_):
|
||||||
"""
|
"""
|
||||||
When a team got created, create an associated team and create Video objects.
|
When a team got created, create an associated team and create Video objects.
|
||||||
"""
|
"""
|
||||||
@ -12,6 +12,8 @@ def create_team_participation(instance, **_):
|
|||||||
if not participation.synthesis:
|
if not participation.synthesis:
|
||||||
participation.synthesis = Video.objects.create()
|
participation.synthesis = Video.objects.create()
|
||||||
participation.save()
|
participation.save()
|
||||||
|
if not created:
|
||||||
|
participation.team.create_mailing_list()
|
||||||
|
|
||||||
|
|
||||||
def update_mailing_list(instance: Team, **_):
|
def update_mailing_list(instance: Team, **_):
|
||||||
|
13
apps/participation/templates/participation/team_list.html
Normal file
13
apps/participation/templates/participation/team_list.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% load django_tables2 i18n %}
|
||||||
|
|
||||||
|
{% block contenttitle %}
|
||||||
|
<h1>{% trans "All teams" %}</h1>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div id="form-content">
|
||||||
|
{% render_table table %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
0
apps/participation/templatetags/__init__.py
Normal file
0
apps/participation/templatetags/__init__.py
Normal file
12
apps/participation/templatetags/calendar.py
Normal file
12
apps/participation/templatetags/calendar.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from django import template
|
||||||
|
|
||||||
|
from ..models import Phase
|
||||||
|
|
||||||
|
|
||||||
|
def current_phase(nb):
|
||||||
|
phase = Phase.current_phase()
|
||||||
|
return phase is not None and phase.phase_number == nb
|
||||||
|
|
||||||
|
|
||||||
|
register = template.Library()
|
||||||
|
register.filter("current_phase", current_phase)
|
@ -185,6 +185,13 @@ class TestStudentParticipation(TestCase):
|
|||||||
))
|
))
|
||||||
self.assertEqual(response.status_code, 403)
|
self.assertEqual(response.status_code, 403)
|
||||||
|
|
||||||
|
def test_team_list(self):
|
||||||
|
"""
|
||||||
|
Test to display the list of teams.
|
||||||
|
"""
|
||||||
|
response = self.client.get(reverse("participation:team_list"))
|
||||||
|
self.assertTrue(response.status_code, 200)
|
||||||
|
|
||||||
def test_no_myteam_redirect_noteam(self):
|
def test_no_myteam_redirect_noteam(self):
|
||||||
"""
|
"""
|
||||||
Test redirection.
|
Test redirection.
|
||||||
@ -575,7 +582,7 @@ class TestStudentParticipation(TestCase):
|
|||||||
for i in range(1, 5):
|
for i in range(1, 5):
|
||||||
Phase.objects.filter(phase_number=i).update(start=timezone.now() + timedelta(days=2 * i),
|
Phase.objects.filter(phase_number=i).update(start=timezone.now() + timedelta(days=2 * i),
|
||||||
end=timezone.now() + timedelta(days=2 * i + 1))
|
end=timezone.now() + timedelta(days=2 * i + 1))
|
||||||
self.assertEqual(Phase.current_phase().phase_number, 1)
|
self.assertEqual(Phase.current_phase(), None)
|
||||||
|
|
||||||
# We are after the end
|
# We are after the end
|
||||||
for i in range(1, 5):
|
for i in range(1, 5):
|
||||||
|
@ -4,7 +4,7 @@ from django.views.generic import TemplateView
|
|||||||
from .views import CalendarView, CreateQuestionView, CreateTeamView, DeleteQuestionView, JoinTeamView, \
|
from .views import CalendarView, CreateQuestionView, CreateTeamView, DeleteQuestionView, JoinTeamView, \
|
||||||
MyParticipationDetailView, MyTeamDetailView, ParticipationDetailView, PhaseUpdateView, \
|
MyParticipationDetailView, MyTeamDetailView, ParticipationDetailView, PhaseUpdateView, \
|
||||||
SetParticipationReceiveParticipationView, SetParticipationSendParticipationView, TeamAuthorizationsView, \
|
SetParticipationReceiveParticipationView, SetParticipationSendParticipationView, TeamAuthorizationsView, \
|
||||||
TeamDetailView, TeamLeaveView, TeamUpdateView, UpdateQuestionView, UploadVideoView
|
TeamDetailView, TeamLeaveView, TeamListView, TeamUpdateView, UpdateQuestionView, UploadVideoView
|
||||||
|
|
||||||
|
|
||||||
app_name = "participation"
|
app_name = "participation"
|
||||||
@ -12,6 +12,7 @@ app_name = "participation"
|
|||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("create_team/", CreateTeamView.as_view(), name="create_team"),
|
path("create_team/", CreateTeamView.as_view(), name="create_team"),
|
||||||
path("join_team/", JoinTeamView.as_view(), name="join_team"),
|
path("join_team/", JoinTeamView.as_view(), name="join_team"),
|
||||||
|
path("teams/", TeamListView.as_view(), name="team_list"),
|
||||||
path("team/", MyTeamDetailView.as_view(), name="my_team_detail"),
|
path("team/", MyTeamDetailView.as_view(), name="my_team_detail"),
|
||||||
path("team/<int:pk>/", TeamDetailView.as_view(), name="team_detail"),
|
path("team/<int:pk>/", TeamDetailView.as_view(), name="team_detail"),
|
||||||
path("team/<int:pk>/update/", TeamUpdateView.as_view(), name="update_team"),
|
path("team/<int:pk>/update/", TeamUpdateView.as_view(), name="update_team"),
|
||||||
|
@ -23,7 +23,7 @@ from .forms import JoinTeamForm, ParticipationForm, PhaseForm, QuestionForm, \
|
|||||||
ReceiveParticipationForm, RequestValidationForm, SendParticipationForm, TeamForm, \
|
ReceiveParticipationForm, RequestValidationForm, SendParticipationForm, TeamForm, \
|
||||||
UploadVideoForm, ValidateParticipationForm
|
UploadVideoForm, ValidateParticipationForm
|
||||||
from .models import Participation, Phase, Question, Team, Video
|
from .models import Participation, Phase, Question, Team, Video
|
||||||
from .tables import CalendarTable
|
from .tables import CalendarTable, TeamTable
|
||||||
|
|
||||||
|
|
||||||
class CreateTeamView(LoginRequiredMixin, CreateView):
|
class CreateTeamView(LoginRequiredMixin, CreateView):
|
||||||
@ -119,6 +119,15 @@ class JoinTeamView(LoginRequiredMixin, FormView):
|
|||||||
return reverse_lazy("participation:team_detail", args=(self.object.pk,))
|
return reverse_lazy("participation:team_detail", args=(self.object.pk,))
|
||||||
|
|
||||||
|
|
||||||
|
class TeamListView(AdminMixin, SingleTableView):
|
||||||
|
"""
|
||||||
|
Display the whole list of teams
|
||||||
|
"""
|
||||||
|
model = Team
|
||||||
|
table_class = TeamTable
|
||||||
|
ordering = ('participation__problem', 'trigram',)
|
||||||
|
|
||||||
|
|
||||||
class MyTeamDetailView(LoginRequiredMixin, RedirectView):
|
class MyTeamDetailView(LoginRequiredMixin, RedirectView):
|
||||||
"""
|
"""
|
||||||
Redirect to the detail of the team in which the user is.
|
Redirect to the detail of the team in which the user is.
|
||||||
@ -223,6 +232,11 @@ class TeamDetailView(LoginRequiredMixin, FormMixin, ProcessFormView, DetailView)
|
|||||||
mail_plain = render_to_string("participation/mails/team_validated.txt", mail_context)
|
mail_plain = render_to_string("participation/mails/team_validated.txt", mail_context)
|
||||||
mail_html = render_to_string("participation/mails/team_validated.html", mail_context)
|
mail_html = render_to_string("participation/mails/team_validated.html", mail_context)
|
||||||
send_mail("[Corres2math] Équipe validée", mail_plain, None, [self.object.email], html_message=mail_html)
|
send_mail("[Corres2math] Équipe validée", mail_plain, None, [self.object.email], html_message=mail_html)
|
||||||
|
|
||||||
|
get_sympa_client().subscribe(self.object.email, "equipes", False, f"Equipe {self.object.name}")
|
||||||
|
get_sympa_client().unsubscribe(self.object.email, "equipes-non-valides", False)
|
||||||
|
get_sympa_client().subscribe(self.object.email, f"probleme-{self.object.participation.problem}", False,
|
||||||
|
f"Equipe {self.object.name}")
|
||||||
elif "invalidate" in self.request.POST:
|
elif "invalidate" in self.request.POST:
|
||||||
self.object.participation.valid = None
|
self.object.participation.valid = None
|
||||||
self.object.participation.save()
|
self.object.participation.save()
|
||||||
|
@ -13,5 +13,14 @@
|
|||||||
"single_log_out": true,
|
"single_log_out": true,
|
||||||
"single_log_out_callback": ""
|
"single_log_out_callback": ""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "cas_server.replaceattributname",
|
||||||
|
"pk": 1,
|
||||||
|
"fields": {
|
||||||
|
"name": "display_name",
|
||||||
|
"replace": "",
|
||||||
|
"service_pattern": 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -50,3 +50,4 @@ def invite_to_public_rooms(instance: Registration, created: bool, **_):
|
|||||||
Matrix.invite("#faq:correspondances-maths.fr", f"@{instance.matrix_username}:correspondances-maths.fr")
|
Matrix.invite("#faq:correspondances-maths.fr", f"@{instance.matrix_username}:correspondances-maths.fr")
|
||||||
Matrix.invite("#je-cherche-une-equip:correspondances-maths.fr",
|
Matrix.invite("#je-cherche-une-equip:correspondances-maths.fr",
|
||||||
f"@{instance.matrix_username}:correspondances-maths.fr")
|
f"@{instance.matrix_username}:correspondances-maths.fr")
|
||||||
|
Matrix.invite("#flood:correspondances-maths.fr", f"@{instance.matrix_username}:correspondances-maths.fr")
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from datetime import timedelta
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from corres2math.tokens import email_validation_token
|
from corres2math.tokens import email_validation_token
|
||||||
@ -7,8 +8,10 @@ from django.contrib.sites.models import Site
|
|||||||
from django.core.management import call_command
|
from django.core.management import call_command
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
from django.utils import timezone
|
||||||
from django.utils.encoding import force_bytes
|
from django.utils.encoding import force_bytes
|
||||||
from django.utils.http import urlsafe_base64_encode
|
from django.utils.http import urlsafe_base64_encode
|
||||||
|
from participation.models import Phase
|
||||||
|
|
||||||
from .models import AdminRegistration, CoachRegistration, StudentRegistration
|
from .models import AdminRegistration, CoachRegistration, StudentRegistration
|
||||||
|
|
||||||
@ -81,6 +84,13 @@ class TestRegistration(TestCase):
|
|||||||
"""
|
"""
|
||||||
Ensure that the signup form is working successfully.
|
Ensure that the signup form is working successfully.
|
||||||
"""
|
"""
|
||||||
|
# After first phase
|
||||||
|
response = self.client.get(reverse("registration:signup"))
|
||||||
|
self.assertEqual(response.status_code, 403)
|
||||||
|
|
||||||
|
Phase.objects.filter(phase_number__gte=2).update(start=timezone.now() + timedelta(days=1),
|
||||||
|
end=timezone.now() + timedelta(days=2))
|
||||||
|
|
||||||
response = self.client.get(reverse("registration:signup"))
|
response = self.client.get(reverse("registration:signup"))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ from django.utils.http import urlsafe_base64_decode
|
|||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.views.generic import CreateView, DetailView, RedirectView, TemplateView, UpdateView, View
|
from django.views.generic import CreateView, DetailView, RedirectView, TemplateView, UpdateView, View
|
||||||
from magic import Magic
|
from magic import Magic
|
||||||
|
from participation.models import Phase
|
||||||
|
|
||||||
from .forms import CoachRegistrationForm, PhotoAuthorizationForm, SignupForm, StudentRegistrationForm, UserForm
|
from .forms import CoachRegistrationForm, PhotoAuthorizationForm, SignupForm, StudentRegistrationForm, UserForm
|
||||||
from .models import StudentRegistration
|
from .models import StudentRegistration
|
||||||
@ -27,6 +28,15 @@ class SignupView(CreateView):
|
|||||||
template_name = "registration/signup.html"
|
template_name = "registration/signup.html"
|
||||||
extra_context = dict(title=_("Sign up"))
|
extra_context = dict(title=_("Sign up"))
|
||||||
|
|
||||||
|
def dispatch(self, request, *args, **kwargs):
|
||||||
|
"""
|
||||||
|
The signup view is available only during the first phase.
|
||||||
|
"""
|
||||||
|
current_phase = Phase.current_phase()
|
||||||
|
if not current_phase or current_phase.phase_number >= 2:
|
||||||
|
raise PermissionDenied(_("You can't register now."))
|
||||||
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data()
|
context = super().get_context_data()
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ class Matrix:
|
|||||||
"""
|
"""
|
||||||
client = await cls._get_client()
|
client = await cls._get_client()
|
||||||
resp = await client.room_resolve_alias(room_alias)
|
resp = await client.room_resolve_alias(room_alias)
|
||||||
return resp.room_id if resp else None
|
return resp.room_id if resp and hasattr(resp, "room_id") else None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@async_to_sync
|
@async_to_sync
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% load static i18n static %}
|
{% load static i18n static calendar %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
|
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
|
||||||
@ -70,7 +70,11 @@
|
|||||||
<a href="#" class="nav-link" data-toggle="modal" data-target="#calendarModal"><i class="fas fa-calendar"></i> {% trans "Calendar" %}</a>
|
<a href="#" class="nav-link" data-toggle="modal" data-target="#calendarModal"><i class="fas fa-calendar"></i> {% trans "Calendar" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% if user.is_authenticated and user.registration.participates %}
|
{% if user.is_authenticated and user.registration.is_admin %}
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a href="#" class="nav-link" data-toggle="modal" data-target="#teamsModal"><i class="fas fa-users"></i> {% trans "Teams" %}</a>
|
||||||
|
</li>
|
||||||
|
{% elif user.is_authenticated and user.registration.participates %}
|
||||||
{% if not user.registration.team %}
|
{% if not user.registration.team %}
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
<a href="#" class="nav-link" data-toggle="modal" data-target="#createTeamModal">
|
<a href="#" class="nav-link" data-toggle="modal" data-target="#createTeamModal">
|
||||||
@ -122,9 +126,11 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not user.is_authenticated %}
|
{% if not user.is_authenticated %}
|
||||||
|
{% if 1|current_phase %}
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
<a class="nav-link" href="{% url "registration:signup" %}"><i class="fas fa-user-plus"></i> {% trans "Register" %}</a>
|
<a class="nav-link" href="{% url "registration:signup" %}"><i class="fas fa-user-plus"></i> {% trans "Register" %}</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
<a class="nav-link" href="#" data-toggle="modal" data-target="#loginModal">
|
<a class="nav-link" href="#" data-toggle="modal" data-target="#loginModal">
|
||||||
<i class="fas fa-sign-in-alt"></i> {% trans "Log in" %}
|
<i class="fas fa-sign-in-alt"></i> {% trans "Log in" %}
|
||||||
@ -216,21 +222,28 @@
|
|||||||
|
|
||||||
{% trans "Calendar" as modal_title %}
|
{% trans "Calendar" as modal_title %}
|
||||||
{% include "base_modal.html" with modal_id="calendar" modal_additional_class="modal-lg" %}
|
{% include "base_modal.html" with modal_id="calendar" modal_additional_class="modal-lg" %}
|
||||||
{% trans "Search results" as modal_title %}
|
|
||||||
{% include "base_modal.html" with modal_id="search" modal_form_method="get" modal_additional_class="modal-lg" %}
|
|
||||||
{% trans "Log in" as modal_title %}
|
|
||||||
{% trans "Log in" as modal_button %}
|
|
||||||
{% url "login" as modal_action %}
|
|
||||||
{% include "base_modal.html" with modal_id="login" %}
|
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
|
{% trans "All teams" as modal_title %}
|
||||||
|
{% include "base_modal.html" with modal_id="teams" modal_additional_class="modal-lg" %}
|
||||||
|
|
||||||
|
{% trans "Search results" as modal_title %}
|
||||||
|
{% include "base_modal.html" with modal_id="search" modal_form_method="get" modal_additional_class="modal-lg" %}
|
||||||
|
|
||||||
{% trans "Join team" as modal_title %}
|
{% trans "Join team" as modal_title %}
|
||||||
{% trans "Join" as modal_button %}
|
{% trans "Join" as modal_button %}
|
||||||
{% url "participation:join_team" as modal_action %}
|
{% url "participation:join_team" as modal_action %}
|
||||||
|
|
||||||
{% include "base_modal.html" with modal_id="joinTeam" %}
|
{% include "base_modal.html" with modal_id="joinTeam" %}
|
||||||
{% trans "Create team" as modal_title %}
|
{% trans "Create team" as modal_title %}
|
||||||
{% trans "Create" as modal_button %}
|
{% trans "Create" as modal_button %}
|
||||||
{% url "participation:create_team" as modal_action %}
|
{% url "participation:create_team" as modal_action %}
|
||||||
{% include "base_modal.html" with modal_id="createTeam" modal_button_type="success" %}
|
{% include "base_modal.html" with modal_id="createTeam" modal_button_type="success" %}
|
||||||
|
{% else %}
|
||||||
|
{% trans "Log in" as modal_title %}
|
||||||
|
{% trans "Log in" as modal_button %}
|
||||||
|
{% url "login" as modal_action %}
|
||||||
|
{% include "base_modal.html" with modal_id="login" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -243,16 +256,28 @@
|
|||||||
if (!modalBody.html().trim())
|
if (!modalBody.html().trim())
|
||||||
modalBody.load("{% url "participation:calendar" %} #form-content")
|
modalBody.load("{% url "participation:calendar" %} #form-content")
|
||||||
});
|
});
|
||||||
|
{% if user.is_authenticated and user.registration.is_admin %}
|
||||||
|
$('a[data-target="#teamsModal"]').click(function() {
|
||||||
|
let modalBody = $("#teamsModal div.modal-body");
|
||||||
|
if (!modalBody.html().trim())
|
||||||
|
modalBody.load("{% url "participation:team_list" %} #form-content")
|
||||||
|
});
|
||||||
$('button[data-target="#searchModal"]').click(function() {
|
$('button[data-target="#searchModal"]').click(function() {
|
||||||
let modalBody = $("#searchModal div.modal-body");
|
let modalBody = $("#searchModal div.modal-body");
|
||||||
let q = encodeURI($("#search-term").val());
|
let q = encodeURI($("#search-term").val());
|
||||||
modalBody.load("{% url "haystack_search" %}?q=" + q + " #search-results");
|
modalBody.load("{% url "haystack_search" %}?q=" + q + " #search-results");
|
||||||
});
|
});
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not user.is_authenticated %}
|
||||||
$('a[data-target="#loginModal"]').click(function() {
|
$('a[data-target="#loginModal"]').click(function() {
|
||||||
let modalBody = $("#loginModal div.modal-body");
|
let modalBody = $("#loginModal div.modal-body");
|
||||||
if (!modalBody.html().trim())
|
if (!modalBody.html().trim())
|
||||||
modalBody.load("{% url "login" %} #form-content")
|
modalBody.load("{% url "login" %} #form-content")
|
||||||
});
|
});
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if user.is_authenticated and user.registration.participates and not user.registration.team %}
|
||||||
$('a[data-target="#createTeamModal"]').click(function() {
|
$('a[data-target="#createTeamModal"]').click(function() {
|
||||||
let modalBody = $("#createTeamModal div.modal-body");
|
let modalBody = $("#createTeamModal div.modal-body");
|
||||||
if (!modalBody.html().trim())
|
if (!modalBody.html().trim())
|
||||||
@ -263,6 +288,7 @@
|
|||||||
if (!modalBody.html().trim())
|
if (!modalBody.html().trim())
|
||||||
modalBody.load("{% url "participation:join_team" %} #form-content");
|
modalBody.load("{% url "participation:join_team" %} #form-content");
|
||||||
});
|
});
|
||||||
|
{% endif %}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Corres2math\n"
|
"Project-Id-Version: Corres2math\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-11-03 17:32+0100\n"
|
"POT-Creation-Date: 2020-11-16 11:55+0100\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"
|
||||||
@ -99,17 +99,17 @@ msgstr "changelogs"
|
|||||||
msgid "Changelog of type \"{action}\" for model {model} at {timestamp}"
|
msgid "Changelog of type \"{action}\" for model {model} at {timestamp}"
|
||||||
msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}"
|
msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}"
|
||||||
|
|
||||||
#: apps/participation/admin.py:16 apps/participation/models.py:122
|
#: apps/participation/admin.py:16 apps/participation/models.py:121
|
||||||
#: apps/participation/tables.py:35 apps/participation/tables.py:62
|
#: apps/participation/tables.py:35 apps/participation/tables.py:62
|
||||||
msgid "problem number"
|
msgid "problem number"
|
||||||
msgstr "numéro de problème"
|
msgstr "numéro de problème"
|
||||||
|
|
||||||
#: apps/participation/admin.py:21 apps/participation/models.py:128
|
#: apps/participation/admin.py:21 apps/participation/models.py:127
|
||||||
#: apps/participation/models.py:182
|
#: apps/participation/models.py:181
|
||||||
msgid "valid"
|
msgid "valid"
|
||||||
msgstr "valide"
|
msgstr "valide"
|
||||||
|
|
||||||
#: apps/participation/forms.py:20 apps/participation/models.py:33
|
#: apps/participation/forms.py:20 apps/participation/models.py:32
|
||||||
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."
|
||||||
|
|
||||||
@ -155,28 +155,28 @@ msgstr "Cette phase doit commencer après les phases précédentes."
|
|||||||
msgid "This phase must end after the next phases."
|
msgid "This phase must end after the next phases."
|
||||||
msgstr "Cette phase doit finir avant les phases suivantes."
|
msgstr "Cette phase doit finir avant les phases suivantes."
|
||||||
|
|
||||||
#: apps/participation/models.py:26 apps/participation/tables.py:30
|
#: apps/participation/models.py:25 apps/participation/tables.py:30
|
||||||
#: apps/participation/tables.py:52 apps/participation/tables.py:78
|
#: apps/participation/tables.py:52 apps/participation/tables.py:78
|
||||||
msgid "name"
|
msgid "name"
|
||||||
msgstr "nom"
|
msgstr "nom"
|
||||||
|
|
||||||
#: apps/participation/models.py:32 apps/participation/tables.py:57
|
#: apps/participation/models.py:31 apps/participation/tables.py:57
|
||||||
msgid "trigram"
|
msgid "trigram"
|
||||||
msgstr "trigramme"
|
msgstr "trigramme"
|
||||||
|
|
||||||
#: apps/participation/models.py:40
|
#: apps/participation/models.py:39
|
||||||
msgid "access code"
|
msgid "access code"
|
||||||
msgstr "code d'accès"
|
msgstr "code d'accès"
|
||||||
|
|
||||||
#: apps/participation/models.py:41
|
#: apps/participation/models.py:40
|
||||||
msgid "The access code let other people to join the team."
|
msgid "The access code let other people to join the team."
|
||||||
msgstr "Le code d'accès permet aux autres participants de rejoindre l'équipe."
|
msgstr "Le code d'accès permet aux autres participants de rejoindre l'équipe."
|
||||||
|
|
||||||
#: apps/participation/models.py:45
|
#: apps/participation/models.py:44
|
||||||
msgid "Grant Animath to publish my video"
|
msgid "Grant Animath to publish my video"
|
||||||
msgstr "Autoriser Animath à publier ma vidéo"
|
msgstr "Autoriser Animath à publier ma vidéo"
|
||||||
|
|
||||||
#: apps/participation/models.py:46
|
#: apps/participation/models.py:45
|
||||||
msgid ""
|
msgid ""
|
||||||
"Give the authorisation to publish the video on the main website to promote "
|
"Give the authorisation to publish the video on the main website to promote "
|
||||||
"the action."
|
"the action."
|
||||||
@ -184,96 +184,96 @@ msgstr ""
|
|||||||
"Donner l'autorisation de publier la vidéo sur le site principal pour "
|
"Donner l'autorisation de publier la vidéo sur le site principal pour "
|
||||||
"promouvoir les Correspondances."
|
"promouvoir les Correspondances."
|
||||||
|
|
||||||
#: apps/participation/models.py:97
|
#: apps/participation/models.py:96
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Team {name} ({trigram})"
|
msgid "Team {name} ({trigram})"
|
||||||
msgstr "Équipe {name} ({trigram})"
|
msgstr "Équipe {name} ({trigram})"
|
||||||
|
|
||||||
#: apps/participation/models.py:100 apps/participation/models.py:115
|
#: apps/participation/models.py:99 apps/participation/models.py:114
|
||||||
#: apps/registration/models.py:106 apps/registration/models.py:155
|
#: apps/registration/models.py:106 apps/registration/models.py:155
|
||||||
msgid "team"
|
msgid "team"
|
||||||
msgstr "équipe"
|
msgstr "équipe"
|
||||||
|
|
||||||
#: apps/participation/models.py:101
|
#: apps/participation/models.py:100
|
||||||
msgid "teams"
|
msgid "teams"
|
||||||
msgstr "équipes"
|
msgstr "équipes"
|
||||||
|
|
||||||
#: apps/participation/models.py:119
|
#: apps/participation/models.py:118
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Problem #{problem:d}"
|
msgid "Problem #{problem:d}"
|
||||||
msgstr "Problème n°{problem:d}"
|
msgstr "Problème n°{problem:d}"
|
||||||
|
|
||||||
#: apps/participation/models.py:129 apps/participation/models.py:183
|
#: apps/participation/models.py:128 apps/participation/models.py:182
|
||||||
msgid "The video got the validation of the administrators."
|
msgid "The video got the validation of the administrators."
|
||||||
msgstr "La vidéo a été validée par les administrateurs."
|
msgstr "La vidéo a été validée par les administrateurs."
|
||||||
|
|
||||||
#: apps/participation/models.py:138
|
#: apps/participation/models.py:137
|
||||||
msgid "solution video"
|
msgid "solution video"
|
||||||
msgstr "vidéo de solution"
|
msgstr "vidéo de solution"
|
||||||
|
|
||||||
#: apps/participation/models.py:147
|
#: apps/participation/models.py:146
|
||||||
msgid "received participation"
|
msgid "received participation"
|
||||||
msgstr "participation reçue"
|
msgstr "participation reçue"
|
||||||
|
|
||||||
#: apps/participation/models.py:156
|
#: apps/participation/models.py:155
|
||||||
msgid "synthesis video"
|
msgid "synthesis video"
|
||||||
msgstr "vidéo de synthèse"
|
msgstr "vidéo de synthèse"
|
||||||
|
|
||||||
#: apps/participation/models.py:163
|
#: apps/participation/models.py:162
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Participation of the team {name} ({trigram})"
|
msgid "Participation of the team {name} ({trigram})"
|
||||||
msgstr "Participation de l'équipe {name} ({trigram})"
|
msgstr "Participation de l'équipe {name} ({trigram})"
|
||||||
|
|
||||||
#: apps/participation/models.py:166 apps/participation/models.py:240
|
#: apps/participation/models.py:165 apps/participation/models.py:239
|
||||||
msgid "participation"
|
msgid "participation"
|
||||||
msgstr "participation"
|
msgstr "participation"
|
||||||
|
|
||||||
#: apps/participation/models.py:167
|
#: apps/participation/models.py:166
|
||||||
msgid "participations"
|
msgid "participations"
|
||||||
msgstr "participations"
|
msgstr "participations"
|
||||||
|
|
||||||
#: apps/participation/models.py:175
|
#: apps/participation/models.py:174
|
||||||
msgid "link"
|
msgid "link"
|
||||||
msgstr "lien"
|
msgstr "lien"
|
||||||
|
|
||||||
#: apps/participation/models.py:176
|
#: apps/participation/models.py:175
|
||||||
msgid "The full video link."
|
msgid "The full video link."
|
||||||
msgstr "Le lien complet de la vidéo."
|
msgstr "Le lien complet de la vidéo."
|
||||||
|
|
||||||
#: apps/participation/models.py:225
|
#: apps/participation/models.py:224
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "Video of team {name} ({trigram})"
|
msgid "Video of team {name} ({trigram})"
|
||||||
msgstr "Vidéo de l'équipe {name} ({trigram})"
|
msgstr "Vidéo de l'équipe {name} ({trigram})"
|
||||||
|
|
||||||
#: apps/participation/models.py:229
|
#: apps/participation/models.py:228
|
||||||
msgid "video"
|
msgid "video"
|
||||||
msgstr "vidéo"
|
msgstr "vidéo"
|
||||||
|
|
||||||
#: apps/participation/models.py:230
|
#: apps/participation/models.py:229
|
||||||
msgid "videos"
|
msgid "videos"
|
||||||
msgstr "vidéos"
|
msgstr "vidéos"
|
||||||
|
|
||||||
#: apps/participation/models.py:245
|
#: apps/participation/models.py:244
|
||||||
msgid "question"
|
msgid "question"
|
||||||
msgstr "question"
|
msgstr "question"
|
||||||
|
|
||||||
#: apps/participation/models.py:259
|
#: apps/participation/models.py:258
|
||||||
msgid "phase number"
|
msgid "phase number"
|
||||||
msgstr "phase"
|
msgstr "phase"
|
||||||
|
|
||||||
#: apps/participation/models.py:264
|
#: apps/participation/models.py:263
|
||||||
msgid "phase description"
|
msgid "phase description"
|
||||||
msgstr "description"
|
msgstr "description"
|
||||||
|
|
||||||
#: apps/participation/models.py:268
|
#: apps/participation/models.py:267
|
||||||
msgid "start date of the given phase"
|
msgid "start date of the given phase"
|
||||||
msgstr "début de la phase"
|
msgstr "début de la phase"
|
||||||
|
|
||||||
#: apps/participation/models.py:273
|
#: apps/participation/models.py:272
|
||||||
msgid "end date of the given phase"
|
msgid "end date of the given phase"
|
||||||
msgstr "fin de la phase"
|
msgstr "fin de la phase"
|
||||||
|
|
||||||
#: apps/participation/models.py:291
|
#: apps/participation/models.py:290
|
||||||
msgid ""
|
msgid ""
|
||||||
"Phase {phase_number:d} starts on {start:%Y-%m-%d %H:%M} and ends on {end:%Y-"
|
"Phase {phase_number:d} starts on {start:%Y-%m-%d %H:%M} and ends on {end:%Y-"
|
||||||
"%m-%d %H:%M}"
|
"%m-%d %H:%M}"
|
||||||
@ -281,21 +281,21 @@ msgstr ""
|
|||||||
"Phase {phase_number:d} démarrant le {start:%d/%m/%Y %H:%M} et finissant le "
|
"Phase {phase_number:d} démarrant le {start:%d/%m/%Y %H:%M} et finissant le "
|
||||||
"{end:%d/%m/%Y %H:%M}"
|
"{end:%d/%m/%Y %H:%M}"
|
||||||
|
|
||||||
#: apps/participation/models.py:295
|
#: apps/participation/models.py:294
|
||||||
msgid "phase"
|
msgid "phase"
|
||||||
msgstr "phase"
|
msgstr "phase"
|
||||||
|
|
||||||
#: apps/participation/models.py:296
|
#: apps/participation/models.py:295
|
||||||
msgid "phases"
|
msgid "phases"
|
||||||
msgstr "phases"
|
msgstr "phases"
|
||||||
|
|
||||||
#: apps/participation/templates/participation/create_team.html:11
|
#: apps/participation/templates/participation/create_team.html:11
|
||||||
#: corres2math/templates/base.html:231
|
#: corres2math/templates/base.html:237
|
||||||
msgid "Create"
|
msgid "Create"
|
||||||
msgstr "Créer"
|
msgstr "Créer"
|
||||||
|
|
||||||
#: apps/participation/templates/participation/join_team.html:11
|
#: apps/participation/templates/participation/join_team.html:11
|
||||||
#: corres2math/templates/base.html:227
|
#: corres2math/templates/base.html:232
|
||||||
msgid "Join"
|
msgid "Join"
|
||||||
msgstr "Rejoindre"
|
msgstr "Rejoindre"
|
||||||
|
|
||||||
@ -469,7 +469,7 @@ msgstr "Définir l'équipe qui recevra votre vidéo"
|
|||||||
|
|
||||||
#: apps/participation/templates/participation/participation_detail.html:181
|
#: apps/participation/templates/participation/participation_detail.html:181
|
||||||
#: apps/participation/templates/participation/participation_detail.html:233
|
#: apps/participation/templates/participation/participation_detail.html:233
|
||||||
#: apps/participation/views.py:482
|
#: apps/participation/views.py:494
|
||||||
msgid "Upload video"
|
msgid "Upload video"
|
||||||
msgstr "Envoyer la vidéo"
|
msgstr "Envoyer la vidéo"
|
||||||
|
|
||||||
@ -504,7 +504,7 @@ msgid "Update question"
|
|||||||
msgstr "Modifier la question"
|
msgstr "Modifier la question"
|
||||||
|
|
||||||
#: apps/participation/templates/participation/participation_detail.html:217
|
#: apps/participation/templates/participation/participation_detail.html:217
|
||||||
#: apps/participation/views.py:459
|
#: apps/participation/views.py:470
|
||||||
msgid "Delete question"
|
msgid "Delete question"
|
||||||
msgstr "Supprimer la question"
|
msgstr "Supprimer la question"
|
||||||
|
|
||||||
@ -514,8 +514,8 @@ msgid "Display synthesis"
|
|||||||
msgstr "Afficher la synthèse"
|
msgstr "Afficher la synthèse"
|
||||||
|
|
||||||
#: apps/participation/templates/participation/phase_list.html:10
|
#: apps/participation/templates/participation/phase_list.html:10
|
||||||
#: apps/participation/views.py:501 corres2math/templates/base.html:68
|
#: apps/participation/views.py:513 corres2math/templates/base.html:68
|
||||||
#: corres2math/templates/base.html:70 corres2math/templates/base.html:217
|
#: corres2math/templates/base.html:70 corres2math/templates/base.html:221
|
||||||
msgid "Calendar"
|
msgid "Calendar"
|
||||||
msgstr "Calendrier"
|
msgstr "Calendrier"
|
||||||
|
|
||||||
@ -627,7 +627,7 @@ msgid "Update team"
|
|||||||
msgstr "Modifier l'équipe"
|
msgstr "Modifier l'équipe"
|
||||||
|
|
||||||
#: apps/participation/templates/participation/team_detail.html:127
|
#: apps/participation/templates/participation/team_detail.html:127
|
||||||
#: apps/participation/views.py:314
|
#: apps/participation/views.py:323
|
||||||
msgid "Leave team"
|
msgid "Leave team"
|
||||||
msgstr "Quitter l'équipe"
|
msgstr "Quitter l'équipe"
|
||||||
|
|
||||||
@ -635,8 +635,13 @@ msgstr "Quitter l'équipe"
|
|||||||
msgid "Are you sure that you want to leave this team?"
|
msgid "Are you sure that you want to leave this team?"
|
||||||
msgstr "Êtes-vous sûr·e de vouloir quitter cette équipe ?"
|
msgstr "Êtes-vous sûr·e de vouloir quitter cette équipe ?"
|
||||||
|
|
||||||
#: apps/participation/views.py:36 corres2math/templates/base.html:77
|
#: apps/participation/templates/participation/team_list.html:6
|
||||||
#: corres2math/templates/base.html:230
|
#: corres2math/templates/base.html:225
|
||||||
|
msgid "All teams"
|
||||||
|
msgstr "Toutes les équipes"
|
||||||
|
|
||||||
|
#: apps/participation/views.py:36 corres2math/templates/base.html:81
|
||||||
|
#: corres2math/templates/base.html:236
|
||||||
msgid "Create team"
|
msgid "Create team"
|
||||||
msgstr "Créer une équipe"
|
msgstr "Créer une équipe"
|
||||||
|
|
||||||
@ -648,36 +653,36 @@ msgstr "Vous ne participez pas, vous ne pouvez pas créer d'équipe."
|
|||||||
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."
|
||||||
|
|
||||||
#: apps/participation/views.py:82 corres2math/templates/base.html:82
|
#: apps/participation/views.py:82 corres2math/templates/base.html:86
|
||||||
#: corres2math/templates/base.html:226
|
#: corres2math/templates/base.html:231
|
||||||
msgid "Join team"
|
msgid "Join team"
|
||||||
msgstr "Rejoindre une équipe"
|
msgstr "Rejoindre une équipe"
|
||||||
|
|
||||||
#: apps/participation/views.py:133 apps/participation/views.py:320
|
#: apps/participation/views.py:142 apps/participation/views.py:329
|
||||||
#: apps/participation/views.py:353
|
#: apps/participation/views.py:362
|
||||||
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:134 apps/participation/views.py:354
|
#: apps/participation/views.py:143 apps/participation/views.py:363
|
||||||
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:156
|
#: apps/participation/views.py:165
|
||||||
#, 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:188
|
#: apps/participation/views.py:197
|
||||||
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:191
|
#: apps/participation/views.py:200
|
||||||
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:194
|
#: apps/participation/views.py:203
|
||||||
msgid ""
|
msgid ""
|
||||||
"The team can't be validated: missing email address confirmations, photo "
|
"The team can't be validated: missing email address confirmations, photo "
|
||||||
"authorizations, people or the chosen problem is not set."
|
"authorizations, people or the chosen problem is not set."
|
||||||
@ -686,51 +691,51 @@ msgstr ""
|
|||||||
"d'adresse e-mail, soit une autorisation parentale, soit des personnes soit "
|
"d'adresse e-mail, soit une autorisation parentale, soit des personnes soit "
|
||||||
"le problème n'a pas été choisi."
|
"le problème n'a pas été choisi."
|
||||||
|
|
||||||
#: apps/participation/views.py:213
|
#: apps/participation/views.py:222
|
||||||
msgid "You are not an administrator."
|
msgid "You are not an administrator."
|
||||||
msgstr "Vous n'êtes pas administrateur."
|
msgstr "Vous n'êtes pas administrateur."
|
||||||
|
|
||||||
#: apps/participation/views.py:216
|
#: apps/participation/views.py:225
|
||||||
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:235
|
#: apps/participation/views.py:244
|
||||||
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:263
|
#: apps/participation/views.py:272
|
||||||
#, 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:300 apps/registration/views.py:243
|
#: apps/participation/views.py:309 apps/registration/views.py:243
|
||||||
#, 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/participation/views.py:304
|
#: apps/participation/views.py:313
|
||||||
#, 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:322
|
#: apps/participation/views.py:331
|
||||||
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:366
|
#: apps/participation/views.py:375
|
||||||
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:376
|
#: apps/participation/views.py:385
|
||||||
#, 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:413
|
#: apps/participation/views.py:422
|
||||||
msgid "Create question"
|
msgid "Create question"
|
||||||
msgstr "Créer une question"
|
msgstr "Créer une question"
|
||||||
|
|
||||||
#: apps/participation/views.py:510
|
#: apps/participation/views.py:522
|
||||||
msgid "Calendar update"
|
msgid "Calendar update"
|
||||||
msgstr "Mise à jour du calendrier"
|
msgstr "Mise à jour du calendrier"
|
||||||
|
|
||||||
@ -923,8 +928,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."
|
msgstr "Votre mot de passe a été changé. Vous pouvez désormais vous connecter."
|
||||||
|
|
||||||
#: apps/registration/templates/registration/password_reset_complete.html:10
|
#: apps/registration/templates/registration/password_reset_complete.html:10
|
||||||
#: corres2math/templates/base.html:130 corres2math/templates/base.html:221
|
#: corres2math/templates/base.html:134 corres2math/templates/base.html:241
|
||||||
#: corres2math/templates/base.html:222
|
#: corres2math/templates/base.html:242
|
||||||
#: corres2math/templates/registration/login.html:7
|
#: corres2math/templates/registration/login.html:7
|
||||||
#: corres2math/templates/registration/login.html:8
|
#: corres2math/templates/registration/login.html:8
|
||||||
#: corres2math/templates/registration/login.html:25
|
#: corres2math/templates/registration/login.html:25
|
||||||
@ -981,7 +986,7 @@ msgstr "Réinitialiser mon mot de passe"
|
|||||||
#: apps/registration/templates/registration/signup.html:5
|
#: apps/registration/templates/registration/signup.html:5
|
||||||
#: apps/registration/templates/registration/signup.html:8
|
#: apps/registration/templates/registration/signup.html:8
|
||||||
#: apps/registration/templates/registration/signup.html:20
|
#: apps/registration/templates/registration/signup.html:20
|
||||||
#: apps/registration/views.py:28
|
#: apps/registration/views.py:29
|
||||||
msgid "Sign up"
|
msgid "Sign up"
|
||||||
msgstr "Inscription"
|
msgstr "Inscription"
|
||||||
|
|
||||||
@ -1058,45 +1063,49 @@ msgid "Update user"
|
|||||||
msgstr "Modifier l'utilisateur"
|
msgstr "Modifier l'utilisateur"
|
||||||
|
|
||||||
#: apps/registration/templates/registration/user_detail.html:77
|
#: apps/registration/templates/registration/user_detail.html:77
|
||||||
#: apps/registration/views.py:206
|
#: apps/registration/views.py:216
|
||||||
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/views.py:64
|
#: apps/registration/views.py:37
|
||||||
|
msgid "You can't register now."
|
||||||
|
msgstr "Vous ne pouvez pas vous inscrire maintenant."
|
||||||
|
|
||||||
|
#: apps/registration/views.py:74
|
||||||
msgid "Email validation"
|
msgid "Email validation"
|
||||||
msgstr "Validation de l'adresse mail"
|
msgstr "Validation de l'adresse mail"
|
||||||
|
|
||||||
#: apps/registration/views.py:66
|
#: apps/registration/views.py:76
|
||||||
msgid "Validate email"
|
msgid "Validate email"
|
||||||
msgstr "Valider l'adresse mail"
|
msgstr "Valider l'adresse mail"
|
||||||
|
|
||||||
#: apps/registration/views.py:105
|
#: apps/registration/views.py:115
|
||||||
msgid "Email validation unsuccessful"
|
msgid "Email validation unsuccessful"
|
||||||
msgstr "Échec de la validation de l'adresse mail"
|
msgstr "Échec de la validation de l'adresse mail"
|
||||||
|
|
||||||
#: apps/registration/views.py:116
|
#: apps/registration/views.py:126
|
||||||
msgid "Email validation email sent"
|
msgid "Email validation email sent"
|
||||||
msgstr "Mail de confirmation de l'adresse mail envoyé"
|
msgstr "Mail de confirmation de l'adresse mail envoyé"
|
||||||
|
|
||||||
#: apps/registration/views.py:124
|
#: apps/registration/views.py:134
|
||||||
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:158
|
#: apps/registration/views.py:168
|
||||||
#, 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:179
|
#: apps/registration/views.py:189
|
||||||
#, 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}"
|
||||||
|
|
||||||
#: corres2math/settings.py:154
|
#: corres2math/settings.py:157
|
||||||
msgid "English"
|
msgid "English"
|
||||||
msgstr "Anglais"
|
msgstr "Anglais"
|
||||||
|
|
||||||
#: corres2math/settings.py:155
|
#: corres2math/settings.py:158
|
||||||
msgid "French"
|
msgid "French"
|
||||||
msgstr "Français"
|
msgstr "Français"
|
||||||
|
|
||||||
@ -1157,43 +1166,47 @@ msgstr ""
|
|||||||
msgid "Home"
|
msgid "Home"
|
||||||
msgstr "Accueil"
|
msgstr "Accueil"
|
||||||
|
|
||||||
#: corres2math/templates/base.html:88
|
#: corres2math/templates/base.html:75
|
||||||
|
msgid "Teams"
|
||||||
|
msgstr "Équipes"
|
||||||
|
|
||||||
|
#: corres2math/templates/base.html:92
|
||||||
msgid "My team"
|
msgid "My team"
|
||||||
msgstr "Mon équipe"
|
msgstr "Mon équipe"
|
||||||
|
|
||||||
#: corres2math/templates/base.html:93
|
#: corres2math/templates/base.html:97
|
||||||
msgid "My participation"
|
msgid "My participation"
|
||||||
msgstr "Ma participation"
|
msgstr "Ma participation"
|
||||||
|
|
||||||
#: corres2math/templates/base.html:100
|
#: corres2math/templates/base.html:104
|
||||||
msgid "Chat"
|
msgid "Chat"
|
||||||
msgstr "Chat"
|
msgstr "Chat"
|
||||||
|
|
||||||
#: corres2math/templates/base.html:104
|
#: corres2math/templates/base.html:108
|
||||||
msgid "Administration"
|
msgid "Administration"
|
||||||
msgstr "Administration"
|
msgstr "Administration"
|
||||||
|
|
||||||
#: corres2math/templates/base.html:112
|
#: corres2math/templates/base.html:116
|
||||||
msgid "Search..."
|
msgid "Search..."
|
||||||
msgstr "Chercher ..."
|
msgstr "Chercher ..."
|
||||||
|
|
||||||
#: corres2math/templates/base.html:121
|
#: corres2math/templates/base.html:125
|
||||||
msgid "Return to admin view"
|
msgid "Return to admin view"
|
||||||
msgstr "Retourner à l'interface administrateur"
|
msgstr "Retourner à l'interface administrateur"
|
||||||
|
|
||||||
#: corres2math/templates/base.html:126
|
#: corres2math/templates/base.html:130
|
||||||
msgid "Register"
|
msgid "Register"
|
||||||
msgstr "S'inscrire"
|
msgstr "S'inscrire"
|
||||||
|
|
||||||
#: corres2math/templates/base.html:142
|
#: corres2math/templates/base.html:146
|
||||||
msgid "My account"
|
msgid "My account"
|
||||||
msgstr "Mon compte"
|
msgstr "Mon compte"
|
||||||
|
|
||||||
#: corres2math/templates/base.html:145
|
#: corres2math/templates/base.html:149
|
||||||
msgid "Log out"
|
msgid "Log out"
|
||||||
msgstr "Déconnexion"
|
msgstr "Déconnexion"
|
||||||
|
|
||||||
#: corres2math/templates/base.html:162
|
#: corres2math/templates/base.html:166
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Your email address is not validated. Please click on the link you received "
|
"Your email address is not validated. Please click on the link you received "
|
||||||
@ -1204,11 +1217,11 @@ msgstr ""
|
|||||||
"avez reçu par mail. Vous pouvez renvoyer un mail en cliquant sur <a href="
|
"avez reçu par mail. Vous pouvez renvoyer un mail en cliquant sur <a href="
|
||||||
"\"%(send_email_url)s\">ce lien</a>."
|
"\"%(send_email_url)s\">ce lien</a>."
|
||||||
|
|
||||||
#: corres2math/templates/base.html:186
|
#: corres2math/templates/base.html:190
|
||||||
msgid "Contact us"
|
msgid "Contact us"
|
||||||
msgstr "Nous contacter"
|
msgstr "Nous contacter"
|
||||||
|
|
||||||
#: corres2math/templates/base.html:219
|
#: corres2math/templates/base.html:228
|
||||||
msgid "Search results"
|
msgid "Search results"
|
||||||
msgstr "Résultats de la recherche"
|
msgstr "Résultats de la recherche"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user