Save audiobook project funding info in the model.
[wolnelektury.git] / src / catalogue / templates / catalogue / snippets / jplayer.html
index 96d3591..c82c1e8 100644 (file)
@@ -1,6 +1,6 @@
 {% load i18n catalogue_tags %}
 {% if audiobooks %}{% if book|status:request.user != 'closed' %}
-  <div class="jp-type-playlist" data-book-id="{{ book.pk }}">
+  <div class="jp-type-playlist" data-book-id="{{ book.pk }}" data-book-slug="{{ book.slug }}">
     <div id="jplayer" class="jp-jplayer" data-player="jp_container_{{ book.pk }}"
          data-supplied="oga,mp3"></div>
     <div id="jp_container_{{ book.pk }}" class="jp-audio">
                     {% trans "Artist:" %}&nbsp;<span class='artist'>{{ extra_info.artist_name }}</span>,
                     {% trans "director:" %}&nbsp;<span class='director'>{{ extra_info.director_name }}</span>
                     {% if extra_info.license %}{% license_icon extra_info.license %}{% endif %}
+                    {% if i.mp3.project_icon %}<img src="{{ i.mp3.project_icon }}">{% endif %}
                     <p>
+                     {% if i.mp3.project_description %}{{ i.mp3.project_description }}{% else %}
                       {% with fb=extra_info.funded_by %}
                         {% if fb %}Dofinansowano ze środków: {{ fb }}.{% endif %}
                       {% endwith %}
+                    {% endif %}
                     </p>
                  {% endwith %}
                   </div>