This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- USA
+
This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU
+ General Public License as published by the Free Software Foundation;
+ either version 2 of the License, or (at your option) any later version.
-@include{topbarend}@
+
This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+
You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc., 59
+ Temple Place, Suite 330, Boston, MA 02111-1307 USA
@#{always have the first-letter bar, if choosealpha enabled}@
@@ -146,15 +145,16 @@ USA
}@
-@include{topbarend}@
+@credits
-@@
-
+}@#
diff --git a/templates/choosealpha.tmpl b/templates/choosealpha.tmpl
deleted file mode 100644
index 4027834..0000000
--- a/templates/choosealpha.tmpl
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-
-
-@include:stdhead@
- @label:choose.title@
-
-
-@include{topbar}@
-
@label:choose.title@
-
-
- A |
- B |
- C |
- D |
- E |
- F |
- G |
- H |
- I |
- J |
- K |
- L |
- M |
- N |
- O |
- P |
- Q |
- R |
- S |
- T |
- U |
- V |
- W |
- X |
- Y |
- Z |
- *
-
-
-@include{topbarend}@
-
-
-@@
-
diff --git a/templates/credits.tmpl b/templates/credits.tmpl
deleted file mode 100644
index cb8d48f..0000000
--- a/templates/credits.tmpl
+++ /dev/null
@@ -1,26 +0,0 @@
-@discard{
-This file is part of DisOrder.
-Copyright (C) 2004-2008 Richard Kettlewell
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-USA
--->
-}@#
-
@@ -48,8 +47,8 @@ USA
being listed first.) Where possible, estimated start times are
given.
-
Each track has a
+
Each track has a
button next to it. For the currently playing track this can be
used to stop playing the track before it has finished; this is
called “scratching”. For a track in the queue it
@@ -76,32 +75,32 @@ USA
Pause. This button can be used to pause playing (provided the
- player supports it). indicates that playing is paused,
- that it is not.
+ player supports it). indicates that playing is paused,
+ that it is not.
Enable/disable random play. If disabled then queued tracks
will still be played but if the queue is empty nothing will be
- picked at random. indicates that random play is
- enabled, that it is disabled.
+ picked at random. indicates that random play is
+ enabled, that it is disabled.
Enable/disable play. If disabled then tracks in the queue
will not be played, but will remain in the queue instead.
- indicates that play is enabled, that it is
+ width=@width height=@height class=imgbutton src="@image{enabled}">
+ indicates that play is enabled, that it is
disabled.
Volume control. You can use the and buttons to increase or
+ src="@image{up}"
+ title="@label{volume.up}"
+ alt="@label{volume.up}"> and buttons to increase or
decrease the volume, or enter new volume settings for the left
and/or right speakers.
@@ -110,15 +109,15 @@ USA
Below this is the same table of current and queued tracks as for
the main playing screen, but with extra buttons for managing the
queue.
- The and buttons on each track move that
+ The and buttons on each track move that
track around in the queue. Similarly the and buttons move each track to the head or
+ src="@image{upall}" title="@label{playing.upall}"
+ alt="@label{playing.upall}"> and buttons move each track to the head or
tail of the queue.
If you are not logged in, or if your user has limited rights,
@@ -133,15 +132,15 @@ USA
This screen displays recently played tracks, most recent first.
- The
+ The
button can be used to edit the details for a track; see Editing Preferences below.
The number of tracks remembered is controlled by the server
configuration. See the history
option in disorder_config(5) for
+ href="@url?action=disorder_config.5">disorder_config(5) for
more details.
@@ -152,15 +151,15 @@ USA
This screen displays tracks recently added to the database,
most recent first. The button can be used to edit the details
+ src="@image{edit}" title="@label{choose.prefs}"
+ alt="@label{choose.prefs}"> button can be used to edit the details
for a track; see Editing Preferences below,
and clicking on the track title will add it to the queue.
The time tracks are remembered for is controlled by the server
configuration. See the noticed_history option in disorder_config(5) for
+ href="@url?action=disorder_config.5">disorder_config(5) for
more details.
This button can be used to edit the details for a
track; see Editing Preferences below.
@@ -192,9 +191,9 @@ USA
This screen has two forms: choose, which give
+ href="@url?action=choose">choose, which give
you all the top-level directories at once, and choosealpha,
+ href="@url?action=choosealpha">choosealpha,
which breaks them down by initial letter.
This screen will may not be available if you are not logged in
@@ -244,7 +243,7 @@ USA
Some keywords, known as “stopwords”, are excluded
from the search, and will never match. See the stopword option in disorder_config(5) for
+ href="@url?action=disorder_config.5">disorder_config(5) for
further details about this.
This screen will may not be available if you are not logged in
@@ -312,37 +311,38 @@ USA
@if{@ne{@label:error@}{error}@}{
@@ -212,15 +211,16 @@ USA
}@
-@include{topbarend}@
+@credits
-@@
-
+}@#
diff --git a/templates/macros.tmpl b/templates/macros.tmpl
index 432cbe3..1a6554d 100644
--- a/templates/macros.tmpl
+++ b/templates/macros.tmpl
@@ -1,5 +1,3 @@
-@discard{
-
This file is part of DisOrder.
Copyright (C) 2008 Richard Kettlewell
@@ -18,19 +16,81 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
+
+------------------------------------------------------------------------
+Standard macros
+
+
+This file is read before any other template. Its output is discarded
+but side effects (definitions of macros) are retained. To override it,
+create /etc/disorder/macros.tmpl that includes this file by absolute path
+and then redefines macros as desired.
+------------------------------------------------------------------------
+
+
@# Standard width and height of an image
@define {width} {} {16}
@define {height} {} {16}
-@# Expand to @yes for the Manage page and @no for the playing page
-@define {ifmanage} {yes no}
- {@if {@eq {@arg{action}}{manage}}
- {@yes}
- {@no}}
+@# Standard text
+@# @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}
+ {
}
@# Expand to the time that @id will be played
@# @what is the section
@@ -111,4 +171,3 @@ USA
width=@width height=@height
title="@label{playing.@q{@dir}verbose}"
alt="@label{playing.@dir}">}}
-}@#
diff --git a/templates/new.tmpl b/templates/new.tmpl
index 73eea2d..2185c4b 100644
--- a/templates/new.tmpl
+++ b/templates/new.tmpl
@@ -20,11 +20,10 @@ USA
-->
-@include:stdhead@
- @label:new.title@
+@stdhead{new}
-@include{topbar}@
+@stdmenu{new}
@label:new.title@
@#{only display the table if there is something to put in it}@
@@ -70,15 +69,16 @@ USA
}@
-@include{topbarend}@
+@credits
-@@
-
+}@#
diff --git a/templates/playing.tmpl b/templates/playing.tmpl
index bd1f635..5d369c0 100644
--- a/templates/playing.tmpl
+++ b/templates/playing.tmpl
@@ -48,17 +48,25 @@ USA
{}}
- @include{macros.tmpl}
+ @# Expand to @yes for the Manage page and @no for the playing page
+ @define {ifmanage} {yes no}
+ {@if {@eq {@arg{action}}{manage}}
+ {@yes}
+ {@no}}
+
+ @# Expand to &back=manage or to nothing
+ @define {back} {}
+ {@ifmanage{&back=manage}{}}
}@#
-@include{stdhead.tmpl}@#
+@quiethead
@if{@isplaying}
{@playing{@part{@id}{title}}}
{@label{playing.title}}
-@include{topbar.tmpl}
+@stdmenu{@ifmanage{manage}{playing}}
@label{playing.title}
@# Extra control buttons for the management page
@@ -163,7 +171,7 @@ USA
}
-@include{topbarend.tmpl}@#
+@credits
@discard{
@@ -172,5 +180,6 @@ mode:sgml
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
+indent-tabs-mode:nil
End:
-}@
+}@#
diff --git a/templates/prefs.tmpl b/templates/prefs.tmpl
index 5e88890..e19d4ac 100644
--- a/templates/prefs.tmpl
+++ b/templates/prefs.tmpl
@@ -20,11 +20,10 @@ USA
-->
-@include:stdhead@
- @label:prefs.title@
+@stdhead{prefs}
-@include{topbar}@
+@stdmenu{prefs}
@#{only display the table if there is something to put in it}@
@@ -70,15 +69,16 @@ USA
}@
-@include{topbarend}@
+@credits
-@@
-
+}@#
diff --git a/templates/search.tmpl b/templates/search.tmpl
index 1b0fa1c..8b836f6 100644
--- a/templates/search.tmpl
+++ b/templates/search.tmpl
@@ -20,11 +20,10 @@ USA
-->
-@include:stdhead@
- @label:search.title@
+@stdhead{search}
-@include{topbar}@
+@stdmenu{search}