chiark / gitweb /
Set resource limits on the server to prevent more than FD_SETSIZE
[disorder] / templates / playing.tmpl
CommitLineData
460b9539 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2<!--
3This file is part of DisOrder.
8f9616f1 4Copyright (C) 2004-2008 Richard Kettlewell
460b9539 5
e7eb3a27 6This program is free software: you can redistribute it and/or modify
460b9539 7it under the terms of the GNU General Public License as published by
e7eb3a27 8the Free Software Foundation, either version 3 of the License, or
460b9539 9(at your option) any later version.
10
e7eb3a27
RK
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
460b9539 15
16You should have received a copy of the GNU General Public License
e7eb3a27 17along with this program. If not, see <http://www.gnu.org/licenses/>.
460b9539 18-->
2257512d 19@discard{
1a3dba67
RK
20
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}
3b95af9c
RK
26 {@actbutton{@label{playing.@class}}
27 {@label{playing.@q{@action}verbose}}
28 {@action}
1a3dba67
RK
29 <img width=@width height=@height class=imgbutton
30 src="@image{@state}">}
31
32 @# Volume up/down buttons
33 @# @dir is the direction: up or down
34 @# @sign is the sign: + or -
35 @define {vbutton}{dir sign}
36 {@right{volume}
37 {<a class=imgbutton
38 href="@url?action=volume&#38;delta=@sign@label{volume.resolution}@back">
39 <img class=button src="@image{@dir}"
30d85588 40 width=@width height=@height
1a3dba67
RK
41 alt="@label{volume.@dir}"
42 title="@label{volume.@q{@dir}verbose}">
43 </a>}
30d85588
RK
44 {<img class=button width=@width height=@height
45 src="@image{no@dir}">}}
1a3dba67 46
0d0253c9
RK
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}}
50 {@yes}
51 {@no}}
52
cf4ae3d5
RK
53 @ifmanage{
54 @define {back} {} {&amp;back=manage}
55 @define {formback} {} {<input type=hidden name=back value=manage>}
56 }{}
2257512d 57}@#
460b9539 58<html>
59 <head>
0d0253c9 60@quiethead
04024c2c 61 <title>@if{@isplaying}
2257512d
RK
62 {@playing{@part{@id}{title}}}
63 {@label{playing.title}}</title>
460b9539 64 </head>
65 <body>
0d0253c9 66@stdmenu{@ifmanage{manage}{playing}}
04024c2c 67 <h1>@label{playing.title}</h1>
460b9539 68
04024c2c 69@# Extra control buttons for the management page
2257512d 70 @ifmanage{
328248ba 71 <div class=mgmt>
1a3dba67
RK
72 <p class=mgmt>
73 @if{@paused}
d77d85a6
RK
74 {@onoff{pause}{resume}{enabled}}
75 {@onoff{pause}{pause}{disabled}}
1a3dba67
RK
76 @if{@random-enabled}
77 {@onoff{random}{randomdisable}{enabled}}
78 {@onoff{random}{randomenable}{disabled}}
79 @if{@enabled}
80 {@onoff{playing}{disable}{enabled}}
81 {@onoff{playing}{enable}{disabled}}
82 <form class=volume method=POST
83 action="@url"
84 enctype="multipart/form-data" accept-charset=utf-8>
85 <span class=volume>
86 @label{playing.volume}
87 @vbutton{up}{+}
88 @label{volume.left}
89 <input size=3 name=left type=text value="@volume{left}">
90 @label{volume.right}
91 <input size=3 name=right type=text value="@volume{right}">
858805c3 92 <input name=back type=hidden value="@quote{@thisurl}">
1a3dba67 93 @right{volume}{
8b15f02d 94 @submit{@label{volume.set}}
1a3dba67
RK
95 <input name=action type=hidden value=volume>
96 }
97 @vbutton{down}{-}
98 </span>
99 </form>
100 </p>
328248ba 101 </div>
2257512d 102 }{}
460b9539 103
04024c2c
RK
104@# Only display the table if there is something to put in it
105@if{@or{@isplaying}{@isqueue}}{
460b9539 106 <table class=playing>
107 <tr class=headings>
04024c2c
RK
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>
460b9539 114 <th class=button>&nbsp;</th>
2257512d 115 @ifmanage{
1a3dba67
RK
116 <th class=imgbutton>&nbsp;</th>
117 <th class=imgbutton>&nbsp;</th>
118 <th class=imgbutton>&nbsp;</th>
119 <th class=imgbutton>&nbsp;</th>
2257512d 120 }{}
460b9539 121 </tr>
af106f2d
RK
122 @if{@isplaying}{
123 <tr class=nowplaying>
1a3dba67 124 <td colspan=@ifmanage{11}{7}>@label{playing.now}</td>
af106f2d
RK
125 </tr>
126 }
2257512d 127 @playing{
af106f2d 128 <tr class=playing>
1a3dba67
RK
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>
136 @ifmanage{
137 <td class=imgbutton>&nbsp;</td>
138 <td class=imgbutton>&nbsp;</td>
139 <td class=imgbutton>&nbsp;</td>
140 <td class=imgbutton>&nbsp;</td>
141 }{}
af106f2d 142 </tr>
2257512d 143 }
99955407
RK
144 @if{@isqueue}{
145 <tr class=next>
146 <td colspan=@ifmanage{11}{7}>@label{playing.next}</td>
147 </tr>
2257512d 148 }
460b9539 149 @queue{
99955407
RK
150 <tr class=@parity>
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>
158 @ifmanage{
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>
163 }{}
164 </tr>
165 }
460b9539 166 </table>
2257512d 167}
460b9539 168
0d0253c9 169@credits
460b9539 170 </body>
171</html>
2257512d 172@discard{
460b9539 173Local variables:
174mode:sgml
175sgml-always-quote-attributes:nil
176sgml-indent-step:1
177sgml-indent-data:t
0d0253c9 178indent-tabs-mode:nil
460b9539 179End:
0d0253c9 180}@#