X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/2257512d31e410938ae2f7f7f511830989c58f7f..30d855885418ebe3e7bf76fd800909cdf7bb178a:/templates/playing.tmpl diff --git a/templates/playing.tmpl b/templates/playing.tmpl index 084f5c3..bd1f635 100644 --- a/templates/playing.tmpl +++ b/templates/playing.tmpl @@ -19,12 +19,35 @@ 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}{}} + + @# 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} + { + + } + {}} + @include{macros.tmpl} }@# @@ -41,93 +64,37 @@ USA @# Extra control buttons for the management page @ifmanage{
- @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 disabled - @label{playing.playing} - - - } -@# Volume form -
- - ++ @if{@paused} + {@onoff{class}{resume}{enabled}} + {@onoff{class}{pause}{disabled}} + @if{@random-enabled} + {@onoff{random}{randomdisable}{enabled}} + {@onoff{random}{randomenable}{disabled}} + @if{@enabled} + {@onoff{playing}{disable}{enabled}} + {@onoff{playing}{enable}{disabled}} +
+