From: yomguy Date: Tue, 27 Nov 2012 09:34:04 +0000 (+0100) Subject: continue seminar views X-Git-Tag: 0.9-probarreau~293 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=79318a015cfcb8d15cc55f2fe0a4f9608b455389;p=teleforma.git continue seminar views --- diff --git a/teleforma/models/pro.py b/teleforma/models/pro.py index bea2fbce..170c6c9a 100644 --- a/teleforma/models/pro.py +++ b/teleforma/models/pro.py @@ -136,7 +136,11 @@ class Seminar(models.Model): self.steps.append(self.doc_correct) self.steps.append(self.testimonial) return self.steps - + + def step_append(title, type, objects): + self.steps.append({'title': title, 'type': type, 'objects': objects }) + + class Meta(MetaCore): db_table = app_label + '_' + 'seminar' verbose_name = _('Seminar') diff --git a/teleforma/static/teleforma/css/teleforma.css b/teleforma/static/teleforma/css/teleforma.css index c1bb42c6..c8673754 100644 --- a/teleforma/static/teleforma/css/teleforma.css +++ b/teleforma/static/teleforma/css/teleforma.css @@ -1480,6 +1480,14 @@ input,textarea{ font-size: 1.2em; } +.course_description { + color: #000; + border-top: 1px solid #aaa; + margin-top: 0.5em; + padding: 0.5em 0em 0.5em 0em; + font-size: 0.9em; + } + .course_content { background-color: #FFF; -moz-border-radius: 8px 0px 8px 8px; diff --git a/teleforma/templates/teleforma/seminars.html b/teleforma/templates/teleforma/seminars.html index e133937a..fdd7dbfd 100644 --- a/teleforma/templates/teleforma/seminars.html +++ b/teleforma/templates/teleforma/seminars.html @@ -59,7 +59,9 @@
{{ seminar.title }}
+
{% if seminar.description %}{{ seminar.description }}{% endif %} +
{% for step in seminar.scenario %} @@ -68,22 +70,24 @@ {% include "teleforma/inc/document_simple_list.html" %} {% endwith %} - {% elif step.element_type == 'media_package' %} - {% include "teleforma/inc/media_package_list.html" % + {% elif step.all.0.element_type == 'media_package' %} + {% with step.all as media %} + {% include "teleforma/inc/media_package_list.html" %} + {% endwith %} - {% elif step.element_type == 'question' %} + {% elif step.all.0.element_type == 'question' %} + {% with step.all as questions %} {% include "teleforma/inc/question_list.html" %} - + {% endwith %} + {% endif %} + {% endfor %} - - {% endfor %} {% endblock course %} -
{% block status %}