Merge branch 'reflow'
[wolnelektury.git] / src / catalogue / templates / catalogue / player.html
1 <!DOCTYPE html>
2 <html>
3     {% load static from staticfiles %}
4     {% load i18n pipeline %}
5     {% load catalogue_tags %}
6     {% load thumbnail %}
7     <head>
8         <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
9         <meta name="description"
10             content="{{ book.title }} - darmowy audiobook na wolnej licencji" />
11         <title>{% trans "Wolne Lektury" %} ::
12             {{ book.title }} - {{ audiobook }}</title>
13         <link rel="icon" href="{% static "img/favicon.png" %}" type="image/png" />
14         {% stylesheet "all" %}
15         {% stylesheet "player" %}
16
17     </head>
18     <body id="{% block bodyid %}player{% endblock %}">
19
20                 {% if book.cover_thumb %}
21             <img src="
22                 {% thumbnail book.cover_thumb "101x140" as thumb %}
23                     {{ thumb.url }}
24                 {% empty %}
25                     {{ book.cover_thumb.url }}
26                 {% endthumbnail %}
27             " alt="Cover" style="float: left; margin: .5em 1em 1em 1em;" />
28         {% endif %}
29
30
31 <h1>{% book_title book %}</h1>
32
33 <div class="player-info normal-text">
34         <p><a target="_blank" href="{{ book.get_absolute_url }}">{% trans "Book's page" %}</a>.</p>
35         <p>{% trans "Download as" %} {% download_audio book False %}.</p>
36
37     {% if book.has_daisy_file %}
38         <p>DAISY:</p>
39         <ul class="daisy-list">
40         {% for media in book.get_daisy %}
41             <li><a href="{{ media.file.url }}">{{ media.name }}</a></li>
42         {% endfor %}
43         </ul>
44     {% endif %}
45 </div>
46
47 <div style="clear: both"></div>
48
49 <div class="jp-type-playlist">
50   <div id="jplayer" class="jp-jplayer"
51     data-supplied="{% if have_oggs %}oga,{% endif %}mp3"></div>
52   <div id="jp_container_1" class="jp-audio">
53     <div class="jp-type-single">
54       <div class="jp-gui jp-interface">
55         <ul class="jp-controls">
56           <li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
57           <li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
58           <li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
59           <li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
60           <li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
61           <li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
62         </ul>
63         <div class="jp-progress">
64           <div class="jp-seek-bar">
65             <div class="jp-play-bar"></div>
66           </div>
67         </div>
68         <div class="jp-volume-bar">
69           <div class="jp-volume-bar-value"></div>
70         </div>
71         <div class="jp-time-holder">
72           <div class="jp-current-time"></div>
73           <div class="jp-duration"></div>
74         </div>
75       </div>
76
77       <div class="jp-playlist">
78         <ul>
79
80         {% for i in audiobooks %}
81           <li>
82             <div class='play'>{{ i.mp3.name }}
83             <div class='extra-info'>
84               {% trans "Artist:" %}: <span class='artist'>{{ i.mp3.extra_info.artist_name }}</span>,
85               {% trans "director:" %}: <span class='director'>{{ i.mp3.extra_info.director_name }}</span>
86             </div>
87             </div>
88           </li>
89         {% endfor %}
90
91         </ul>
92       </div>
93
94       <div class="jp-no-solution">
95         <span>Update Required</span>
96         To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
97       </div>
98     </div>
99   </div>
100 </div>
101
102
103         {% if projects|length > 1 %}
104             <p>{% trans "Audiobooks were prepared as a part of the projects:" %}</p>
105             <ul>
106             {% for cs, fb in projects %}
107                 <li>
108                 {% if fb %}
109                     {% blocktrans %}{{ cs }}, funded by {{ fb }}{% endblocktrans %}
110                 {% else %}
111                     {{ cs }}
112                 {% endif %}
113                 </li>
114             {% endfor %}
115             </ul>
116         {% else %}
117             <p>
118             {% with projects.0.0 as cs %}
119             {% with projects.0.1 as fb %}
120                 {% if fb %}
121                     {% blocktrans %}Audiobooks were prepared as a part of the {{ cs }} project funded by {{ fb }}.{% endblocktrans %}
122                 {% else %}
123                     {% blocktrans %}Audiobooks were prepared as a part of the {{ cs }} project.{% endblocktrans %}
124                 {% endif %}
125             {% endwith %}
126             {% endwith %}
127             </p>
128         {% endif %}
129
130
131         <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
132         {% javascript "player" %}
133
134         {{ piwik_tag|safe }}
135     </body>
136 </html>