-@include{macros.tmpl}@#
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!--
This file is part of DisOrder.
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
-->
+@discard{
+ @define {ifmanage} {yes no}
+ {@if {@eq {@arg{action}}{manage}}
+ {@yes}
+ {@no}}
+ @define {back} {}
+ {@ifmanage{&back=manage}{}}
+ @include{macros.tmpl}
+}@#
<html>
<head>
-@include{stdhead.tmpl}
+@include{stdhead.tmpl}@#
<title>@if{@isplaying}
- {@part{@playing}{title}@label{playing.title}}</title>
+ {@playing{@part{@id}{title}}}
+ {@label{playing.title}}</title>
</head>
<body>
@include{topbar.tmpl}
<h1>@label{playing.title}</h1>
@# Extra control buttons for the management page
- @if{@arg{mgmt}}{
+ @ifmanage{
<div class=mgmt>
<p class=mgmt>
@if{@paused}{
@# Paused
<a class=button
- href="@url?action=resume&mgmt=true"
+ href="@url?action=resume@back"
title="@label{playing.resumeverbose}">@label{playing.pause}</a>
</a>
<img width=16 height=16 class=imgbutton src="@image{enabled}">
}{
@# Not paused
<a class=button
- href="@url?action=pause&mgmt=true"
+ href="@url?action=pause@back"
title="@label{playing.pauseverbose}">@label{playing.pause}</a>
</a>
<img width=16 height=16 class=imgbutton src="@image{disabled}">
@if{@random-enabled}{
@# Random play enabled
<a class=button
- href="@url?action=random-disable&mgmt=true"
+ href="@url?action=random-disable@back"
title="@label{playing.randomdisableverbose}">@label{playing.random}</a>
</a>
<img width=16 height=16 class=imgbutton src="@image{enabled}">
}{
@# Random play disabled
<a class=button
- href="@url?action=random-enable&mgmt=true"
+ href="@url?action=random-enable@back"
title="@label{playing.randomenableverbose}">@label{playing.random}</a>
</a>
<img width=16 height=16 class=imgbutton src="@image{disabled}">
@if{@enabled}{
@# Play enabled
<a class=button
- href="@url?action=disable&mgmt=true"
+ href="@url?action=disable@back"
title="@label{playing.disableverbose}">@label{playing.playing}</a>
</a>
<img width=16 height=16 class=imgbutton src="@image{enabled}">
}{
-@# Play disbaled
+@# Play disabled
<a class=button
- href="@url?action=enable&mgmt=true"
+ href="@url?action=enable@back"
title="@label{playing.enableverbose}">@label{playing.playing}</a>
</a>
<img width=16 height=16 class=imgbutton src="@image{disabled}">
}
-@3 Volume form
+@# Volume form
<form class=volume action="@url" method=POST
enctype="multipart/form-data" accept-charset=utf-8>
<span class=volume>
@# Volume up button
@right{volume}{
<a class=imgbutton
- href="@url?action=volume&delta=-@label{volume.resolution}&back=manage">
+ href="@url?action=volume&delta=-@label{volume.resolution}@back">
<img class=button src="@image{down}"
alt="@label{volume.reduce}"
title="@label{volume.reduceverbose}">
@# Volume value widgets
@label{volume.left} <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@?mgmt=true">
+ <input name=back type=hidden value="@thisurl@?back=manage">
@# Volume set button
@right{volume}{
<button class=search name=submit type=submit>
@# Volume down button
@right{volume}{
<a class=imgbutton
- href="@url?action=volume&delta=@label{volume.resolution}&back=manage">
+ href="@url?action=volume&delta=@label{volume.resolution}@back">
<img class=button
src="@image{up}"
alt="@label{volume.increase}"
</span>
</p>
</div>
- }
+ }{}
@# Only display the table if there is something to put in it
@if{@or{@isplaying}{@isqueue}}{
<th class=title>@label{heading.title}</th>
<th class=length>@label{heading.length}</th>
<th class=button> </th>
- @if{@arg{mgmt}}{
+ @ifmanage{
<th class=imgbutton> </th>
<th class=imgbutton> </th>
<th class=imgbutton> </th>
<th class=imgbutton> </th>
- }@
+ }{}
</tr>
- @if{@isplaying}{
+ @playing{
<tr class=nowplaying>
- <td colspan=@if{@arg{mgmt}}{11}{7}@>@label{playing.now}</td>
+ <td colspan=@ifmanage{11}{7}>@label{playing.now}</td>
</tr>
- @playing{
<tr class=playing>
- <td class=when>@when@</td>
- <td class=who>@if{@eq{@who@}{}@}{@if{@eq{@state@}{random}@}{@label{playing.randomtrack}}{ }@}{@who@}@</td>
- <td class=artist>@right{play}{<a class=directory
- href="@url?action=choose&directory=@urlquote{@dirname{@dirname{@part:path@}@}@}@"
- title="@label{playing.artistverbose}"
- >@part{short}{artist}@</a>}{<span class=directory
- title="@part{artist}@"
- >@part{short}{artist}@</span>}@</td>
- <td class=album>@right{play}{<a class=directory
- href="@url?action=choose&directory=@urlquote{@dirname{@part:path@}@}@"
- title="@label{playing.albumverbose}"
- >@part{short}{album}@</a>}{<span class=directory
- title="@part{album}@"
- >@part{short}{album}@</span>}@</td>
- <td class=title><span
- title="@part{title}@">@part{short}{title}@</span></td>
- <td class=length>@length@</td>
- <td class=imgbutton>@if{@scratchable@}{<a class=imgbutton
- href="@url?action=scratch&id=@id@&mgmt=@arg{mgmt}"><img
- class=button src="@image{scratch}"
- title="@label{playing.scratchverbose}"
- alt="@label{playing.scratch}"></a>}{<img
- class=button src="@image{noscratch}"
- title="@label{playing.scratchverbose}"
- alt="@label{playing.scratch}">}@</td>
- @if{@arg{mgmt}}{
+ <td class=when>@when{@id}</td>
+ <td class=who>@if{@eq{@who{@id}}{}}
+ {@if{@eq{@state{@id}}{random}}
+ {@label{playing.randomtrack}}
+ { }}
+ {@who{@id}}
+ </td>
+ <td class=artist>@right{play}
+ {<a class=directory
+ href="@url?action=choose&directory=@urlquote{@dirname{@dirname{@track}}}"
+ title="@label{playing.artistverbose}">@part{@id}{short}{artist}</a>}
+ {<span class=directory
+ title="@part{artist}@">@part{short}{artist}</span>}
+ </td>
+ <td class=album>@right{play}
+ {<a class=directory
+ href="@url?action=choose&directory=@urlquote{@dirname{@track}}"
+ title="@label{playing.albumverbose}">@part{short}{album}</a>}
+ {<span class=directory
+ title="@part{album}@">@part{short}{album}</span>}
+ </td>
+ <td class=title><span title="@part{@id}{title}">@part{@id}{short}{title}</span></td>
+ <td class=length>@length{@id}</td>
+ <td class=imgbutton>@if{@removabl{@id}}
+ {<a class=imgbutton
+ href="@url?action=scratch&id=@id@back">
+ <img class=button src="@image{scratch}"
+ title="@label{playing.scratchverbose}"
+ alt="@label{playing.scratch}"></a>}
+ {<img class=button src="@image{noscratch}"
+ title="@label{playing.scratchverbose}"
+ alt="@label{playing.scratch}">}
+ </td>
+ @ifmanage{
<td class=imgbutton> </td>
<td class=imgbutton> </td>
<td class=imgbutton> </td>
<td class=imgbutton> </td>
- }@
+ }{}
</tr>
- }@}@
+ }
@if{@isqueue@}{
<tr class=next>
- <td colspan=@if{@arg{mgmt}}{11}{7}@>@label{playing.next}</td>
+ <td colspan=@ifmanage{11}{7}@>@label{playing.next}</td>
</tr>
+ }
@queue{
<tr class=@parity@>
- <td class=when>@when@</td>
- <td class=who>@if{@eq{@who@}{}@}{@if{@eq{@state@}{random}@}{@label{queue.randomtrack}}{ }@}{@who@}@</td>
+ <td class=when>@when</td>
+ <td class=who>@if{@eq{@who@}{}@}{@if{@eq{@state@}{random}@}{@label{queue.randomtrack}}{ }@}{@who@}</td>
<td class=artist>@right{play}{<a class=directory
- title="@part{artist}@"
- href="@url?action=choose&directory=@urlquote{@dirname{@dirname{@part:path@}@}@}@"
- >@part{short}{artist}@</a>}{<span class=directory
- title="@part{artist}@"
- >@part{short}{artist}@</span>}@</td>
+ title="@part{@id}{artist}@"
+ href="@url?action=choose&directory=@urlquote{@dirname{@dirname{@track}@}@}@"
+ >@part{@id}{short}{artist}</a>}{<span class=directory
+ title="@part{@id}{artist}@"
+ >@part{@id}{short}{artist}</span>}</td>
<td class=album>@right{play}{<a class=directory
- title="@part{album}@"
- href="@url?action=choose&directory=@urlquote{@dirname{@part:path@}@}@"
- >@part{short}{album}@</a>}{<span class=directory
- title="@part{album}@"
- >@part{short}{album}@}@</td>
+ title="@part{@id}{album}@"
+ href="@url?action=choose&directory=@urlquote{@dirname{@track}@}@"
+ >@part{@id}{short}{album}</a>}{<span class=directory
+ title="@part{@id}{album}@"
+ >@part{@id}{short}{album}@}</td>
<td class=title><span
- title="@part{title}@">@part{short}{title}@</span></td>
- <td class=length>@length@</td>
+ title="@part{@id}{title}@">@part{@id}{short}{title}</span></td>
+ <td class=length>@length</td>
<td class=imgbutton>@if{@removable@}{<a class=imgbutton
- href="@url?action=remove&id=@id@&mgmt=@arg{mgmt}"><img
+ href="@url?action=remove&id=@id@@back"><img
class=button src="@image{scratch}"
title="@label{playing.removeverbose}"
alt="@label{playing.remove}"></a>}{<img
class=button src="@image{noscratch}"
title="@label{playing.removeverbose}"
- alt="@label{playing.remove}">}@</td>
+ alt="@label{playing.remove}">}</td>
- @if{@arg{mgmt}}{
+ @if{@eq{@arg{action}}{manage}}{
@if{@or{@isfirst@}
{@not{@movable@}@}@}{
<!-- cannot move up -->
<!-- can move up -->
<td class=imgbutton>
<a class=imgbutton
- href="@url?action=move&id=@id@&delta=2147483647&mgmt=true"><img
+ href="@url?action=move&id=@id@&delta=2147483647@back"><img
class=button src="@image{upall}"
title="@label{playing.upallverbose}"
alt="@label{playing.upall}"></a>
<td class=imgbutton>
<a class=imgbutton
- href="@url?action=move&id=@id@&delta=1&mgmt=true"><img
+ href="@url?action=move&id=@id@&delta=1@back"><img
class=button src="@image{up}"
title="@label{playing.upverbose}" alt="@label{playing.up}"></a>
- }@
+ }
@if{@or{@islast@}
{@not{@movable@}@}@}{
<!-- can move down -->
<td class=imgbutton>
<a class=imgbutton
- href="@url?action=move&id=@id@&delta=-2147483647&mgmt=true"><img
+ href="@url?action=move&id=@id@&delta=-2147483647@back"><img
class=button src="@image{downall}"
title="@label{playing.downallverbose}"
alt="@label{playing.downall}"></a>
<td class=imgbutton>
<a class=imgbutton
- href="@url?action=move&id=@id@&delta=-1&mgmt=true"><img
+ href="@url?action=move&id=@id@&delta=-1@back"><img
class=button src="@image{down}"
title="@label{playing.downverbose}" alt="@label{playing.down}"></a>
- }@
-
- }@
+ }
+ }
</tr>
- }@}@
+ }
</table>
-}@
+}
-@include{topbarend}@
+@include{topbarend}@#
</body>
</html>
-@@
-<!--
+@discard{
Local variables:
mode:sgml
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
End:
--->
+}@