X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/0d0253c93a64d2b5206e902c648e1e2c6bc5d510..05b75f8d50b83e943af3be4071449304d82dbdcd:/templates/macros.tmpl
diff --git a/templates/macros.tmpl b/templates/macros.tmpl
index 1a6554d..1bfd97f 100644
--- a/templates/macros.tmpl
+++ b/templates/macros.tmpl
@@ -36,30 +36,28 @@ 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
@@ -71,16 +69,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
@@ -114,10 +111,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
@@ -125,16 +122,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
@@ -171,3 +174,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}
+ {
+