@# @action should be the action to switch to the opposite state
@# @state should be the current state
@define {onoff} {class action state}
- {<a class=button
- href="@url?action=@action@back"@class}@q{@state
- title="@label{playing.@q{action}verbose}">
- @label{playing.@class}
- </a>
+ {@actbutton{@label{playing.@class}}
+ {@label{playing.@q{@action}verbose}}
+ {@action}
<img width=@width height=@height class=imgbutton
src="@image{@state}">}
{<a class=imgbutton
href="@url?action=volume&delta=@sign@label{volume.resolution}@back">
<img class=button src="@image{@dir}"
+ width=@width height=@height
alt="@label{volume.@dir}"
title="@label{volume.@q{@dir}verbose}">
</a>}
- {<img class=button src="@image{no@dir}">}}
+ {<img class=button width=@width height=@height
+ src="@image{no@dir}">}}
- @include{macros.tmpl}
+ @# Expand to @yes for the Manage page and @no for the playing page
+ @define {ifmanage} {yes no}
+ {@if {@eq {@arg{action}}{manage}}
+ {@yes}
+ {@no}}
+
+ @ifmanage{
+ @define {back} {} {&back=manage}
+ @define {formback} {} {<input type=hidden name=back value=manage>}
+ }{}
}@#
<html>
<head>
-@include{stdhead.tmpl}@#
+@quiethead
<title>@if{@isplaying}
{@playing{@part{@id}{title}}}
{@label{playing.title}}</title>
</head>
<body>
-@include{topbar.tmpl}
+@stdmenu{@ifmanage{manage}{playing}}
<h1>@label{playing.title}</h1>
@# Extra control buttons for the management page
<div class=mgmt>
<p class=mgmt>
@if{@paused}
- {@onoff{class}{resume}{enabled}}
- {@onoff{class}{pause}{disabled}}
+ {@onoff{pause}{resume}{enabled}}
+ {@onoff{pause}{pause}{disabled}}
@if{@random-enabled}
{@onoff{random}{randomdisable}{enabled}}
{@onoff{random}{randomenable}{disabled}}
<input size=3 name=left type=text value="@volume{left}">
@label{volume.right}
<input size=3 name=right type=text value="@volume{right}">
- <input name=back type=hidden value="@thisurl@?back=manage">
+ <input name=back type=hidden value="@quote{@thisurl}">
@right{volume}{
- <button class=search name=submit type=submit>
- @label{volume.set}
- </button>
+ @submit{@label{volume.set}}
<input name=action type=hidden value=volume>
}
@vbutton{down}{-}
}{}
</tr>
}
- @if{@isqueue@}{
- <tr class=next>
- <td colspan=@ifmanage{11}{7}@>@label{playing.next}</td>
- </tr>
+ @if{@isqueue}{
+ <tr class=next>
+ <td colspan=@ifmanage{11}{7}>@label{playing.next}</td>
+ </tr>
}
@queue{
- <tr class=@parity@>
- <td class=when>@mwhen{queue}{@id}</td>
- <td class=who>@mwho{queue}{@id}</td>
- <td class=artist>@martist{queue}{@track}</td>
- <td class=album>@malbum{queue}{@track}</td>
- <td class=title>@mtitle{queue}{@track}</td>
- <td class=length>@length</td>
- <td class=imgbutton>@mremove{queue}{@id}</td>
- @ifmanage{
- <td class=imgbutton>@mmove{@id}{upall}{2147483647}</td>
- <td class=imgbutton>@mmove{@id}{up}{1}</td>
- <td class=imgbutton>@mmove{@id}{down}{-1}</td>
- <td class=imgbutton>@mmove{@id}{downall}{-2147483647}</td>
- }
- </tr>
- }
+ <tr class=@parity>
+ <td class=when>@mwhen{queue}{@id}</td>
+ <td class=who>@mwho{queue}{@id}</td>
+ <td class=artist>@martist{queue}{@track}</td>
+ <td class=album>@malbum{queue}{@track}</td>
+ <td class=title>@mtitle{queue}{@track}</td>
+ <td class=length>@length{@id}</td>
+ <td class=imgbutton>@mremove{queue}{@id}</td>
+ @ifmanage{
+ <td class=imgbutton>@mmove{@id}{upall}{2147483647}</td>
+ <td class=imgbutton>@mmove{@id}{up}{1}</td>
+ <td class=imgbutton>@mmove{@id}{down}{-1}</td>
+ <td class=imgbutton>@mmove{@id}{downall}{-2147483647}</td>
+ }{}
+ </tr>
+ }
</table>
}
-@include{topbarend.tmpl}@#
+@credits
</body>
</html>
@discard{
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
+indent-tabs-mode:nil
End:
-}@
+}@#