]> git.parisson.com Git - teleforma.git/commitdiff
thumbnailing media preview, sorl-thumbnail needed
authoryomguy <yomguy@parisson.com>
Sat, 18 Aug 2012 17:28:06 +0000 (19:28 +0200)
committeryomguy <yomguy@parisson.com>
Sat, 18 Aug 2012 17:28:06 +0000 (19:28 +0200)
teleforma/templates/teleforma/inc/media_list.html

index 269deadadff36a8bd6b21c4762b1c02340fddef8..4c3bfa55c3a76abce6ca4f4c84c853ba0929b74d 100644 (file)
             {% if media.item.related.all %}
              {% for related in media.item.related.all %}
               {% if related.title == "preview" %}
-                <div style="background: no-repeat url('{{ MEDIA_URL }}{{ related.file }}') 0 0; background-size: 100%;">
+               {% thumbnail related.file "168x94" as im %}
+                <div style="background: no-repeat url('{{ im.url }}') 0 0; background-size: 100%;">
                  <img src="{{ STATIC_URL }}teleforma/images/play_168.png" width="100%" alt="{% trans 'Click here' %}" />
                 </div>
+               {% endthumbnail %}
               {% endif %}
              {% endfor %}
             {% else %}