507e5d51a9daafe966dfb93819b0e3f4ea09301b
[wolnelektury.git] / apps / catalogue / templates / catalogue / player.html
1 <!DOCTYPE html>
2 <html>
3     {% load static from staticfiles %}
4     {% load i18n compressed %}
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         {% compressed_css "all" %}
15         {% compressed_css "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             <span class='jp-free-media'>
83               (<a class='mp3' href='{{ i.mp3.file.url }}'>mp3</a>{% if i.ogg %}
84               | <a class='ogg' href='{{ i.ogg.file.url }}'>ogg</a>{% endif %})
85             </span>
86             <div class='play'>{{ i.mp3.name }}
87             <div class='extra-info'>
88               {% trans "Artist" %}: <span class='artist'>{{ i.mp3.extra_info.artist_name }}</span>,
89               {% trans "Director" %}: <span class='director'>{{ i.mp3.extra_info.director_name }}</span>
90             </div>
91             </div>
92           </li>
93         {% endfor %}
94
95         </ul>
96       </div>
97
98       <div class="jp-no-solution">
99         <span>Update Required</span>
100         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>.
101       </div>
102     </div>
103   </div>
104 </div>
105
106
107         {% if projects|length > 1 %}
108             <p>{% trans "Audiobooks were prepared as a part of the projects:" %}</p>
109             <ul>
110             {% for cs, fb in projects %}
111                 <li>
112                 {% if fb %}
113                     {% blocktrans %}{{ cs }}, funded by {{ fb }}{% endblocktrans %}
114                 {% else %}
115                     {{ cs }}
116                 {% endif %}
117                 </li>
118             {% endfor %}
119             </ul>
120         {% else %}
121             <p>
122             {% with projects.0.0 as cs %}
123             {% with projects.0.1 as fb %}
124                 {% if fb %}
125                     {% blocktrans %}Audiobooks were prepared as a part of the {{ cs }} project funded by {{ fb }}.{% endblocktrans %}
126                 {% else %}
127                     {% blocktrans %}Audiobooks were prepared as a part of the {{ cs }} project.{% endblocktrans %}
128                 {% endif %}
129             {% endwith %}
130             {% endwith %}
131             </p>
132         {% endif %}
133
134
135         <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
136         {% compressed_js "player" %}
137
138         {{ piwik_tag|safe }}
139     </body>
140 </html>