X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/04024c2cafab56ea76a9a2b35097584d6db98c06..2b33c4cf27ec6f4bd73c16ed1395eab209dec51f:/templates/playing.tmpl diff --git a/templates/playing.tmpl b/templates/playing.tmpl index c016858..bc0200e 100644 --- a/templates/playing.tmpl +++ b/templates/playing.tmpl @@ -1,4 +1,3 @@ -@include{macros.tmpl}@# +@discard{ + + @# On/off button for pause etc + @# @class should be the class: pause, random, playing + @# @action should be the action to switch to the opposite state + @# @state should be the current state + @define {onoff} {class action state} + { + @label{playing.@class} + + } + + @# Volume up/down buttons + @# @dir is the direction: up or down + @# @sign is the sign: + or - + @define {vbutton}{dir sign} + {@right{volume} + { + + } + {}} + + @# Expand to @yes for the Manage page and @no for the playing page + @define {ifmanage} {yes no} + {@if {@eq {@arg{action}}{manage}} + {@yes} + {@no}} + + @# Expand to &back=manage or to nothing + @define {back} {} + {@ifmanage{&back=manage}{}} +}@#
-@include{stdhead.tmpl} +@quiethead- @if{@paused}{ -@# Paused - @label{playing.pause} - - - }{ -@# Not paused - @label{playing.pause} - - - } - @if{@random-enabled}{ -@# Random play enabled - @label{playing.random} - - - }{ -@# Random play disabled - @label{playing.random} - - - } - @if{@enabled}{ -@# Play enabled - @label{playing.playing} - - - }{ -@# Play disbaled - @label{playing.playing} - - - } -@3 Volume form -
- - ++ @if{@paused} + {@onoff{pause}{resume}{enabled}} + {@onoff{pause}{pause}{disabled}} + @if{@random-enabled} + {@onoff{random}{randomdisable}{enabled}} + {@onoff{random}{randomenable}{disabled}} + @if{@enabled} + {@onoff{playing}{disable}{enabled}} + {@onoff{playing}{enable}{disabled}} +
+