chiark / gitweb /
4242740c2fe441df680f9da727e42620e496107f
[disorder] / templates / playing.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <!--
3 This file is part of DisOrder.
4 Copyright (C) 2004-2008 Richard Kettlewell
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 USA
20 -->
21 <html>
22  <head>
23 @include:stdhead@
24   <title>@if{@isplaying@}{@playing{@part:title@}@}{@label:playing.title@}@</title>
25  </head>
26  <body>
27 @include{topbar}@
28    <h1 class=title>@label:playing.title@</h1>
29
30    @#{extra control buttons for the management page}@
31    @if{@arg:mgmt@}{
32    <div class=mgmt>
33    <p class=mgmt>
34     @if{@paused@}{
35     <!-- paused -->
36     <span class=button>
37     <a class=button
38     href="@url@?action=resume&#38;mgmt=true"
39      title="@label:playing.resumeverbose@">@label:playing.pause@</a>
40     </a>
41     </span>
42     <img width=16 height=16 class=imgbutton src="@image:enabled@">
43     }{
44     <!-- not paused -->
45     <span class=button>
46     <a class=button
47     href="@url@?action=pause&#38;mgmt=true"
48      title="@label:playing.pauseverbose@">@label:playing.pause@</a>
49     </a>
50     </span>
51     <img width=16 height=16 class=imgbutton src="@image:disabled@">
52     }@
53     @if{@random-enabled@}{
54     <!-- random played enabled -->
55     <span class=button>
56     <a class=button
57     href="@url@?action=random-disable&#38;mgmt=true"
58      title="@label:playing.randomdisableverbose@">@label:playing.random@</a>
59     </a>
60     </span>
61     <img width=16 height=16 class=imgbutton src="@image:enabled@">
62     }{
63     <!-- random played disabled -->
64     <span class=button>
65     <a class=button
66     href="@url@?action=random-enable&#38;mgmt=true"
67      title="@label:playing.randomenableverbose@">@label:playing.random@</a>
68     </a>
69     </span>
70     <img width=16 height=16 class=imgbutton src="@image:disabled@">
71     }@
72     @if{@enabled@}{
73     <!-- playing enabled -->
74     <span class=button>
75     <a class=button
76     href="@url@?action=disable&#38;mgmt=true"
77      title="@label:playing.disableverbose@">@label:playing.playing@</a>
78     </a>
79     </span>
80     <img width=16 height=16 class=imgbutton src="@image:enabled@">
81     }{
82     <!-- playing disabled -->
83     <span class=button>
84     <a class=button
85     href="@url@?action=enable&#38;mgmt=true"
86      title="@label:playing.enableverbose@">@label:playing.playing@</a>
87     </a>
88     </span>
89     <img width=16 height=16 class=imgbutton src="@image:disabled@">
90     }@
91     <form class=volume action="@url@" method=POST
92      enctype="multipart/form-data" accept-charset=utf-8>
93     <span class=volume>
94      @label:playing.volume@
95      @right{volume}{<a class=imgbutton
96       href="@url@?action=volume&#38;delta=-@label:volume.resolution@&#38;back=@urlquote{@thisurl@?mgmt=true}@">
97       <img class=button src="@image:down@"
98        alt="@label:volume.reduce@" title="@label:volume.reduceverbose@">
99      </a>}{<img class=button src="@image:nodown@">}@
100      @label:volume.left@ <input size=3 name=left type=text value="@volume:left@">
101      @label:volume.right@ <input size=3 name=right type=text value="@volume:right@">
102      <input name=back type=hidden value="@thisurl@?mgmt=true">
103      @right{volume}{<button class=search name=submit type=submit>
104       @label:volume.set@
105      </button><input name=action type=hidden value=volume>}@
106      @right{volume}{<a class=imgbutton
107       href="@url@?action=volume&#38;delta=@label:volume.resolution@&#38;back=@urlquote{@thisurl@?mgmt=true}@">
108       <img class=button src="@image:up@"
109        alt="@label:volume.increase@" title="@label:volume.increaseverbose@">
110      </a>}{<img class=button src="@image:noup@">}@
111     </form>
112     </span>
113     </p>
114     </div>
115    }@
116
117 @#{only display the table if there is something to put in it}@
118 @if{@or{@isplaying@}{@isqueue@}@}{
119    <table class=playing>
120      <tr class=headings>
121       <th class=when>@label:heading.when@</th>
122       <th class=who>@label:heading.who@</th>
123       <th class=artist>@label:heading.artist@</th>
124       <th class=album>@label:heading.album@</th>
125       <th class=title>@label:heading.title@</th>
126       <th class=length>@label:heading.length@</th>
127       <th class=button>&nbsp;</th>
128       @if{@arg:mgmt@}{
129       <th class=imgbutton>&nbsp;</th>
130       <th class=imgbutton>&nbsp;</th>
131       <th class=imgbutton>&nbsp;</th>
132       <th class=imgbutton>&nbsp;</th>
133       }@
134      </tr>
135      @if{@isplaying@}{
136      <tr class=nowplaying>
137       <td colspan=@if{@arg:mgmt@}{11}{7}@ class=nowplaying>@label:playing.now@</td>
138      </tr>
139      @playing{
140      <tr class=playing>
141       <td class=when>@when@</td>
142       <td class=who>@if{@eq{@who@}{}@}{@if{@eq{@state@}{random}@}{@label:playing.randomtrack@}{&nbsp;}@}{@who@}@</td>
143       <td class=artist>@right{play}{<a class=directory
144        href="@url@?action=choose&amp;directory=@urlquote{@dirname{@dirname{@part:path@}@}@}@"
145        title="@label:playing.artistverbose@"
146        >@part{short}{artist}@</a>}{<span class=directory
147        title="@part{artist}@"
148        >@part{short}{artist}@</span>}@</td>
149       <td class=album>@right{play}{<a class=directory
150        href="@url@?action=choose&amp;directory=@urlquote{@dirname{@part:path@}@}@"
151        title="@label:playing.albumverbose@"
152        >@part{short}{album}@</a>}{<span class=directory
153        title="@part{album}@"
154        >@part{short}{album}@</span>}@</td>
155       <td class=title><span
156        title="@part{title}@">@part{short}{title}@</span></td>
157       <td class=length>@length@</td>
158       <td class=imgbutton>@if{@scratchable@}{<a class=imgbutton
159        href="@url@?action=scratch&#38;id=@id@&#38;mgmt=@arg:mgmt@"><img
160        class=button src="@image:scratch@"
161        title="@label:playing.scratchverbose@"
162        alt="@label:playing.scratch@"></a>}{<img
163        class=button src="@image:noscratch@"
164        title="@label:playing.scratchverbose@"
165        alt="@label:playing.scratch@">}@</td>
166       @if{@arg:mgmt@}{
167       <td class=imgbutton>&nbsp;</td>
168       <td class=imgbutton>&nbsp;</td>
169       <td class=imgbutton>&nbsp;</td>
170       <td class=imgbutton>&nbsp;</td>
171       }@
172      </tr>
173      }@}@
174      @if{@isqueue@}{
175      <tr class=next>
176       <td colspan=@if{@arg:mgmt@}{11}{7}@ class=next>@label:playing.next@</td>
177      </tr>
178      @queue{
179      <tr class=@parity@>
180       <td class=when>@when@</td>
181       <td class=who>@if{@eq{@who@}{}@}{@if{@eq{@state@}{random}@}{@label:queue.randomtrack@}{&nbsp;}@}{@who@}@</td>
182       <td class=artist>@right{play}{<a class=directory
183        title="@part{artist}@"
184        href="@url@?action=choose&amp;directory=@urlquote{@dirname{@dirname{@part:path@}@}@}@"
185        >@part{short}{artist}@</a>}{<span class=directory
186        title="@part{artist}@"
187        >@part{short}{artist}@</span>}@</td>
188       <td class=album>@right{play}{<a class=directory
189        title="@part{album}@"
190        href="@url@?action=choose&amp;directory=@urlquote{@dirname{@part:path@}@}@"
191        >@part{short}{album}@</a>}{<span class=directory
192        title="@part{album}@"
193        >@part{short}{album}@}@</td>
194       <td class=title><span
195        title="@part{title}@">@part{short}{title}@</span></td>
196       <td class=length>@length@</td>
197       <td class=imgbutton>@if{@removable@}{<a class=imgbutton
198        href="@url@?action=remove&#38;id=@id@&#38;mgmt=@arg:mgmt@"><img
199        class=button src="@image:scratch@"
200        title="@label:playing.removeverbose@" 
201        alt="@label:playing.remove@"></a>}{<img
202        class=button src="@image:noscratch@"
203        title="@label:playing.removeverbose@"
204        alt="@label:playing.remove@">}@</td>
205
206       @if{@arg:mgmt@}{
207       @if{@or{@isfirst@}
208              {@not{@movable@}@}@}{
209      <!-- cannot move up -->
210      <td class=imgbutton>
211       <img
212        class=button src="@image:noupall@"
213        title="@label:playing.upallverbose@" alt="">
214      <td class=imgbutton>
215       <img
216        class=button src="@image:noup@"
217        title="@label:playing.upverbose@" alt="">
218          }{
219      <!-- can move up -->
220      <td class=imgbutton>
221       <a class=imgbutton
222         href="@url@?action=move&#38;id=@id@&#38;delta=2147483647&#38;mgmt=true"><img
223        class=button src="@image:upall@"
224        title="@label:playing.upallverbose@"
225        alt="@label:playing.upall@"></a>
226      <td class=imgbutton>
227      <a class=imgbutton
228         href="@url@?action=move&#38;id=@id@&#38;delta=1&#38;mgmt=true"><img
229        class=button src="@image:up@"
230        title="@label:playing.upverbose@" alt="@label:playing.up@"></a>
231          }@
232
233       @if{@or{@islast@}
234              {@not{@movable@}@}@}{
235      <!-- cannot move down -->
236      <td class=imgbutton>
237       <img
238        class=button src="@image:nodownall@"
239        title="@label:playing.downallverbose@" alt="">
240      <td class=imgbutton>
241       <img
242        class=button src="@image:nodown@"
243        title="@label:playing.downverbose@" alt="">
244          }{
245      <!-- can move down -->
246      <td class=imgbutton>
247       <a class=imgbutton
248         href="@url@?action=move&#38;id=@id@&#38;delta=-2147483647&#38;mgmt=true"><img
249        class=button src="@image:downall@"
250        title="@label:playing.downallverbose@"
251        alt="@label:playing.downall@"></a>
252      <td class=imgbutton>
253      <a class=imgbutton
254         href="@url@?action=move&#38;id=@id@&#38;delta=-1&#38;mgmt=true"><img
255        class=button src="@image:down@"
256        title="@label:playing.downverbose@" alt="@label:playing.down@"></a>
257          }@
258
259       }@
260      </tr>
261      }@}@
262    </table>
263 }@
264
265 @include{topbarend}@
266  </body>
267 </html>
268 @@
269 <!--
270 Local variables:
271 mode:sgml
272 sgml-always-quote-attributes:nil
273 sgml-indent-step:1
274 sgml-indent-data:t
275 End:
276 -->