X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/04024c2cafab56ea76a9a2b35097584d6db98c06..5dcfc065d123f6643b12ed1766c7976e58b6941a:/templates/playing.tmpl diff --git a/templates/playing.tmpl b/templates/playing.tmpl index c016858..b8c80bd 100644 --- a/templates/playing.tmpl +++ b/templates/playing.tmpl @@ -1,126 +1,105 @@ -@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} + {@actbutton{@label{playing.@class}} + {@label{playing.@q{@action}verbose}} + {@action} + } + + @# 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}} + + @ifmanage{ + @define {back} {} {&back=manage} + @define {formback} {} {} + }{} +}@#
-@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}} +
+