@image expansion
[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
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19USA
20-->
2257512d 21@discard{
1a3dba67
RK
22
23 @# On/off button for pause etc
24 @# @class should be the class: pause, random, playing
25 @# @action should be the action to switch to the opposite state
26 @# @state should be the current state
27 @define {onoff} {class action state}
28 {<a class=button
29 href="@url?action=@action@back"@class}@q{@state
30 title="@label{playing.@q{action}verbose}">
31 @label{playing.@class}
32 </a>
33 <img width=@width height=@height class=imgbutton
34 src="@image{@state}">}
35
36 @# Volume up/down buttons
37 @# @dir is the direction: up or down
38 @# @sign is the sign: + or -
39 @define {vbutton}{dir sign}
40 {@right{volume}
41 {<a class=imgbutton
42 href="@url?action=volume&#38;delta=@sign@label{volume.resolution}@back">
43 <img class=button src="@image{@dir}"
30d85588 44 width=@width height=@height
1a3dba67
RK
45 alt="@label{volume.@dir}"
46 title="@label{volume.@q{@dir}verbose}">
47 </a>}
30d85588
RK
48 {<img class=button width=@width height=@height
49 src="@image{no@dir}">}}
1a3dba67 50
2257512d
RK
51 @include{macros.tmpl}
52}@#
460b9539 53<html>
54 <head>
2257512d 55@include{stdhead.tmpl}@#
04024c2c 56 <title>@if{@isplaying}
2257512d
RK
57 {@playing{@part{@id}{title}}}
58 {@label{playing.title}}</title>
460b9539 59 </head>
60 <body>
04024c2c
RK
61@include{topbar.tmpl}
62 <h1>@label{playing.title}</h1>
460b9539 63
04024c2c 64@# Extra control buttons for the management page
2257512d 65 @ifmanage{
328248ba 66 <div class=mgmt>
1a3dba67
RK
67 <p class=mgmt>
68 @if{@paused}
69 {@onoff{class}{resume}{enabled}}
70 {@onoff{class}{pause}{disabled}}
71 @if{@random-enabled}
72 {@onoff{random}{randomdisable}{enabled}}
73 {@onoff{random}{randomenable}{disabled}}
74 @if{@enabled}
75 {@onoff{playing}{disable}{enabled}}
76 {@onoff{playing}{enable}{disabled}}
77 <form class=volume method=POST
78 action="@url"
79 enctype="multipart/form-data" accept-charset=utf-8>
80 <span class=volume>
81 @label{playing.volume}
82 @vbutton{up}{+}
83 @label{volume.left}
84 <input size=3 name=left type=text value="@volume{left}">
85 @label{volume.right}
86 <input size=3 name=right type=text value="@volume{right}">
87 <input name=back type=hidden value="@thisurl@?back=manage">
88 @right{volume}{
89 <button class=search name=submit type=submit>
90 @label{volume.set}
91 </button>
92 <input name=action type=hidden value=volume>
93 }
94 @vbutton{down}{-}
95 </span>
96 </form>
97 </p>
328248ba 98 </div>
2257512d 99 }{}
460b9539 100
04024c2c
RK
101@# Only display the table if there is something to put in it
102@if{@or{@isplaying}{@isqueue}}{
460b9539 103 <table class=playing>
104 <tr class=headings>
04024c2c
RK
105 <th class=when>@label{heading.when}</th>
106 <th class=who>@label{heading.who}</th>
107 <th class=artist>@label{heading.artist}</th>
108 <th class=album>@label{heading.album}</th>
109 <th class=title>@label{heading.title}</th>
110 <th class=length>@label{heading.length}</th>
460b9539 111 <th class=button>&nbsp;</th>
2257512d 112 @ifmanage{
1a3dba67
RK
113 <th class=imgbutton>&nbsp;</th>
114 <th class=imgbutton>&nbsp;</th>
115 <th class=imgbutton>&nbsp;</th>
116 <th class=imgbutton>&nbsp;</th>
2257512d 117 }{}
460b9539 118 </tr>
af106f2d
RK
119 @if{@isplaying}{
120 <tr class=nowplaying>
1a3dba67 121 <td colspan=@ifmanage{11}{7}>@label{playing.now}</td>
af106f2d
RK
122 </tr>
123 }
2257512d 124 @playing{
af106f2d 125 <tr class=playing>
1a3dba67
RK
126 <td class=when>@mwhen{playing}{@id}</td>
127 <td class=who>@mwho{playing}{@id}</td>
128 <td class=artist>@martist{playing}{@track}</td>
129 <td class=album>@malbum{playing}{@track}</td>
130 <td class=title>@mtitle{playing}{@track}</td>
131 <td class=length>@length{@id}</td>
132 <td class=imgbutton>@mremove{playing}{@id}</td>
133 @ifmanage{
134 <td class=imgbutton>&nbsp;</td>
135 <td class=imgbutton>&nbsp;</td>
136 <td class=imgbutton>&nbsp;</td>
137 <td class=imgbutton>&nbsp;</td>
138 }{}
af106f2d 139 </tr>
2257512d 140 }
460b9539 141 @if{@isqueue@}{
af106f2d 142 <tr class=next>
1a3dba67 143 <td colspan=@ifmanage{11}{7}@>@label{playing.next}</td>
af106f2d 144 </tr>
2257512d 145 }
460b9539 146 @queue{
af106f2d 147 <tr class=@parity@>
1a3dba67
RK
148 <td class=when>@mwhen{queue}{@id}</td>
149 <td class=who>@mwho{queue}{@id}</td>
150 <td class=artist>@martist{queue}{@track}</td>
151 <td class=album>@malbum{queue}{@track}</td>
152 <td class=title>@mtitle{queue}{@track}</td>
153 <td class=length>@length</td>
154 <td class=imgbutton>@mremove{queue}{@id}</td>
155 @ifmanage{
156 <td class=imgbutton>@mmove{@id}{upall}{2147483647}</td>
157 <td class=imgbutton>@mmove{@id}{up}{1}</td>
158 <td class=imgbutton>@mmove{@id}{down}{-1}</td>
159 <td class=imgbutton>@mmove{@id}{downall}{-2147483647}</td>
160 }
af106f2d 161 </tr>
2257512d 162 }
460b9539 163 </table>
2257512d 164}
460b9539 165
a2c4ad5f 166@include{topbarend.tmpl}@#
460b9539 167 </body>
168</html>
2257512d 169@discard{
460b9539 170Local variables:
171mode:sgml
172sgml-always-quote-attributes:nil
173sgml-indent-step:1
174sgml-indent-data:t
175End:
2257512d 176}@