X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/b43dc0cc5003562a37b52e744fd3d3e3b12b3c06..02eaa49dd0cc62690c72e28f456326a249325f31:/templates/macros.tmpl
diff --git a/templates/macros.tmpl b/templates/macros.tmpl
index b471599..3e2bc0b 100644
--- a/templates/macros.tmpl
+++ b/templates/macros.tmpl
@@ -36,29 +36,27 @@ and then redefines macros as desired.
@# @name is the name of this page, for the
element
@define {stdhead} {name}
{@quiethead
-
@label{@name.title}}
@# Non-displaying text
@define {quiethead} {}
- {}
+ { }
@# Standard menu
@# @current is the name of the current page, e.g. choosealpha, login
@define {stdmenu} {current}
- {
-
+
+
}
@# Menu entry
@@ -70,16 +68,15 @@ and then redefines macros as desired.
@#
@define {menuitem} {current name available}
{@if{@available}
- { }
- {
- @label{menu.@name}}}
+ { @label{menu.@name}}
+ { @label{menu.@name}}}
@# Standard footer text
@@ -113,10 +110,10 @@ and then redefines macros as desired.
@define {martist} {what track}
{@right{play}
{@part{@track}{short}{artist}}
+ href="@url?action=choose&dir=@urlquote{@dirname{@dirname{@track}}}"
+ title="@label{playing.artistverbose}">@part{@track}{artist}{short}}
{@part{@track}{short}{artist}}}
+ title="@part{@track}{artist}">@part{@track}{artist}{short}}}
@# Expand to the album for @track
@# @what is the section
@@ -124,16 +121,22 @@ and then redefines macros as desired.
@define {malbum} {what track}
{@right{play}
{@part{@track}{short}{album}}
+ href="@url?action=choose&dir=@urlquote{@dirname{@track}}"
+ title="@label{playing.albumverbose}">@part{@track}{album}{short}}
{@part{@track}{short}{album}}}
+ title="@part{@track}{album}">@part{@track}{album}{short}}}
@# Expand to the title for @track
@# @what is the section
@# @track is the track name
@define {mtitle} {what track}
- {@part{@track}{short}{title}}
+ {@part{@track}{title}{short}}
+
+@# As @mtitle but make a link to play the track
+@# @what is the section
+@# @track is the track name
+@define {mtitleplay} {what track}
+ {@part{@track}{title}{short}}
@# Expand to the remove/scratch entry for @id
@# @what is the section
@@ -170,3 +173,81 @@ and then redefines macros as desired.
width=@width height=@height
title="@label{playing.@q{@dir}verbose}"
alt="@label{playing.@dir}">}}
+
+@# Size of input box for preferences forms
+@define{prefsize}{}{40}
+
+@# Expand to the weight of a track. This macro knows the default weight,
+@# and does two lookups, which is rather inelegant.
+@# @track is the track name.
+@define{weight}{track}{@if{@eq{@pref{@track}{weight}}{}}
+ {90000}
+ {@pref{@track}{weight}}}
+
+@# Expand to preference form section for a track
+@# @index is the track number
+@# @track is the track name
+@define {mprefs} {index track}
+ {
+