class MediaAdmin(admin.ModelAdmin):
exclude = ['readers']
- search_fields = ['id']
-
-class MediaPackageAdmin(admin.ModelAdmin):
- exclude = ['mime_type']
- search_fields = ['id']
- filter_horizontal = ['video', 'audio']
+ search_fields = ['id', 'title']
class ConferenceAdmin(admin.ModelAdmin):
exclude = ['readers']
class SeminarAdmin(admin.ModelAdmin):
inlines = [SeminarQuestionInline,]
- filter_horizontal = ['professor', 'medias', 'media_previews',
+ filter_horizontal = ['professor', 'medias',
'docs_1', 'docs_2', 'docs_correct']
ordering = ['course', 'rank']
search_fields = ['course__title', 'title', 'sub_title']
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-01-16 17:56+0100\n"
+"POT-Creation-Date: 2013-01-17 10:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Guillaume Pellerin <yomguy@parisson.com>\n"
"Language-Team: LANGUAGE <lists@parisson.com>\n"
msgstr "Modèle d'attestation"
#: models/pro.py:196 templates/teleforma/inc/testimonial_list.html:7
-#: templates/teleforma/inc/testimonial_step.html:7 views/pro.py:479
+#: templates/teleforma/inc/testimonial_step.html:7 views/pro.py:484
msgid "Testimonial"
msgstr "Attestation"
msgid "Reply"
msgstr ""
+#: templates/postman/seminar_validated.txt:3
+#, fuzzy
+msgid ""
+"Congratulations!\n"
+"\n"
+"Your seminar has been validated.\n"
+"You can go to the next step of your seminar following this link:\n"
+msgstr ""
+"Félicitations!\n"
+"\n"
+"Votre dernière consultation a été validée.\n"
+"Vous pouvez accéder à la prochaine étape de votre séminaire en suivant ce "
+"lien :\n"
+
#: templates/postman/sent.html:6
msgid "Sent"
msgstr ""
#: templates/teleforma/course_media.html:73
#: templates/teleforma/seminar_media_video.html:83
msgid "Audio"
-msgstr ""
+msgstr "Audio"
#: templates/teleforma/course_conference.html:70
#: templates/teleforma/course_media.html:130
#: templates/teleforma/course_media.html:76
#: templates/teleforma/seminar_media_audio.html:22
msgid "Video"
-msgstr ""
+msgstr "Vidéo"
#: templates/teleforma/course_conference_audio.html:70
#: templates/teleforma/inc/conference_list.html:28
msgid "You have successfully submitted your answer"
msgstr "Vous avez soumis votre consultation avec succès"
-#: views/pro.py:257
+#: views/pro.py:262
msgid "Your answer has been validated"
msgstr "Votre consultation a été validée"
-#: views/pro.py:352
+#: views/pro.py:357
#, fuzzy
msgid "You have successfully submitted your evaluation"
msgstr "Vous avez soumis votre évaluation avec succès"
strings.append(self.course.code + ' ' + self.course_type.name)
elif self.course:
strings.append(self.course.code)
+ elif self.item.title:
+ strings.append(self.item.title)
else:
- strings.append(self.item.file)
+ strings.append(os.path.basename(self.item.file.path))
strings.append(self.mime_type)
return ' - '.join(strings)
medias = models.ManyToManyField(Media, related_name="seminar",
verbose_name=_('media'),
blank=True, null=True)
- media_previews = models.ManyToManyField(Media, related_name="seminar_media_previews",
+ media_preview = models.ForeignKey(Media, related_name="seminar_preview",
verbose_name=_('media_preview'),
blank=True, null=True)
docs_2 = models.ManyToManyField(Document, related_name="seminar_docs_2",
--- /dev/null
+{% load telemeta_utils %}
+{% load teleforma_tags %}
+{% load i18n %}
+
+<script src="{{STATIC_URL}}teleforma/video-js/video.js"></script>
+<link href="{{STATIC_URL}}teleforma/video-js/video-js.css" rel="stylesheet">
+
+<video id="my_video_1" class="video-js vjs-default-skin" width="415" height="235" controls preload="auto" data-setup='{}'>
+ <source src="{{ MEDIA_URL }}{{ object.media_preview.item.file }}#t=0" type="{{ object.media_preview.mime_type }}" />
+ {% for transcoded in object.media_preview.item.transcoded.all %}
+ {% if "video" in transcoded.mime_type %}
+ <source src="{{ MEDIA_URL }}{{ transcoded.file }}#t=0" type="{{ transcoded.mime_type }}" />
+ {% endif %}
+ {% endfor %}
+</video>
--- /dev/null
+{% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}
+{% blocktrans %}
+Congratulations!
+
+Your answer have been validated.
+You can now download the training testimonial following this link:
+
+http://{{ site.name }}{{ testimonial_url }}
+
+{% endblocktrans }
\ No newline at end of file
--- /dev/null
+{% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}
+{% blocktrans %}
+Congratulations!
+
+Your answer has been validated.
+You can continue to the next step of your seminar following this link:
+
+http://{{ site.name }}{{ seminar_url }}
+
+{% endblocktrans }
\ No newline at end of file
url(r'^desk/seminars/(?P<id>.*)/media/(?P<pk>.*)/audio/$',
SeminarMediaView.as_view(template_name='teleforma/seminar_media_audio.html'),
name="teleforma-media-audio"),
+ url(r'^desk/seminars/(?P<pk>.*)/preview/$',
+ SeminarMediaPreviewView.as_view(),
+ name="teleforma-media-preview-video"),
url(r'^desk/documents/(?P<pk>.*)/detail/$', DocumentView.as_view(),
name="teleforma-document-detail"),
media = self.get_object()
return super(SeminarMediaView, self).dispatch(*args, **kwargs)
+
+class SeminarMediaPreviewView(DetailView):
+
+ model = Seminar
+ template_name = 'teleforma/inc/seminar_media_preview_video.html'
+
+ def dispatch(self, *args, **kwargs):
+ return super(SeminarMediaPreviewView, self).dispatch(*args, **kwargs)
class AnswersView(ListView):
ctx_dict = {'site': site, 'seminar_url': seminar_url,}
text = render_to_string('teleforma/messages/seminar_validated.txt', ctx_dict)
mess = Message(sender=sender, recipient=user,
- subject=_('Your answer has been validated'),
+ subject=_('Answer validated') + ' : ' + seminar.title,
body=text)
mess.moderation_status = 'a'
mess.save()