workaround for django ticket 17111; cover in api fix
[wolnelektury.git] / wolnelektury / templates / catalogue / player.html
index d38b53f..aeae44f 100755 (executable)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     {% load i18n compressed %}
+    {% load catalogue_tags %}
+    {% load thumbnail %}
     <head>
         <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
         <meta name="description" 
     </head>
     <body id="{% block bodyid %}player{% endblock %}">
 
+               {% if book.cover %}
+            <img src="
+                {% thumbnail book.cover "101x140" as thumb %}
+                    {{ thumb.url }}
+                {% empty %}
+                    {{ book.cover.url }}
+                {% endthumbnail %}
+            " alt="Cover" style="float: left; margin: .5em 1em 1em 1em;" />
+        {% endif %}
+       
+
+<h1>{% book_title book %}</h1>
 
+<div class="player-info normal-text">
+       <p><a target="_blank" href="{{ book.get_absolute_url }}">{% trans "Book's page" %}</a>.</p>
+       <p>{% trans "Download as" %}
+        <a href="{% url download_zip_mp3 book.slug %}">MP3</a>{% if have_oggs %},
+            <a href="{% url download_zip_ogg book.slug %}">Ogg Vorbis</a>{% endif %}.
+    </p>
+
+    {% if book.has_daisy_file %}
+        <p>DAISY:</p>
+        <ul class="daisy-list">
+        {% for media in book.get_daisy %}
+            <li><a href="{{ media.file.url }}">{{ media.name }}</a></li>
+        {% endfor %}
+        </ul>
+    {% endif %}
+</div>
 
+<div style="clear: both"></div>
 
 <div class="jp-type-playlist">
   <div id="jplayer" class="jp-jplayer"
               (<a class='mp3' href='{{ i.mp3.file.url }}'>mp3</a>{% if i.ogg %}
               | <a class='ogg' href='{{ i.ogg.file.url }}'>ogg</a>{% endif %})
             </span>
-            <span class='play'>{{ i.mp3.name }}</span>
+            <div class='play'>{{ i.mp3.name }}
             <div class='extra-info'>
               {% trans "Artist" %}: <span class='artist'>{{ i.mp3.get_extra_info_value.artist_name }}</span>,
               {% trans "Director" %}: <span class='director'>{{ i.mp3.get_extra_info_value.director_name }}</span>
             </div>
+            </div>
           </li>
         {% endfor %}
 
 </div>
 
 
-    <p>{% trans "Download as" %}:
-        <a href="{% url download_zip_mp3 book.slug %}">MP3</a>{% if have_oggs %},
-            <a href="{% url download_zip_ogg book.slug %}">Ogg Vorbis</a>{% endif %}.
-    </p>
-
-
-        {% if book.has_daisy_file %}
-            <p>DAISY:</p>
-            <ul class="audiobook-list" id="daisy-files">
-            {% for media in book.get_daisy %}
-                <li><a href="{{ media.file.url }}">{{ media.name }}</a></li>
-            {% endfor %}
-            </ul>
-        {% endif %}
-
-
         {% if projects|length > 1 %}
             <p>{% trans "Audiobooks were prepared as a part of the projects:" %}</p>
             <ul>
         {% endif %}
 
 
-
-
-
-
-
-
-
-        <div class="clearboth"></div>
-
-
-
-
-
         <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
         {% compressed_js "player" %}
 
-        <!--{{ piwik_tag|safe }}
+        {{ piwik_tag|safe }}
         <script type="text/javascript">
         var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
         document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
         <script type="text/javascript">
         var pageTracker = _gat._getTracker("UA-2576694-1");
         pageTracker._trackPageview();
-        </script>-->
+        </script>
     </body>
 </html>