chiark / gitweb /
Macro-ize (most) <A>-based buttons
[disorder] / templates / playing.tmpl
index 5a767e454164e2dd3508cc8cc08ec7674a657952..a7bb804cd4900f83c3b012e2c88be8066d265623 100644 (file)
@@ -25,11 +25,9 @@ USA
   @#  @action should be the action to switch to the opposite state
   @#  @state should be the current state
   @define {onoff} {class action state}
-          {<a class=button
-              href="@url?action=@action@back"
-              title="@label{playing.@q{action}verbose}">
-             @label{playing.@class}
-           </a>
+          {@actbutton{@label{playing.@class}}
+                     {@label{playing.@q{@action}verbose}}
+                     {@action}
            <img width=@width height=@height class=imgbutton
                 src="@image{@state}">}
 
@@ -74,8 +72,8 @@ USA
    <div class=mgmt>
      <p class=mgmt>
        @if{@paused}
-         {@onoff{class}{resume}{enabled}}
-         {@onoff{class}{pause}{disabled}}
+         {@onoff{pause}{resume}{enabled}}
+         {@onoff{pause}{pause}{disabled}}
        @if{@random-enabled}
          {@onoff{random}{randomdisable}{enabled}}
          {@onoff{random}{randomenable}{disabled}}
@@ -92,11 +90,9 @@ USA
           <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?back=manage">
+          <input name=back type=hidden value="@quote{@thisurl}">
           @right{volume}{
-            <button class=search name=submit type=submit>
-               @label{volume.set}
-            </button>
+             @submit{@label{volume.set}}
             <input name=action type=hidden value=volume>
           }
           @vbutton{down}{-}