remove action; better findtrack; more template fiddling
[disorder] / templates / playing.tmpl
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 @discard{
22 @include{macros.tmpl}
23 }@#
24 <html>
25 <head>
26 @include{stdhead.tmpl}@#
27 <title>@if{@isplaying}
28 {@playing{@part{@id}{title}}}
29 {@label{playing.title}}</title>
30 </head>
31 <body>
32 @include{topbar.tmpl}
33 <h1>@label{playing.title}</h1>
34
35 @# Extra control buttons for the management page
36 @ifmanage{
37 <div class=mgmt>
38 <p class=mgmt>
39 @if{@paused}{
40 @# Paused
41 <a class=button
42 href="@url?action=resume@back"
43 title="@label{playing.resumeverbose}">@label{playing.pause}</a>
44 </a>
45 <img width=16 height=16 class=imgbutton src="@image{enabled}">
46 }{
47 @# Not paused
48 <a class=button
49 href="@url?action=pause@back"
50 title="@label{playing.pauseverbose}">@label{playing.pause}</a>
51 </a>
52 <img width=16 height=16 class=imgbutton src="@image{disabled}">
53 }
54 @if{@random-enabled}{
55 @# Random play enabled
56 <a class=button
57 href="@url?action=random-disable@back"
58 title="@label{playing.randomdisableverbose}">@label{playing.random}</a>
59 </a>
60 <img width=16 height=16 class=imgbutton src="@image{enabled}">
61 }{
62 @# Random play disabled
63 <a class=button
64 href="@url?action=random-enable@back"
65 title="@label{playing.randomenableverbose}">@label{playing.random}</a>
66 </a>
67 <img width=16 height=16 class=imgbutton src="@image{disabled}">
68 }
69 @if{@enabled}{
70 @# Play enabled
71 <a class=button
72 href="@url?action=disable@back"
73 title="@label{playing.disableverbose}">@label{playing.playing}</a>
74 </a>
75 <img width=16 height=16 class=imgbutton src="@image{enabled}">
76 }{
77 @# Play disabled
78 <a class=button
79 href="@url?action=enable@back"
80 title="@label{playing.enableverbose}">@label{playing.playing}</a>
81 </a>
82 <img width=16 height=16 class=imgbutton src="@image{disabled}">
83 }
84 @# Volume form
85 <form class=volume action="@url" method=POST
86 enctype="multipart/form-data" accept-charset=utf-8>
87 <span class=volume>
88 @label{playing.volume}
89 @# Volume up button
90 @right{volume}{
91 <a class=imgbutton
92 href="@url?action=volume&#38;delta=-@label{volume.resolution}@back">
93 <img class=button src="@image{down}"
94 alt="@label{volume.reduce}"
95 title="@label{volume.reduceverbose}">
96 </a>
97 }{
98 <img class=button src="@image{nodown}">
99 }
100 @# Volume value widgets
101 @label{volume.left} <input size=3 name=left type=text value="@volume:left@">
102 @label{volume.right} <input size=3 name=right type=text value="@volume:right@">
103 <input name=back type=hidden value="@thisurl@?back=manage">
104 @# Volume set button
105 @right{volume}{
106 <button class=search name=submit type=submit>
107 @label{volume.set}
108 </button><input name=action type=hidden value=volume>
109 }
110 @# Volume down button
111 @right{volume}{
112 <a class=imgbutton
113 href="@url?action=volume&#38;delta=@label{volume.resolution}@back">
114 <img class=button
115 src="@image{up}"
116 alt="@label{volume.increase}"
117 title="@label{volume.increaseverbose}">
118 </a>
119 }{
120 <img class=button src="@image{noup}">
121 }
122 </form>
123 </span>
124 </p>
125 </div>
126 }{}
127
128 @# Only display the table if there is something to put in it
129 @if{@or{@isplaying}{@isqueue}}{
130 <table class=playing>
131 <tr class=headings>
132 <th class=when>@label{heading.when}</th>
133 <th class=who>@label{heading.who}</th>
134 <th class=artist>@label{heading.artist}</th>
135 <th class=album>@label{heading.album}</th>
136 <th class=title>@label{heading.title}</th>
137 <th class=length>@label{heading.length}</th>
138 <th class=button>&nbsp;</th>
139 @ifmanage{
140 <th class=imgbutton>&nbsp;</th>
141 <th class=imgbutton>&nbsp;</th>
142 <th class=imgbutton>&nbsp;</th>
143 <th class=imgbutton>&nbsp;</th>
144 }{}
145 </tr>
146 @playing{
147 <tr class=nowplaying>
148 <td colspan=@ifmanage{11}{7}>@label{playing.now}</td>
149 </tr>
150 <tr class=playing>
151 <td class=when>@mwhen{playing}{@id}</td>
152 <td class=who>@mwho{playing}{@id}</td>
153 <td class=artist>@martist{playing}{@track}</td>
154 <td class=album>@malbum{playing}{@track}</td>
155 <td class=title>@mtitle{playing}{@track}</td>
156 <td class=length>@length{@id}</td>
157 <td class=imgbutton>@mremove{playing}{@id}</td>
158 @ifmanage{
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=@ifmanage{11}{7}@>@label{playing.next}</td>
169 </tr>
170 }
171 @queue{
172 <tr class=@parity@>
173 <td class=when>@mwhen{queue}{@id}</td>
174 <td class=who>@mwho{queue}{@id}</td>
175 <td class=artist>@martist{queue}{@track}</td>
176 <td class=album>@malbum{queue}{@track}</td>
177 <td class=title>@mtitle{queue}{@track}</td>
178 <td class=length>@length</td>
179 <td class=imgbutton>@mremove{queue}{@id}</td>
180
181 @if{@eq{@arg{action}}{manage}}{
182 @if{@or{@isfirst@}
183 {@not{@movable@}@}@}{
184 <!-- cannot move up -->
185 <td class=imgbutton>
186 <img
187 class=button src="@image{noupall}"
188 title="@label{playing.upallverbose}" alt="">
189 <td class=imgbutton>
190 <img
191 class=button src="@image{noup}"
192 title="@label{playing.upverbose}" alt="">
193 }{
194 <!-- can move up -->
195 <td class=imgbutton>
196 <a class=imgbutton
197 href="@url?action=move&#38;id=@id@&#38;delta=2147483647@back"><img
198 class=button src="@image{upall}"
199 title="@label{playing.upallverbose}"
200 alt="@label{playing.upall}"></a>
201 <td class=imgbutton>
202 <a class=imgbutton
203 href="@url?action=move&#38;id=@id@&#38;delta=1@back"><img
204 class=button src="@image{up}"
205 title="@label{playing.upverbose}" alt="@label{playing.up}"></a>
206 }
207
208 @if{@or{@islast@}
209 {@not{@movable@}@}@}{
210 <!-- cannot move down -->
211 <td class=imgbutton>
212 <img
213 class=button src="@image{nodownall}"
214 title="@label{playing.downallverbose}" alt="">
215 <td class=imgbutton>
216 <img
217 class=button src="@image{nodown}"
218 title="@label{playing.downverbose}" alt="">
219 }{
220 <!-- can move down -->
221 <td class=imgbutton>
222 <a class=imgbutton
223 href="@url?action=move&#38;id=@id@&#38;delta=-2147483647@back"><img
224 class=button src="@image{downall}"
225 title="@label{playing.downallverbose}"
226 alt="@label{playing.downall}"></a>
227 <td class=imgbutton>
228 <a class=imgbutton
229 href="@url?action=move&#38;id=@id@&#38;delta=-1@back"><img
230 class=button src="@image{down}"
231 title="@label{playing.downverbose}" alt="@label{playing.down}"></a>
232 }
233 }
234 </tr>
235 }
236 </table>
237 }
238
239 @include{topbarend.tmpl}@#
240 </body>
241 </html>
242 @discard{
243 Local variables:
244 mode:sgml
245 sgml-always-quote-attributes:nil
246 sgml-indent-step:1
247 sgml-indent-data:t
248 End:
249 }@