size=50>
@submit{@label{search.search}}
<input name=action type=hidden value=choose>
- <a class=button
- href="@url?action=choose">
- @label{search.clear}
- </a>
+ @actbutton{@label{search.clear}}{}{choose}
</p>
</form>
@define {submit} {text}
{<span class=buttonouter><button class=button name=submit type=submit><span class=buttoninner>@text</span></button></span>}
+@# Expand to an action button
+@# @text is the text to put inside the button
+@# @long is the text to put in the caption
+@# @action is the target action
+@define {actbutton} {text long action}
+ {<a class=button
+ href="@url?action=@action@back"
+ title="@long">@text</a>}
+
+@# Expands to &back=manage or to nothing depending on context;
+@# see playing.tmpl.
+@define {back} {} {}
+
Local variables:
mode:sgml
sgml-always-quote-attributes:nil
@# @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}">}