From 812e2ef0f4887fcba30b57e7adbc12022618be72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Bouttier?= Date: Mon, 9 Oct 2017 20:31:45 +0200 Subject: [PATCH] split staff area in half (orga + admin) --- cfp/templates/cfp/admin/base.html | 20 ++++ .../cfp/{staff => admin}/conference.html | 2 +- cfp/templates/cfp/staff/base.html | 29 +++--- cfp/urls.py | 3 +- cfp/views.py | 7 +- locale/fr/LC_MESSAGES/django.mo | Bin 16056 -> 16144 bytes locale/fr/LC_MESSAGES/django.po | 97 +++++++++--------- ponyconf/templates/base.html | 3 +- ponyconf/urls.py | 2 +- 9 files changed, 95 insertions(+), 68 deletions(-) create mode 100644 cfp/templates/cfp/admin/base.html rename cfp/templates/cfp/{staff => admin}/conference.html (93%) diff --git a/cfp/templates/cfp/admin/base.html b/cfp/templates/cfp/admin/base.html new file mode 100644 index 0000000..c6f4449 --- /dev/null +++ b/cfp/templates/cfp/admin/base.html @@ -0,0 +1,20 @@ +{% extends 'base.html' %} +{% load staticfiles i18n %} + +{% block admintab %} class="active"{% endblock %} + +{% block navbar %} + {{ block.super }} +
+ +
+{% endblock %} + +{% block content %} +{% trans "Please select a category." %} +{% endblock %} diff --git a/cfp/templates/cfp/staff/conference.html b/cfp/templates/cfp/admin/conference.html similarity index 93% rename from cfp/templates/cfp/staff/conference.html rename to cfp/templates/cfp/admin/conference.html index 852c44c..d983a60 100644 --- a/cfp/templates/cfp/staff/conference.html +++ b/cfp/templates/cfp/admin/conference.html @@ -1,4 +1,4 @@ -{% extends 'cfp/staff/base.html' %} +{% extends 'cfp/admin/base.html' %} {% load i18n crispy_forms_tags %} {% block conferencetab %} class="active"{% endblock %} diff --git a/cfp/templates/cfp/staff/base.html b/cfp/templates/cfp/staff/base.html index ad76467..d04c05d 100644 --- a/cfp/templates/cfp/staff/base.html +++ b/cfp/templates/cfp/staff/base.html @@ -5,23 +5,18 @@ {% block navbar %} {{ block.super }} - +
+ +
{% endblock %} {% block content %} diff --git a/cfp/urls.py b/cfp/urls.py index bfe7e8b..71c354f 100644 --- a/cfp/urls.py +++ b/cfp/urls.py @@ -15,7 +15,6 @@ urlpatterns = [ url(r'^volunteer/(?P[\w\-]+)/join/(?P[\w\-]+)/$', views.volunteer_activity, {'join': True}, name='volunteer-join'), url(r'^volunteer/(?P[\w\-]+)/quit/(?P[\w\-]+)/$', views.volunteer_activity, {'join': False}, name='volunteer-quit'), url(r'^staff/$', views.staff, name='staff'), - url(r'^staff/conference/$', views.conference, name='conference'), url(r'^staff/talks/$', views.talk_list, name='talk-list'), url(r'^staff/talks/(?P[\w\-]+)/$', views.talk_details, name='talk-details'), url(r'^staff/talks/(?P[\w\-]+)/vote/(?P[-+0-2]+)/$', views.talk_vote, name='talk-vote'), @@ -37,6 +36,8 @@ urlpatterns = [ url(r'^staff/add-user/$', views.create_user, name='create-user'), url(r'^staff/schedule/((?P[\w]+)/)?$', views.staff_schedule, name='staff-schedule'), url(r'^staff/select2/$', views.Select2View.as_view(), name='django_select2-json'), + url(r'^admin/$', views.admin, name='admin'), + url(r'^admin/conference/$', views.conference, name='conference'), url(r'^schedule/((?P[\w]+)/)?$', views.public_schedule, name='public-schedule'), #url(r'^markdown/$', views.markdown_preview, name='markdown'), ] diff --git a/cfp/views.py b/cfp/views.py index 4ff68fb..4bb0817 100644 --- a/cfp/views.py +++ b/cfp/views.py @@ -223,6 +223,11 @@ def staff(request): return render(request, 'cfp/staff/base.html') +@staff_required +def admin(request): + return render(request, 'cfp/admin/base.html') + + @staff_required def talk_list(request): talks = Talk.objects.filter(site=request.conference.site) @@ -494,7 +499,7 @@ You can now: messages.success(request, _('Modifications successfully saved.')) return redirect(reverse('conference')) - return render(request, 'cfp/staff/conference.html', { + return render(request, 'cfp/admin/conference.html', { 'form': form, }) diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo index ed545038933fc17a5b438762da14e718e81dc450..da07eea1c67e28a57871cc9b12d27e3541c7133b 100644 GI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~0K)DnzE&B&do_xwfF zk}O5d=qlT;!T`PhUMhaLk!&L>N#uTC&0UV?scTkrgC*oeqS2R;M@TJMNM0q6l8&UQ z?4hDxP`v@_*uCU&awpOAeg7%=1ho%h$w0D!sC-T~lN;2a40SQDAS-vdurCd-{pIp7 zwRz-rax394`sK2Y+95K;KHn^+v684PBV&9u_hU48iKbE|p5&9=YETA|v1BLtf~b_Z z_?AW0k+!Y@l&5Oe6=@u;ngmrgafsPpU{);!m_s zno40)1=o;SWExXo?ja3i7kQT~AnnL_GMVUyr>WdQr4zZ4Xj8pL9wP(F4~0cKlc=e@ zMcyX*$x(TVg!pRi$0p!?HZusj+PqAvNh#5ec!#JgC9Qom_oKb7cf-5M6!JdFC86q6 z4VBKMf~aJW>qsT}l&GvGSNm%2|2m(f?jcjjTB33-$4LY0Jw1 diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index cfeab02..bcb3016 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-10-09 17:54+0000\n" -"PO-Revision-Date: 2017-10-09 19:54+0200\n" +"POT-Creation-Date: 2017-10-09 18:30+0000\n" +"PO-Revision-Date: 2017-10-09 20:31+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -274,7 +274,7 @@ msgstr "Couleur sur le programme" msgid "Label on program" msgstr "Label dans le xml du programme" -#: cfp/models.py:297 cfp/templates/cfp/staff/base.html:17 +#: cfp/models.py:297 cfp/templates/cfp/staff/base.html:15 #: cfp/templates/cfp/staff/participant_list.html:8 #: cfp/templates/cfp/staff/talk_details.html:68 #: cfp/templates/cfp/staff/talk_list.html:45 @@ -378,6 +378,26 @@ msgstr "[%(prefix)s] Conversation avec %(dest)s" msgid "[%(prefix)s] Talk: %(talk)s" msgstr "[%(prefix)s] Talk: %(talk)s" +#: cfp/templates/cfp/admin/base.html:10 +#: cfp/templates/cfp/admin/conference.html:8 +msgid "Conference" +msgstr "Conférence" + +#: cfp/templates/cfp/admin/base.html:19 cfp/templates/cfp/staff/base.html:24 +msgid "Please select a category." +msgstr "Veuillez sélectionner une catégorie." + +#: cfp/templates/cfp/admin/conference.html:13 +#: cfp/templates/cfp/staff/create_user.html:8 +msgid "Add a new user" +msgstr "Ajouter un nouvel utilisateur" + +#: cfp/templates/cfp/admin/conference.html:14 cfp/templates/cfp/propose.html:22 +#: cfp/templates/cfp/speaker.html:21 +#: cfp/templates/cfp/staff/create_user.html:13 +msgid "Save" +msgstr "Envoyer" + #: cfp/templates/cfp/closed.html:9 cfp/templates/cfp/propose.html:11 #: cfp/templates/cfp/speaker.html:11 msgid "Participate" @@ -415,47 +435,27 @@ msgstr "Éditer votre profil :" msgid "An email has been sent to you with those URLs" msgstr "Un mail vous a été envoyé avec toutes les URLs" -#: cfp/templates/cfp/propose.html:22 cfp/templates/cfp/speaker.html:21 -#: cfp/templates/cfp/staff/conference.html:14 -#: cfp/templates/cfp/staff/create_user.html:13 -msgid "Save" -msgstr "Envoyer" - -#: cfp/templates/cfp/schedule.html:9 cfp/templates/cfp/staff/base.html:20 +#: cfp/templates/cfp/schedule.html:9 cfp/templates/cfp/staff/base.html:18 #: cfp/templates/cfp/staff/schedule.html:9 ponyconf/templates/base.html:25 msgid "Schedule" msgstr "Programme" -#: cfp/templates/cfp/staff/base.html:16 +#: cfp/templates/cfp/staff/base.html:14 #: cfp/templates/cfp/staff/participant_details.html:33 #: cfp/templates/cfp/staff/talk_list.html:8 msgid "Talks" msgstr "Exposés" -#: cfp/templates/cfp/staff/base.html:18 +#: cfp/templates/cfp/staff/base.html:16 #: cfp/templates/cfp/staff/track_list.html:9 msgid "Tracks" msgstr "Sessions" -#: cfp/templates/cfp/staff/base.html:19 +#: cfp/templates/cfp/staff/base.html:17 #: cfp/templates/cfp/staff/room_list.html:9 msgid "Rooms" msgstr "Salles" -#: cfp/templates/cfp/staff/base.html:21 -#: cfp/templates/cfp/staff/conference.html:8 -msgid "Conference" -msgstr "Conférence" - -#: cfp/templates/cfp/staff/base.html:29 -msgid "Please select a category." -msgstr "Veuillez sélectionner une catégorie." - -#: cfp/templates/cfp/staff/conference.html:13 -#: cfp/templates/cfp/staff/create_user.html:8 -msgid "Add a new user" -msgstr "Ajouter un nouvel utilisateur" - #: cfp/templates/cfp/staff/create_user.html:14 #: cfp/templates/cfp/staff/talk_decide.html:22 ponyconf/templates/_form.html:16 msgid "Cancel" @@ -879,35 +879,35 @@ msgstr "Vous avez déjà confirmé votre participation à cet exposé." msgid "You already cancelled your participation to this talk." msgstr "Vous avez déjà annulé votre participation à cet exposé." -#: cfp/views.py:285 cfp/views.py:382 +#: cfp/views.py:290 cfp/views.py:387 msgid "The talk has been accepted." msgstr "L’exposé a été accepté." -#: cfp/views.py:287 cfp/views.py:384 +#: cfp/views.py:292 cfp/views.py:389 msgid "The talk has been declined." msgstr "L’exposé a été décliné." -#: cfp/views.py:352 cfp/views.py:444 +#: cfp/views.py:357 cfp/views.py:449 msgid "Message sent!" msgstr "Message envoyé !" -#: cfp/views.py:365 +#: cfp/views.py:370 msgid "Vote successfully created" msgstr "A voté !" -#: cfp/views.py:365 +#: cfp/views.py:370 msgid "Vote successfully updated" msgstr "Vote mis à jour" -#: cfp/views.py:386 +#: cfp/views.py:391 msgid "Decision taken in account" msgstr "Décision enregistrée" -#: cfp/views.py:472 +#: cfp/views.py:477 msgid "[{}] You have been added to the staff team" msgstr "[{}] Vous avez été ajouté aux membres du staff" -#: cfp/views.py:473 +#: cfp/views.py:478 msgid "" "Hi {},\n" "\n" @@ -931,15 +931,15 @@ msgstr "" "{}\n" "\n" -#: cfp/views.py:494 +#: cfp/views.py:499 msgid "Modifications successfully saved." msgstr "Modification enregistrée avec succès." -#: cfp/views.py:571 +#: cfp/views.py:576 msgid "User created successfully." msgstr "Utilisateur créé avec succès." -#: cfp/views.py:592 +#: cfp/views.py:597 #, python-format msgid "Format '%s' not available" msgstr "Format '%s' non disponible" @@ -981,15 +981,23 @@ msgstr "Appel à participation" msgid "Volunteers" msgstr "Bénévoles" -#: ponyconf/templates/base.html:42 ponyconf/templates/base.html:53 -msgid "Staff" -msgstr "Staff" +#: ponyconf/templates/base.html:42 +msgid "Organisazion" +msgstr "Organisation" -#: ponyconf/templates/base.html:51 +#: ponyconf/templates/base.html:43 +msgid "Administration" +msgstr "Administration" + +#: ponyconf/templates/base.html:52 msgid "Logout" msgstr "Déconnection" -#: ponyconf/templates/base.html:70 +#: ponyconf/templates/base.html:54 +msgid "Staff" +msgstr "Staff" + +#: ponyconf/templates/base.html:71 msgid "Powered by" msgstr "Propulsé par" @@ -1300,9 +1308,6 @@ msgstr "Adresse e-mail" #~ msgid "No assigned yet." #~ msgstr "Pas encore assigné." -#~ msgid "Registrations" -#~ msgstr "Inscriptions" - #~ msgid "required but unlimited" #~ msgstr "requis mais non limité" diff --git a/ponyconf/templates/base.html b/ponyconf/templates/base.html index 6c6c0a6..cb5ca09 100644 --- a/ponyconf/templates/base.html +++ b/ponyconf/templates/base.html @@ -38,7 +38,8 @@