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 ed54503..da07eea 100644 Binary files a/locale/fr/LC_MESSAGES/django.mo and b/locale/fr/LC_MESSAGES/django.mo differ 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 @@