msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-04-19 21:48+0200\n"
+"POT-Creation-Date: 2012-04-20 14:46+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#: templates/postman/base_write.html:20
#: templates/teleforma/course_conference.html:57
#: templates/teleforma/course_detail.html:69
-#: templates/teleforma/course_document.html:45
+#: templates/teleforma/course_document.html:87
#: templates/teleforma/course_media.html:84
#: templates/teleforma/courses.html:102
msgid "Send"
#: templates/teleforma/course.html:18 templates/teleforma/course.html.py:34
#: templates/teleforma/course_conference.html:33
-#: templates/teleforma/course_document.html:21
+#: templates/teleforma/course_document.html:68
#: templates/teleforma/inc/document_list.html:11
#: templates/teleforma/inc/media_list.html:11 templates/telemeta/lists.html:69
#: templates/telemeta/search_criteria.html:97
#: templates/teleforma/course.html:51
#: templates/teleforma/course_conference.html:34
-#: templates/teleforma/course_document.html:22
#: templates/teleforma/inc/conference_list.html:13
msgid "Session"
msgstr "Session"
#: templates/teleforma/course.html:52
#: templates/teleforma/course_conference.html:35
-#: templates/teleforma/course_document.html:23
#: templates/teleforma/course_media.html:51
#: templates/teleforma/inc/conference_list.html:14
#: templates/telemeta/inc/user_list.html:51
msgstr "Professeur"
#: templates/teleforma/course_conference.html:36
-#: templates/teleforma/course_document.html:24
msgid "Begin"
-msgstr ""
+msgstr "Début"
#: templates/teleforma/course_conference.html:37
-#: templates/teleforma/course_document.html:25
msgid "End"
-msgstr ""
+msgstr "Fin"
#: templates/teleforma/course_conference.html:38
-#: templates/teleforma/course_document.html:26
msgid "Live"
-msgstr ""
+msgstr "En direct"
#: templates/teleforma/course_conference.html:50
#: templates/teleforma/course_detail.html:62
-#: templates/teleforma/course_document.html:38
+#: templates/teleforma/course_document.html:80
#: templates/teleforma/course_media.html:77
msgid "Local tweeter"
msgstr "Tweeter local"
#: templates/teleforma/inc/conference_list.html:12
msgid "Room"
-msgstr ""
+msgstr "Salle"
#: templates/teleforma/inc/conference_list.html:16
msgid "Streaming"
msgstr ""
#: templates/telemeta/base.html:106
-#, fuzzy
msgid "Profile"
-msgstr "profil"
+msgstr "Profil"
#: templates/telemeta/base.html:108
msgid "Lists"
msgid "Apply"
msgstr ""
+#: templates/telemeta/profile_detail.html:91
+msgid "Login as"
+msgstr "Se connecter en tant que"
+
#: templates/telemeta/search_criteria.html:5
#: templates/telemeta/search_criteria.html:76
msgid "Advanced Search"
url(r'^users/by_training/(\w+)/$', UsersTrainingView.as_view(), name="teleforma-training-users"),
url(r'^users/all/export/$', user_export.all, name="teleforma-users-xls-export"),
url(r'^users/by_training/(?P<id>.*)/export/$', user_export.by_training, name="teleforma-training-users-export"),
+ url(r'^users/(?P<id>.*)/login/$', UserLoginView.as_view(), name="teleforma-user-login"),
# CSS+Images (FIXME: for developement only)
url(r'^teleforma/css/(?P<path>.*)$', 'django.views.static.serve',
from jsonrpc import jsonrpc_method
from django.utils.decorators import method_decorator
-from django.contrib.auth import authenticate, login
+from django.contrib.auth import authenticate, login, get_backends
from django.template import RequestContext, loader
from django import template
from django.http import HttpResponse, HttpResponseRedirect
return super(UsersView, self).dispatch(*args, **kwargs)
+class UserLoginView(View):
+
+ def get(self, request, id):
+ user = User.objects.get(id=id)
+ backend = get_backends()[0]
+ user.backend = "%s.%s" % (backend.__module__, backend.__class__.__name__)
+ login(self.request, user)
+ return redirect('teleforma-desk')
+
+ @method_decorator(permission_required('is_superuser'))
+ def dispatch(self, *args, **kwargs):
+ return super(UserLoginView, self).dispatch(*args, **kwargs)
+
+
class UsersTrainingView(UsersView):
def get_queryset(self):