]> git.parisson.com Git - teleforma.git/commitdiff
continue seminar views
authoryomguy <yomguy@parisson.com>
Tue, 27 Nov 2012 09:34:04 +0000 (10:34 +0100)
committeryomguy <yomguy@parisson.com>
Tue, 27 Nov 2012 09:34:04 +0000 (10:34 +0100)
teleforma/models/pro.py
teleforma/static/teleforma/css/teleforma.css
teleforma/templates/teleforma/seminars.html

index bea2fbcea509a65b6c40bd02304ffb3d406ed9ca..170c6c9a233342f47397e2cb9af032944a545d5f 100644 (file)
@@ -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')
index c1bb42c677ed30d6eb6745193ec3813d4cab387e..c86737540b847a6e118406eca40076da8925868a 100644 (file)
@@ -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;
index e133937a6fb53161e2e8d52eb833856cadae7b79..fdd7dbfdf69059a0e94337ff531bfe49a6364459 100644 (file)
@@ -59,7 +59,9 @@
         <div class="course_title">
          <a href="{% url teleforma-seminar-detail seminar.id %}" style="color: #000;">{{ seminar.title }}</a>
         </div>
+        <div class="course_description">
         {% if seminar.description %}{{ seminar.description }}{% endif %}
+        </div>
 
         {% for step in seminar.scenario %}
         
             {% 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 %}
-      
       </div>
-     
    {% endfor %}
 </div>
 {% endblock course %}
 
-
 <div id="module-set" style="width: 22%">
 
 {% block status %}