extended @movable expansion; more template...
[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 method=POST
86 action="@url"
87 enctype="multipart/form-data" accept-charset=utf-8>
88 <span class=volume>
89 @label{playing.volume}
90 @# Volume up button
91 @right{volume}{
92 <a class=imgbutton
93 href="@url?action=volume&#38;delta=-@label{volume.resolution}@back">
94 <img class=button src="@image{down}"
95 alt="@label{volume.reduce}"
96 title="@label{volume.reduceverbose}">
97 </a>
98 }{
99 <img class=button src="@image{nodown}">
100 }
101 @# Volume value widgets
102 @label{volume.left} <input size=3 name=left
103 type=text value="@volume:left@">
104 @label{volume.right} <input size=3 name=right type
105 text value="@volume:right@">
106 <input name=back type=hidden value="@thisurl@?back=manage">
107 @# Volume set button
108 @right{volume}{
109 <button class=search name=submit type=submit>
110 @label{volume.set}
111 </button>
112 <input name=action type=hidden value=volume>
113 }
114 @# Volume down button
115 @right{volume}{
116 <a class=imgbutton
117 href="@url?action=volume&#38;delta=@label{volume.resolution}@back">
118 <img class=button
119 src="@image{up}"
120 alt="@label{volume.increase}"
121 title="@label{volume.increaseverbose}">
122 </a>
123 }{
124 <img class=button src="@image{noup}">
125 }
126 </form>
127 </span>
128 </p>
129 </div>
130 }{}
131
132 @# Only display the table if there is something to put in it
133 @if{@or{@isplaying}{@isqueue}}{
134 <table class=playing>
135 <tr class=headings>
136 <th class=when>@label{heading.when}</th>
137 <th class=who>@label{heading.who}</th>
138 <th class=artist>@label{heading.artist}</th>
139 <th class=album>@label{heading.album}</th>
140 <th class=title>@label{heading.title}</th>
141 <th class=length>@label{heading.length}</th>
142 <th class=button>&nbsp;</th>
143 @ifmanage{
144 <th class=imgbutton>&nbsp;</th>
145 <th class=imgbutton>&nbsp;</th>
146 <th class=imgbutton>&nbsp;</th>
147 <th class=imgbutton>&nbsp;</th>
148 }{}
149 </tr>
150 @if{@isplaying}{
151 <tr class=nowplaying>
152 <td colspan=@ifmanage{11}{7}>@label{playing.now}</td>
153 </tr>
154 }
155 @playing{
156 <tr class=playing>
157 <td class=when>@mwhen{playing}{@id}</td>
158 <td class=who>@mwho{playing}{@id}</td>
159 <td class=artist>@martist{playing}{@track}</td>
160 <td class=album>@malbum{playing}{@track}</td>
161 <td class=title>@mtitle{playing}{@track}</td>
162 <td class=length>@length{@id}</td>
163 <td class=imgbutton>@mremove{playing}{@id}</td>
164 @ifmanage{
165 <td class=imgbutton>&nbsp;</td>
166 <td class=imgbutton>&nbsp;</td>
167 <td class=imgbutton>&nbsp;</td>
168 <td class=imgbutton>&nbsp;</td>
169 }{}
170 </tr>
171 }
172 @if{@isqueue@}{
173 <tr class=next>
174 <td colspan=@ifmanage{11}{7}@>@label{playing.next}</td>
175 </tr>
176 }
177 @queue{
178 <tr class=@parity@>
179 <td class=when>@mwhen{queue}{@id}</td>
180 <td class=who>@mwho{queue}{@id}</td>
181 <td class=artist>@martist{queue}{@track}</td>
182 <td class=album>@malbum{queue}{@track}</td>
183 <td class=title>@mtitle{queue}{@track}</td>
184 <td class=length>@length</td>
185 <td class=imgbutton>@mremove{queue}{@id}</td>
186 @ifmanage{
187 <td class=imgbutton>@mmove{@id}{upall}{2147483647}</td>
188 <td class=imgbutton>@mmove{@id}{up}{1}</td>
189 <td class=imgbutton>@mmove{@id}{down}{-1}</td>
190 <td class=imgbutton>@mmove{@id}{downall}{-2147483647}</td>
191 }
192 </tr>
193 }
194 </table>
195 }
196
197 @include{topbarend.tmpl}@#
198 </body>
199 </html>
200 @discard{
201 Local variables:
202 mode:sgml
203 sgml-always-quote-attributes:nil
204 sgml-indent-step:1
205 sgml-indent-data:t
206 End:
207 }@