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