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