1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
3 This file is part of DisOrder.
4 Copyright (C) 2004-2008 Richard Kettlewell
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 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 @# On/off button for pause etc
22 @# @class should be the class: pause, random, playing
23 @# @action should be the action to switch to the opposite state
24 @# @state should be the current state
25 @define {onoff} {class action state}
26 {@actbutton{@label{playing.@class}}
27 {@label{playing.@q{@action}verbose}}
29 <img width=@width height=@height class=imgbutton
30 src="@image{@state}">}
32 @# Volume up/down buttons
33 @# @dir is the direction: up or down
34 @# @sign is the sign: + or -
35 @define {vbutton}{dir sign}
38 href="@url?action=volume&delta=@sign@label{volume.resolution}@back">
39 <img class=button src="@image{@dir}"
40 width=@width height=@height
41 alt="@label{volume.@dir}"
42 title="@label{volume.@q{@dir}verbose}">
44 {<img class=button width=@width height=@height
45 src="@image{no@dir}">}}
47 @# Expand to @yes for the Manage page and @no for the playing page
48 @define {ifmanage} {yes no}
49 {@if {@eq {@arg{action}}{manage}}
54 @define {back} {} {&back=manage}
55 @define {formback} {} {<input type=hidden name=back value=manage>}
61 <title>@if{@isplaying}
62 {@playing{@part{@id}{title}}}
63 {@label{playing.title}}</title>
66 @stdmenu{@ifmanage{manage}{playing}}
67 <h1>@label{playing.title}</h1>
69 @# Extra control buttons for the management page
74 {@onoff{pause}{resume}{enabled}}
75 {@onoff{pause}{pause}{disabled}}
77 {@onoff{random}{randomdisable}{enabled}}
78 {@onoff{random}{randomenable}{disabled}}
80 {@onoff{playing}{disable}{enabled}}
81 {@onoff{playing}{enable}{disabled}}
82 <form class=volume method=POST
84 enctype="multipart/form-data" accept-charset=utf-8>
86 @label{playing.volume}
89 <input size=3 name=left type=text value="@volume{left}">
91 <input size=3 name=right type=text value="@volume{right}">
92 <input name=back type=hidden value="@quote{@thisurl}">
94 @submit{@label{volume.set}}
95 <input name=action type=hidden value=volume>
104 @# Only display the table if there is something to put in it
105 @if{@or{@isplaying}{@isqueue}}{
106 <table class=playing>
108 <th class=when>@label{heading.when}</th>
109 <th class=who>@label{heading.who}</th>
110 <th class=artist>@label{heading.artist}</th>
111 <th class=album>@label{heading.album}</th>
112 <th class=title>@label{heading.title}</th>
113 <th class=length>@label{heading.length}</th>
114 <th class=button> </th>
116 <th class=imgbutton> </th>
117 <th class=imgbutton> </th>
118 <th class=imgbutton> </th>
119 <th class=imgbutton> </th>
123 <tr class=nowplaying>
124 <td colspan=@ifmanage{11}{7}>@label{playing.now}</td>
129 <td class=when>@mwhen{playing}{@id}</td>
130 <td class=who>@mwho{playing}{@id}</td>
131 <td class=artist>@martist{playing}{@track}</td>
132 <td class=album>@malbum{playing}{@track}</td>
133 <td class=title>@mtitle{playing}{@track}</td>
134 <td class=length>@length{@id}</td>
135 <td class=imgbutton>@mremove{playing}{@id}</td>
137 <td class=imgbutton> </td>
138 <td class=imgbutton> </td>
139 <td class=imgbutton> </td>
140 <td class=imgbutton> </td>
146 <td colspan=@ifmanage{11}{7}>@label{playing.next}</td>
151 <td class=when>@mwhen{queue}{@id}</td>
152 <td class=who>@mwho{queue}{@id}</td>
153 <td class=artist>@martist{queue}{@track}</td>
154 <td class=album>@malbum{queue}{@track}</td>
155 <td class=title>@mtitle{queue}{@track}</td>
156 <td class=length>@length{@id}</td>
157 <td class=imgbutton>@mremove{queue}{@id}</td>
159 <td class=imgbutton>@mmove{@id}{upall}{2147483647}</td>
160 <td class=imgbutton>@mmove{@id}{up}{1}</td>
161 <td class=imgbutton>@mmove{@id}{down}{-1}</td>
162 <td class=imgbutton>@mmove{@id}{downall}{-2147483647}</td>
175 sgml-always-quote-attributes:nil