1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-05 01:26:54 +00:00

More shortcuts

This commit is contained in:
Yohann D'ANELLO 2020-09-27 18:09:39 +02:00
parent 3b73edd6b0
commit 84a7ec6fb5
4 changed files with 61 additions and 34 deletions

View File

@ -10,6 +10,9 @@
</div>
<div class="card-body">
<dl class="row">
<dt class="col-sm-2">{% trans "Team:" %}</dt>
<dd class="col-sm-10"><a href="{% url "participation:team_detail" pk=participation.team.pk %}">{{ participation.team }}</a></dd>
<dt class="col-sm-2">{% trans "Chosen problem:" %}</dt>
<dd class="col-sm-10">{{ participation.get_problem_display }}</dd>
</dl>

View File

@ -3,7 +3,6 @@
{% load i18n %}
{% block content %}
{% trans "any" as any %}
<div class="card bg-light shadow">
<div class="card-header text-center">
@ -21,12 +20,25 @@
<dd class="col-sm-6">{{ team.access_code }}</dd>
<dt class="col-sm-6 text-right">{% trans "Coachs:" %}</dt>
<dd class="col-sm-6">{{ team.coachs.all|join:", "|default:any }}</dd>
<dd class="col-sm-6">
{% for coach in team.coachs.all %}
<a href="{% url "registration:user_detail" pk=coach.user.pk %}">{{ coach }}</a>{% if not forloop.last %},{% endif %}
{% empty %}
{% trans "any" %}
{% endfor %}
</dd>
<dt class="col-sm-6 text-right">{% trans "Participants:" %}</dt>
<dd class="col-sm-6">{{ team.students.all|join:", "|default:any }}</dd>
<dd class="col-sm-6">
{% for student in team.students.all %}
<a href="{% url "registration:user_detail" pk=student.user.pk %}">{{ student }}</a>{% if not forloop.last %},{% endif %}
{% empty %}
{% trans "any" %}
{% endfor %}
</dd>
<dt class="col-sm-6 text-right">{% trans "Chosen problem:" %}</dt>
{% trans "any" as any %}
<dd class="col-sm-6">{{ team.participation.get_problem_display|default:any }}</dd>
<dt class="col-sm-6 text-right">{% trans "Grant Animath to publish our video:" %}</dt>
@ -49,6 +61,14 @@
</div>
</div>
<hr>
<div class="text-center">
<a class="btn btn-info" href="{% url "participation:participation_detail" pk=team.participation.pk %}">
<i class="fas fa-video"></i> {% trans "Access to team participation" %} <i class="fas fa-video"></i>
</a>
</div>
{% trans "Update team" as modal_title %}
{% trans "Update" as modal_button %}
{% url "participation:update_team" pk=team.pk as modal_action %}

View File

@ -170,6 +170,8 @@ class TestRegistration(TestCase):
args=(self.student.registration.photo_authorization.name.split('/')[-1],)))
self.assertEqual(response.status_code, 200)
self.student.registration.photo_authorization.delete()
def test_string_render(self):
# TODO These string field tests will be removed when used in a template
str(self.user.registration)

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Corres2math\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-27 16:10+0200\n"
"POT-Creation-Date: 2020-09-27 18:00+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -234,31 +234,36 @@ msgid "Participation of team"
msgstr "Participation de l'équipe"
#: apps/participation/templates/participation/participation_detail.html:13
#: apps/registration/templates/registration/user_detail.html:25
msgid "Team:"
msgstr "Équipe :"
#: apps/participation/templates/participation/participation_detail.html:16
#: apps/participation/templates/participation/team_detail.html:29
msgid "Chosen problem:"
msgstr "Problème choisi :"
#: apps/participation/templates/participation/participation_detail.html:19
#: apps/participation/templates/participation/participation_detail.html:22
msgid "No video sent"
msgstr "Pas de vidéo envoyée"
#: apps/participation/templates/participation/participation_detail.html:20
#: apps/participation/templates/participation/participation_detail.html:23
msgid "Video link:"
msgstr "Lien de la vidéo :"
#: apps/participation/templates/participation/participation_detail.html:23
#: apps/participation/templates/participation/participation_detail.html:38
#: apps/participation/templates/participation/participation_detail.html:26
#: apps/participation/templates/participation/participation_detail.html:41
#: apps/participation/templates/participation/upload_video.html:11
#: apps/registration/templates/registration/upload_photo_authorization.html:18
#: apps/registration/templates/registration/user_detail.html:72
#: apps/registration/templates/registration/user_detail.html:75
msgid "Upload"
msgstr "Téléverser"
#: apps/participation/templates/participation/participation_detail.html:30
#: apps/participation/templates/participation/participation_detail.html:33
msgid "This video platform is not supported yet."
msgstr "La plateforme de cette vidéo n'est pas encore supportée."
#: apps/participation/templates/participation/participation_detail.html:37
#: apps/participation/templates/participation/participation_detail.html:40
msgid "Upload video"
msgstr "Envoyer la vidéo"
@ -295,15 +300,19 @@ msgid "Not uploaded yet"
msgstr "Pas encore envoyée"
#: apps/participation/templates/participation/team_detail.html:48
#: apps/participation/templates/participation/team_detail.html:53
#: apps/participation/templates/participation/team_detail.html:61
#: apps/participation/templates/participation/update_team.html:12
#: apps/registration/templates/registration/update_user.html:12
#: apps/registration/templates/registration/user_detail.html:61
#: apps/registration/templates/registration/user_detail.html:67
#: apps/registration/templates/registration/user_detail.html:64
#: apps/registration/templates/registration/user_detail.html:70
msgid "Update"
msgstr "Modifier"
#: apps/participation/templates/participation/team_detail.html:52
#: apps/participation/templates/participation/team_detail.html:56
msgid "Access to team participation"
msgstr "Accéder à la participation de l'équipe"
#: apps/participation/templates/participation/team_detail.html:60
msgid "Update team"
msgstr "Modifier l'équipe"
@ -312,24 +321,24 @@ msgstr "Modifier l'équipe"
msgid "Create team"
msgstr "Créer une équipe"
#: apps/participation/views.py:23 apps/participation/views.py:49
#: apps/participation/views.py:22 apps/participation/views.py:50
msgid "You don't participate, so you can't create a team."
msgstr "Vous ne participez pas, vous ne pouvez pas créer d'équipe."
#: apps/participation/views.py:26 apps/participation/views.py:52
#: apps/participation/views.py:24 apps/participation/views.py:52
msgid "You are already in a team."
msgstr "Vous êtes déjà dans une équipe."
#: apps/participation/views.py:41 templates/base.html:75
#: apps/participation/views.py:43 templates/base.html:75
#: templates/base.html:202
msgid "Join team"
msgstr "Rejoindre une équipe"
#: apps/participation/views.py:72 apps/participation/views.py:111
#: apps/participation/views.py:76 apps/participation/views.py:127
msgid "You are not in a team."
msgstr "Vous n'êtes pas dans une équipe."
#: apps/participation/views.py:73 apps/participation/views.py:112
#: apps/participation/views.py:77 apps/participation/views.py:128
msgid "You don't participate, so you don't have any team."
msgstr "Vous ne participez pas, vous n'avez donc pas d'équipe."
@ -621,10 +630,6 @@ msgstr "Non confirmée"
msgid "resend the validation link"
msgstr "Renvoyer le lien de validation"
#: apps/registration/templates/registration/user_detail.html:25
msgid "Team:"
msgstr "Équipe :"
#: apps/registration/templates/registration/user_detail.html:35
msgid "Student class:"
msgstr "Classe :"
@ -641,27 +646,27 @@ msgstr "Autorisation de droit à l'image"
msgid "Download"
msgstr "Télécharger"
#: apps/registration/templates/registration/user_detail.html:45
#: apps/registration/templates/registration/user_detail.html:47
msgid "Replace"
msgstr "Remplacer"
#: apps/registration/templates/registration/user_detail.html:48
#: apps/registration/templates/registration/user_detail.html:51
msgid "Profesional activity:"
msgstr "Activité professionnelle :"
#: apps/registration/templates/registration/user_detail.html:51
#: apps/registration/templates/registration/user_detail.html:54
msgid "Role:"
msgstr "Rôle :"
#: apps/registration/templates/registration/user_detail.html:55
#: apps/registration/templates/registration/user_detail.html:58
msgid "Grant Animath to contact me in the future about other actions:"
msgstr "Autorise Animath à recontacter à propos d'autres actions :"
#: apps/registration/templates/registration/user_detail.html:66
#: apps/registration/templates/registration/user_detail.html:69
msgid "Update user"
msgstr "Modifier l'utilisateur"
#: apps/registration/templates/registration/user_detail.html:71
#: apps/registration/templates/registration/user_detail.html:74
msgid "Upload photo authorization"
msgstr "Téléverser l'autorisation de droit à l'image"
@ -685,7 +690,7 @@ msgstr "Mail de confirmation de l'adresse mail envoyé"
msgid "Resend email validation link"
msgstr "Renvoyé le lien de validation de l'adresse mail"
#: apps/registration/views.py:198
#: apps/registration/views.py:213
#, python-brace-format
msgid "Photo authorization of {student}.{ext}"
msgstr "Autorisation de droit à l'image de {student}.{ext}"
@ -814,6 +819,3 @@ msgstr ""
#: templates/registration/login.html:23
msgid "Forgotten your password or username?"
msgstr "Mot de passe oublié ?"
#~ msgid "Back to top"
#~ msgstr "Retour en haut"