From 369c9e2fa27ca81ba411767285fa34e2049447bb Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 22 Sep 2020 21:20:20 +0200 Subject: [PATCH] Add some popups --- apps/eastereggs/__init__.py | 1 + apps/eastereggs/apps.py | 5 ++ apps/eastereggs/migrations/__init__.py | 0 apps/eastereggs/templates/eastereggs/xp.html | 19 +++++ .../templates/eastereggs/xp_modal.html | 20 +++++ apps/eastereggs/urls.py | 8 ++ corres2math/settings.py | 1 + corres2math/urls.py | 2 + locale/fr/LC_MESSAGES/django.po | 81 +++++++++++-------- templates/base.html | 8 +- 10 files changed, 107 insertions(+), 38 deletions(-) create mode 100644 apps/eastereggs/__init__.py create mode 100644 apps/eastereggs/apps.py create mode 100644 apps/eastereggs/migrations/__init__.py create mode 100644 apps/eastereggs/templates/eastereggs/xp.html create mode 100644 apps/eastereggs/templates/eastereggs/xp_modal.html create mode 100644 apps/eastereggs/urls.py diff --git a/apps/eastereggs/__init__.py b/apps/eastereggs/__init__.py new file mode 100644 index 0000000..f5d007b --- /dev/null +++ b/apps/eastereggs/__init__.py @@ -0,0 +1 @@ +default_app_config = 'eastereggs.apps.EastereggsConfig' diff --git a/apps/eastereggs/apps.py b/apps/eastereggs/apps.py new file mode 100644 index 0000000..93a00a2 --- /dev/null +++ b/apps/eastereggs/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class EastereggsConfig(AppConfig): + name = 'eastereggs' diff --git a/apps/eastereggs/migrations/__init__.py b/apps/eastereggs/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/eastereggs/templates/eastereggs/xp.html b/apps/eastereggs/templates/eastereggs/xp.html new file mode 100644 index 0000000..00f67b5 --- /dev/null +++ b/apps/eastereggs/templates/eastereggs/xp.html @@ -0,0 +1,19 @@ +{% extends "index.html" %} + +{% block content %} +
+{% include "eastereggs/xp_modal.html" %} +{% endblock %} + +{% block extrajavascript %} + +{% endblock %} diff --git a/apps/eastereggs/templates/eastereggs/xp_modal.html b/apps/eastereggs/templates/eastereggs/xp_modal.html new file mode 100644 index 0000000..c456517 --- /dev/null +++ b/apps/eastereggs/templates/eastereggs/xp_modal.html @@ -0,0 +1,20 @@ +{% load crispy_forms_filters i18n %} + + \ No newline at end of file diff --git a/apps/eastereggs/urls.py b/apps/eastereggs/urls.py new file mode 100644 index 0000000..64200f1 --- /dev/null +++ b/apps/eastereggs/urls.py @@ -0,0 +1,8 @@ +from django.urls import path +from django.views.generic import TemplateView + +app_name = "eastereggs" + +urlpatterns = [ + path("xp/", TemplateView.as_view(template_name="eastereggs/xp.html")), +] diff --git a/corres2math/settings.py b/corres2math/settings.py index 26d4e0d..0adc198 100644 --- a/corres2math/settings.py +++ b/corres2math/settings.py @@ -60,6 +60,7 @@ INSTALLED_APPS = [ 'rest_framework', 'rest_framework.authtoken', + 'eastereggs', 'registration', 'participation', ] diff --git a/corres2math/urls.py b/corres2math/urls.py index fc82571..b7b6e3a 100644 --- a/corres2math/urls.py +++ b/corres2math/urls.py @@ -29,6 +29,8 @@ urlpatterns = [ path('api/', include('api.urls')), path('participation/', include('participation.urls')), path('registration/', include('registration.urls')), + + path('', include('eastereggs.urls')), ] handler400 = bad_request diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 2c54ea4..648fa97 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Corres2math\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-09-22 20:31+0200\n" +"POT-Creation-Date: 2020-09-22 21:19+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Yohann D'ANELLO \n" "Language-Team: LANGUAGE \n" @@ -21,6 +21,21 @@ msgstr "" msgid "API" msgstr "API" +#: apps/eastereggs/templates/eastereggs/xp_modal.html:7 +msgid "Error" +msgstr "Erreur" + +#: apps/eastereggs/templates/eastereggs/xp_modal.html:13 +msgid "This task failed successfully." +msgstr "Cette tâche a échoué avec succès." + +#: apps/eastereggs/templates/eastereggs/xp_modal.html:16 +#: apps/participation/templates/participation/create_team_modal.html:16 +#: apps/participation/templates/participation/join_team_modal.html:16 +#: apps/registration/templates/registration/login_modal.html:16 +msgid "Close" +msgstr "Fermer" + #: apps/logs/apps.py:11 msgid "Logs" msgstr "Logs" @@ -195,30 +210,26 @@ msgstr "vidéo" msgid "videos" msgstr "vidéos" -#: apps/participation/templates/participation/create_team.html:10 +#: apps/participation/templates/participation/create_team.html:11 #: apps/participation/templates/participation/create_team_modal.html:15 msgid "Create" msgstr "Créer" #: apps/participation/templates/participation/create_team_modal.html:8 -#: templates/base.html:75 +#: apps/participation/views.py:12 templates/base.html:75 msgid "Create team" msgstr "Créer une équipe" -#: apps/participation/templates/participation/create_team_modal.html:16 -#: apps/participation/templates/participation/join_team_modal.html:16 -msgid "Close" -msgstr "Fermer" - -#: apps/participation/templates/participation/join_team_modal.html:8 -#: templates/base.html:80 -msgid "Join team" -msgstr "Rejoindre une équipe" - +#: apps/participation/templates/participation/join_team.html:11 #: apps/participation/templates/participation/join_team_modal.html:15 msgid "Join" msgstr "Rejoindre" +#: apps/participation/templates/participation/join_team_modal.html:8 +#: apps/participation/views.py:19 templates/base.html:80 +msgid "Join team" +msgstr "Rejoindre une équipe" + #: apps/registration/forms.py:11 msgid "role" msgstr "rôle" @@ -353,27 +364,14 @@ msgstr "Merci d'avoir utilisé la plateforme des Correspondances." msgid "Log in again" msgstr "Se reconnecter" -#: apps/registration/templates/registration/login.html:7 -#: apps/registration/templates/registration/login.html:8 -#: apps/registration/templates/registration/login.html:22 +#: apps/registration/templates/registration/login_modal.html:8 +#: apps/registration/templates/registration/login_modal.html:15 #: apps/registration/templates/registration/password_reset_complete.html:10 -#: templates/base.html:105 +#: templates/base.html:106 templates/registration/login.html:7 +#: templates/registration/login.html:8 templates/registration/login.html:25 msgid "Log in" msgstr "Connexion" -#: apps/registration/templates/registration/login.html:13 -#, python-format -msgid "" -"You are authenticated as %(user)s, but are not authorized to access this " -"page. Would you like to login to a different account?" -msgstr "" -"Vous êtes connectés en tant que %(user)s, mais n'êtes pas autorisés à " -"accéder à cette page. Voulez-vous vous reconnecter avec un autre compte ?" - -#: apps/registration/templates/registration/login.html:23 -msgid "Forgotten your password or username?" -msgstr "Mot de passe oublié ?" - #: apps/registration/templates/registration/mails/email_validation_email.html:12 #: apps/registration/templates/registration/mails/email_validation_email.txt:3 msgid "Hi" @@ -502,11 +500,11 @@ msgstr "Mail de confirmation de l'adresse mail envoyé" msgid "Resend email validation link" msgstr "Renvoyé le lien de validation de l'adresse mail" -#: corres2math/settings.py:148 +#: corres2math/settings.py:149 msgid "English" msgstr "Anglais" -#: corres2math/settings.py:149 +#: corres2math/settings.py:150 msgid "French" msgstr "Français" @@ -583,14 +581,27 @@ msgstr "Retourner à l'interface administrateur" msgid "Register" msgstr "S'inscrire" -#: templates/base.html:109 +#: templates/base.html:111 msgid "Log out" msgstr "Déconnexion" -#: templates/base.html:133 +#: templates/base.html:137 msgid "Contact us" msgstr "Nous contacter" -#: templates/base.html:156 +#: templates/base.html:160 msgid "Back to top" msgstr "Retour en haut" + +#: templates/registration/login.html:13 +#, python-format +msgid "" +"You are authenticated as %(user)s, but are not authorized to access this " +"page. Would you like to login to a different account?" +msgstr "" +"Vous êtes connectés en tant que %(user)s, mais n'êtes pas autorisés à " +"accéder à cette page. Voulez-vous vous reconnecter avec un autre compte ?" + +#: templates/registration/login.html:23 +msgid "Forgotten your password or username?" +msgstr "Mot de passe oublié ?" diff --git a/templates/base.html b/templates/base.html index b08b694..7488b7f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -117,9 +117,11 @@
{% block contenttitle %}

{{ title }}

{% endblock %}
- {% block content %} -

Default content...

- {% endblock content %} +
+ {% block content %} +

Default content...

+ {% endblock content %} +