]> git.parisson.com Git - teleforma.git/commitdiff
fix media steps
authoryomguy <yomguy@parisson.com>
Thu, 7 Feb 2013 15:56:43 +0000 (16:56 +0100)
committeryomguy <yomguy@parisson.com>
Thu, 7 Feb 2013 15:56:43 +0000 (16:56 +0100)
teleforma/templates/teleforma/inc/media_step.html
teleforma/templates/teleforma/inc/steps.html

index fa70aea4c84714fb2902a7b6f2286dfd7a903164..00257a939f3ee07ead3673707eb42b89377693bd 100644 (file)
@@ -4,30 +4,16 @@
 
 <table class="listing" width="100%">
     <tbody>
-      {% for media_package in media_packages.all %}
-       {% with media_package.video.all.0 as media %}
+      {% for media in medias.all %}
         {% if media.is_published or user.is_staff %}
             <tr>
             <td {% if forloop.first %}class="border-top"{% endif %} width="230px" style="vertical-align:middle">
             <a href="{% url teleforma-media-video seminar.id media_package.id %}" title="{% trans "Play" %}">
-            {% if media.item.related.all %}
-             {% with media.item.related.all.0 as related %}
-              {% if related.title == "preview" %}
-               {% thumbnail related.file "168x96" as im %}
-                <div style="background: no-repeat url('{{ im.url }}') 0 1px; background-size: 100%; background-color: #dfdfdf;">
-                 <img src="{{ STATIC_URL }}teleforma/images/play_168.png" width="100%" alt="{% trans 'Click here' %}" />
-                </div>
-               {% endthumbnail %}
-              {% endif %}
-             {% endwith %}
-            {% else %}
-              {% trans 'Click here' %}
-            {% endif %}
+             {{ media.item.title }}
             </a>
           </td>
           </tr>
         {% endif %}
-       {% endwith %}
       {% endfor %}
    </tbody>
 </table>
\ No newline at end of file
index 723239f3b6fd019eb46b37ecf1fc1ad515d30657..df51abf9aa96287e782a03ad673bacd1eb1d1da2 100644 (file)
@@ -1,6 +1,6 @@
 {% load teleforma_tags %}
 {% load i18n %}
-        
+
 {% with seminar.docs_1 as docs %}
   <div class="course_subtitle">
     <h4><img src="{{ STATIC_URL }}/telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Step" %} 1</h4>
@@ -8,11 +8,11 @@
   {% include "teleforma/inc/document_step.html" %}
 {% endwith %}
 
-{% with seminar.media as media_packages %}
+{% with seminar.medias as medias %}
   <div class="course_subtitle">
     <h4><img src="{{ STATIC_URL }}/telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Step" %} 2</h4>
   </div>
-  {% include "teleforma/inc/media_step.html" %}  
+  {% include "teleforma/inc/media_step.html" %}
 {% endwith %}