X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/99955407d05eb81a81b410cd4b6d182f64e1ff57..05b75f8d50b83e943af3be4071449304d82dbdcd:/templates/macros.tmpl diff --git a/templates/macros.tmpl b/templates/macros.tmpl index c3b7ed8..1bfd97f 100644 --- a/templates/macros.tmpl +++ b/templates/macros.tmpl @@ -52,6 +52,7 @@ and then redefines macros as desired. @menuitem{@current}{recent}{true} @menuitem{@current}{choose}{@right{play}} @menuitem{@current}{manage}{true} +@menuitem{@current}{new}{true} @menuitem{@current}{login}{true} @menuitem{@current}{help}{true} @menuitem{@current}{about}{true} @@ -69,8 +70,8 @@ and then redefines macros as desired. @define {menuitem} {current name available} {@if{@available} { @part{@track}{artist}{short}} + href="@url?action=choose&dir=@urlquote{@dirname{@dirname{@track}}}" + title="@label{playing.artistverbose}">@part{@track}{artist}{short}} {@part{@track}{artist}{short}}} @@ -121,8 +122,8 @@ and then redefines macros as desired. @define {malbum} {what track} {@right{play} {@part{@track}{album}{short}} + href="@url?action=choose&dir=@urlquote{@dirname{@track}}" + title="@label{playing.albumverbose}">@part{@track}{album}{short}} {@part{@track}{album}{short}}} @@ -132,6 +133,12 @@ and then redefines macros as desired. @define {mtitle} {what track} {@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 @# @id is the track ID @@ -168,6 +175,75 @@ and then redefines macros as desired. 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} + { +

Preferences for @quote{@resolve{@track}}:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@label{prefs.name}@label{prefs.value}
@label{heading.title} + +
@label{heading.album} + +
@label{heading.artist} + +
@label{prefs.tags} + +
@label{prefs.weight} + +
@label{prefs.random} + +
+} + Local variables: mode:sgml sgml-always-quote-attributes:nil