]> git.parisson.com Git - teleforma.git/commitdiff
Fix media admin and poster url
authorYoan Le Clanche <yoanl@pilotsystems.net>
Wed, 15 Jun 2022 13:08:49 +0000 (15:08 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Wed, 15 Jun 2022 13:08:49 +0000 (15:08 +0200)
teleforma/admin.py
teleforma/templates/teleforma/inc/media_package_list.html

index 4c3ed3be1f0a1d78f9b73a3583ddf14486d5d8b6..e4633bc3f04c07a490ac99e07c47047e6fbc5fb6 100644 (file)
@@ -144,7 +144,7 @@ class MediaItemMarkerInline(admin.StackedInline):
 class MediaAdmin(admin.ModelAdmin):
     date_hierarchy = 'date_added'
     exclude = ['readers']
-    search_fields = ['id', 'title', 'course__title', 'course__code', 'item__title']
+    search_fields = ['id', 'title', 'course__title', 'course__code', 'title']
     inlines = [MediaTranscodedInline, MediaItemMarkerInline]
 
 class ConferenceAdmin(admin.ModelAdmin):
index a92462d4ac5eac9e01ff66bdfd561ebd1c215d01..6ecd4eb5ba08ff6beb3a645a260a84947dcaacb2 100644 (file)
@@ -9,9 +9,9 @@
             <tr>
             <td {% if forloop.first %}class="border-top"{% endif %} width="230px" style="vertical-align:middle">
             <a href="{% url 'teleforma-media-video' seminar.id media.id %}" title="{% trans "Play" %}">
-             {% if im.poster_file %}
-               {% thumbnail related.file "168x98" as im %}
-                <div style="background: no-repeat url('{{ im.poster_file }}') 0 1px; background-size: 100%; background-color: #dfdfdf;">
+             {% if media.poster_file %}
+               {% thumbnail media.poster_file "168x98" as im %}
+                <div style="background: no-repeat url('{{ media.poster_file }}') 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 %}