X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/af106f2dee658f1605891b4c69ca1036946c5147..1a3dba678a4edf1df3d7de2cc29f8e32d6fea080:/templates/playing.tmpl
diff --git a/templates/playing.tmpl b/templates/playing.tmpl
index c910120..ba8af01 100644
--- a/templates/playing.tmpl
+++ b/templates/playing.tmpl
@@ -19,6 +19,33 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
-->
@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}
+ {
+
+ }
+ {
}}
+
@include{macros.tmpl}
}@#
@@ -35,97 +62,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}} +
+