return (struct sink *)s;
}
+/* discard sink **************************************************************/
+
+static int sink_discard_write(struct sink attribute((unused)) *s,
+ const void attribute((unused)) *buffer,
+ int nbytes) {
+ return nbytes;
+}
+
+/** @brief Return a sink which discards all output */
+struct sink *sink_discard(void) {
+ struct sink *s = xmalloc(sizeof *s);
+
+ s->write = sink_discard_write;
+ return s;
+}
+
/*
Local Variables:
c-basic-offset:2
struct sink *sink_dynstr(struct dynstr *output);
/* return a sink which appends to @output@. */
+struct sink *sink_discard(void);
+/* reutrn a sink which junks everything */
+
int sink_vprintf(struct sink *s, const char *fmt, va_list ap);
int sink_printf(struct sink *s, const char *fmt, ...)
attribute((format (printf, 2, 3)));
echo "<html>"
echo " <head>"
if $stdhead; then
- echo "@include{stdhead}@"
+ echo "@quiethead"
fi
echo " <title>$title</title>"
echo " </head>"
echo " <body>"
if $stdhead; then
- echo "@include{topbar}@"
+ echo "@stdmenu{}"
fi
printf " <pre class=manpage>"
# this is kind of painful using only BREs
s!</\([bi]\)><\1>!!g'
echo "</pre>"
if $stdhead; then
- echo "@include{topbarend}@"
+ echo "@credits"
fi
echo " </body>"
echo "</html>"
*/
void dcgi_expand(const char *name) {
const char *p;
-
+
+ /* Parse macros first */
+ mx_expand_file("macros.tmpl", sink_discard(), 0);
/* For unknown actions check that they aren't evil */
for(p = name; *p && isalnum((unsigned char)*p); ++p)
;
}
/** @brief Generate an error page */
-void dcgi_error(const char *msg, ...) {
- va_list ap;
-
- va_start(ap, msg);
- byte_xvasprintf(&dcgi_error_string, msg, ap);
- va_end(ap);
+void dcgi_error(const char *key) {
+ dcgi_error_string = xstrdup(key);
dcgi_expand("error");
}
void dcgi_expand(const char *name);
void dcgi_action(const char *action);
-void dcgi_error(const char *msg, ...);
+void dcgi_error(const char *key);
void dcgi_login(void);
void dcgi_lookup(unsigned want);
void dcgi_lookup_reset(void);
dcgi_client = disorder_new(0);
/* Reconnect */
if(disorder_connect_cookie(dcgi_client, dcgi_cookie)) {
- dcgi_error("Cannot connect to server");
+ dcgi_error("connect");
exit(0);
}
/* If there was a cookie but it went bad, we forget it */
char attribute((unused)) **args,
struct sink *output,
void attribute((unused)) *u) {
- return sink_writes(output, cgi_sgmlquote(dcgi_error_string)) < 0 ? -1 : 0;
+ return sink_writes(output, dcgi_error_string) < 0 ? -1 : 0;
}
/* @image{NAME}
# USA
#
-pkgdata_DATA=about.tmpl choose.tmpl credits.tmpl playing.tmpl recent.tmpl \
- stdhead.tmpl stylesheet.tmpl search.tmpl about.tmpl volume.tmpl \
- prefs.tmpl help.tmpl choosealpha.tmpl topbar.tmpl \
- topbarend.tmpl error.tmpl new.tmpl login.tmpl \
- options options.labels \
+pkgdata_DATA=about.tmpl choose.tmpl playing.tmpl recent.tmpl \
+ search.tmpl about.tmpl prefs.tmpl help.tmpl error.tmpl \
+ new.tmpl login.tmpl macros.tmpl \
+ options options.labels \
options.columns
static_DATA=disorder.css
staticdir=${pkgdatadir}/static
-->
<html>
<head>
-@include:stdhead@
- <title>@label:about.title@</title>
+@stdhead{about}
</head>
<body>
-@include{topbar}@
- <p><a
- title="Visit DisOrder web site"
- href="http://www.greenend.org.uk/rjk/disorder/">
- <img
- src="@image:logo@"
- alt="About DisOrder"
- style="border-style:none"></a></p>
- <h2>Copyright</h2>
+@stdmenu{about}
- <p><a
- title="DisOrder web site"
- href="http://www.greenend.org.uk/rjk/disorder/">DisOrder
- version @version@</a> - select and play digital
- audio files</p>
+ <p><a title="Visit DisOrder web site"
+ href="http://www.greenend.org.uk/rjk/disorder/"> <img src="@image{logo}"
+ alt="About DisOrder" style="border-style:none"></a></p>
- <p>Copyright © 2003-2008 <a href="http://www.greenend.org.uk/rjk/">Richard Kettlewell</a><br>
- Portions copyright © 2007 <a href="http://www.chiark.greenend.org.uk/~ryounger/">Ross Younger</a><br>
- Portions copyright © 2007 Mark Wooding</p>
+ <h2>Copyright</h2>
- <p>Portions extracted from
- <a href="http://mpg321.sourceforge.net/">MPG321</a>,
- Copyright © 2001 Joe Drew,
- Copyright © 2000-2001 Robert Leslie</p>
+ <p><a title="DisOrder web site"
+ ref="http://www.greenend.org.uk/rjk/disorder/">DisOrder version @version</a>
+ - software Jukebox</p>
- <p>This program is free software; you can redistribute it and/or
- modify it under the terms of the <a
- href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</a> as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.</p>
+ <p>Copyright © 2003-2008 <a
+ href="http://www.greenend.org.uk/rjk/">Richard Kettlewell</a><br> Portions
+ copyright © 2007 <a
+ href="http://www.chiark.greenend.org.uk/~ryounger/">Ross Younger</a><br>
+ Portions copyright © 2007, 2008 Mark Wooding</p>
- <p>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.</p>
+ <p>Portions extracted from <a
+ href="http://mpg321.sourceforge.net/">MPG321</a>, Copyright © 2001 Joe
+ Drew, Copyright © 2000-2001 Robert Leslie</p>
- <p>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</p>
+ <p>This program is free software; you can redistribute it and/or modify it
+ under the terms of the <a href="http://www.gnu.org/copyleft/gpl.html">GNU
+ General Public License</a> as published by the Free Software Foundation;
+ either version 2 of the License, or (at your option) any later version.</p>
-@include{topbarend}@
+ <p>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.</p>
+
+ <p>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</p>
+
+@credits
</body>
</html>
-@@
-<!--
+@discard{
Local variables:
mode:sgml
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
+indent-tabs-mode:nil
+fill-column:79
End:
--->
+}@#
-->
<html>
<head>
-@include:stdhead@
- <title>@label:choose.title@</title>
+@stdhead{choose}
</head>
<body>
-@include{topbar}@
+@stdmenu{choose}
<h1>@label:choose.title@</h1>
@#{always have the first-letter bar, if choosealpha enabled}@
</div></div>
}@
-@include{topbarend}@
+@credits
</body>
</html>
-@@
-<!--
+@discard{
Local variables:
mode:sgml
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
+indent-tabs-mode:nil
+fill-column:79
End:
--->
+}@#
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<!--
-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
--->
-<html>
- <head>
-@include:stdhead@
- <title>@label:choose.title@</title>
- </head>
- <body>
-@include{topbar}@
- <h1>@label:choose.title@</h1>
-
- <p class=choosealpha>
- <a title="Directories starting with 'a'"
- href="@url@?action=choose&regexp=^(the )?a">A</a> |
- <a title="Directories starting with 'b'"
- href="@url@?action=choose&regexp=^(the )?b">B</a> |
- <a title="Directories starting with 'c'"
- href="@url@?action=choose&regexp=^(the )?c">C</a> |
- <a title="Directories starting with 'd'"
- href="@url@?action=choose&regexp=^(the )?d">D</a> |
- <a title="Directories starting with 'e'"
- href="@url@?action=choose&regexp=^(the )?e">E</a> |
- <a title="Directories starting with 'f'"
- href="@url@?action=choose&regexp=^(the )?f">F</a> |
- <a title="Directories starting with 'g'"
- href="@url@?action=choose&regexp=^(the )?g">G</a> |
- <a title="Directories starting with 'h'"
- href="@url@?action=choose&regexp=^(the )?h">H</a> |
- <a title="Directories starting with 'i'"
- href="@url@?action=choose&regexp=^(the )?i">I</a> |
- <a title="Directories starting with 'j'"
- href="@url@?action=choose&regexp=^(the )?j">J</a> |
- <a title="Directories starting with 'k'"
- href="@url@?action=choose&regexp=^(the )?k">K</a> |
- <a title="Directories starting with 'l'"
- href="@url@?action=choose&regexp=^(the )?l">L</a> |
- <a title="Directories starting with 'm'"
- href="@url@?action=choose&regexp=^(the )?m">M</a> |
- <a title="Directories starting with 'n'"
- href="@url@?action=choose&regexp=^(the )?n">N</a> |
- <a title="Directories starting with 'o'"
- href="@url@?action=choose&regexp=^(the )?o">O</a> |
- <a title="Directories starting with 'p'"
- href="@url@?action=choose&regexp=^(the )?p">P</a> |
- <a title="Directories starting with 'q'"
- href="@url@?action=choose&regexp=^(the )?q">Q</a> |
- <a title="Directories starting with 'r'"
- href="@url@?action=choose&regexp=^(the )?r">R</a> |
- <a title="Directories starting with 's'"
- href="@url@?action=choose&regexp=^(the )?s">S</a> |
- <a title="Directories starting with 't'"
- href="@url@?action=choose&regexp=^(?!the [^t])t">T</a> |
- <a title="Directories starting with 'u'"
- href="@url@?action=choose&regexp=^(the )?u">U</a> |
- <a title="Directories starting with 'v'"
- href="@url@?action=choose&regexp=^(the )?v">V</a> |
- <a title="Directories starting with 'w'"
- href="@url@?action=choose&regexp=^(the )?w">W</a> |
- <a title="Directories starting with 'x'"
- href="@url@?action=choose&regexp=^(the )?x">X</a> |
- <a title="Directories starting with 'y'"
- href="@url@?action=choose&regexp=^(the )?y">Y</a> |
- <a title="Directories starting with 'z'"
- href="@url@?action=choose&regexp=^(the )?z">Z</a> |
- <a title="Directories starting with anything else"
- href="@url@?action=choose&regexp=^[^a-z]">*</a>
- </p>
-
-@include{topbarend}@
- </body>
-</html>
-@@
-<!--
-Local variables:
-mode:sgml
-sgml-always-quote-attributes:nil
-sgml-indent-step:1
-sgml-indent-data:t
-End:
--->
+++ /dev/null
-@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
--->
-}@#
-<p class=credits>
- <a href="http://www.greenend.org.uk/rjk/disorder/"
- title="DisOrder web site">DisOrder
- version @version</a>
- © 2003-2008 Richard Kettlewell et al
-</p>
-->
<html>
<head>
-@include:stdhead@
- <title>@label:error.title@</title>
+@stdhead{error}
</head>
<body>
-@include{topbar}@
- <h1>@label:error.title@</h1>
+@stdmenu{error}
+ <h1>@label{error.title}</h1>
<div class=error>
- <p class=error>@label{error.@label:error@}@</p>
-
- <p class=error>@label:error.generic@</p>
+ <p class=error>@label{error.@error}</p>
+ <p class=error>@label{error.generic}</p>
</div>
-@include{topbarend}@
+@credits
</body>
</html>
-@@
-<!--
+@discard{
Local variables:
mode:sgml
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
End:
--->
+}@#
-->
<html>
<head>
-@include{stdhead}@
- <title>@label{help.title}@</title>
+@stdhead{help}
</head>
<body>
-@include{topbar}@
+@stdmenu{help}
<h1>@label{help.title}@</h1>
<h2 class=helptitle>Introduction</h2>
being listed first.) Where possible, estimated start times are
given.</p>
- <p>Each track has a <img class=button src="@image:scratch@"
- title="@label:playing.scratch@" alt="@label:playing.scratch@">
+ <p>Each track has a <img class=button src="@image{scratch}"
+ title="@label{playing.scratch}" alt="@label{playing.scratch}">
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
<ul>
<li>Pause. This button can be used to pause playing (provided the
- player supports it). <img width=16 height=16 class=imgbutton
- src="@image:enabled@"> indicates that playing is paused,
- <img width=16 height=16 class=imgbutton
- src="@image:disabled@"> that it is not.</li>
+ player supports it). <img width=@width height=@height class=imgbutton
+ src="@image{enabled}"> indicates that playing is paused,
+ <img width=@width height=@height class=imgbutton
+ src="@image{disabled}"> that it is not.</li>
<li>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. <img width=16 height=16 class=imgbutton
- src="@image:enabled@"> indicates that random play is
- enabled, <img width=16 height=16 class=imgbutton
- src="@image:disabled@"> that it is disabled.</li>
+ picked at random. <img width=@width height=@height class=imgbutton
+ src="@image{enabled}"> indicates that random play is
+ enabled, <img width=@width height=@height class=imgbutton
+ src="@image{disabled}"> that it is disabled.</li>
<li>Enable/disable play. If disabled then tracks in the queue
will not be played, but will remain in the queue instead. <img
- width=16 height=16 class=imgbutton src="@image:enabled@">
- indicates that play is enabled, <img width=16 height=16
- class=imgbutton src="@image:disabled@"> that it is
+ width=@width height=@height class=imgbutton src="@image{enabled}">
+ indicates that play is enabled, <img width=@width height=@height
+ class=imgbutton src="@image{disabled}"> that it is
disabled.</li>
<li>Volume control. You can use the <img class=button
- src="@image:up@"
- title="@label:volume.increase@"
- alt="@label:volume.increase@"> and <img
- src="@image:down@"
- title="@label:volume.reduce@"
- alt="@label:volume.reduce@"> buttons to increase or
+ src="@image{up}"
+ title="@label{volume.up}"
+ alt="@label{volume.up}"> and <img
+ src="@image{down}"
+ title="@label{volume.down}"
+ alt="@label{volume.down}"> buttons to increase or
decrease the volume, or enter new volume settings for the left
and/or right speakers.</li>
<p>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 <img class=button src="@image:up@"
- title="@label:playing.up@" alt="@label:playing.up@"> and <img
- src="@image:down@" title="@label:playing.down@"
- alt="@label:playing.down@"> buttons on each track move that
+ The <img class=button src="@image{up}"
+ title="@label{playing.up}" alt="@label{playing.up}"> and <img
+ src="@image{down}" title="@label{playing.down}"
+ alt="@label{playing.down}"> buttons on each track move that
track around in the queue. Similarly the <img class=button
- src="@image:upall@" title="@label:playing.upall@"
- alt="@label:playing.upall@"> and <img
- src="@image:downall@" title="@label:playing.downall@"
- alt="@label:playing.downall@"> buttons move each track to the head or
+ src="@image{upall}" title="@label{playing.upall}"
+ alt="@label{playing.upall}"> and <img
+ src="@image{downall}" title="@label{playing.downall}"
+ alt="@label{playing.downall}"> buttons move each track to the head or
tail of the queue.</p>
<p>If you are not logged in, or if your user has limited rights,
<div class=helpsection>
<p>This screen displays recently played tracks, most recent first.
- The <img class=button src="@image:edit@"
- title="@label:choose.prefs@" alt="@label:choose.prefs@">
+ The <img class=button src="@image{edit}"
+ title="@label{choose.prefs}" alt="@label{choose.prefs}">
button can be used to edit the details for a track; see <a
href="#prefs">Editing Preferences</a> below.</p>
<p>The number of tracks remembered is controlled by the server
configuration. See the <span class=configuration>history</span>
option in <a
- href="@url@?action=disorder_config.5">disorder_config(5)</a> for
+ href="@url?action=disorder_config.5">disorder_config(5)</a> for
more details.</p>
</div>
<p>This screen displays tracks recently added to the database,
most recent first. The <img class=button
- src="@image:edit@" title="@label:choose.prefs@"
- alt="@label:choose.prefs@"> 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 <a href="#prefs">Editing Preferences</a> below,
and clicking on the track title will add it to the queue.</p>
<p>The time tracks are remembered for is controlled by the server
configuration. See the <span
class=configuration>noticed_history</span> option in <a
- href="@url@?action=disorder_config.5">disorder_config(5)</a> for
+ href="@url?action=disorder_config.5">disorder_config(5)</a> for
more details.</p>
</div>
<tbody>
<tr>
<td><img
- class=button src="@image:edit@"
- title="@label:choose.prefs@"
- alt="@label:choose.prefs@"></td>
+ class=button src="@image{edit}"
+ title="@label{choose.prefs}"
+ alt="@label{choose.prefs}"></td>
<td>This button can be used to edit the details for a
track; see <a href="#prefs">Editing Preferences</a> below.</td>
</tr>
</table>
<p>This screen has two forms: <a
- href="@url@?action=choose">choose</a>, which give
+ href="@url?action=choose">choose</a>, which give
you all the top-level directories at once, and <a
- href="@url@?action=choosealpha">choosealpha</a>,
+ href="@url?action=choosealpha">choosealpha</a>,
which breaks them down by initial letter.</p>
<p>This screen will may not be available if you are not logged in
<p>Some keywords, known as “stopwords”, are excluded
from the search, and will never match. See the <span
class=configuration>stopword</span> option in <a
- href="@url@?action=disorder_config.5">disorder_config(5)</a> for
+ href="@url?action=disorder_config.5">disorder_config(5)</a> for
further details about this.</p>
<p>This screen will may not be available if you are not logged in
<div class=helpsection>
- <p><a href="@url@?action=disorder_config.5">disorder_config(5)</a> -
+ <p><a href="@url?action=disorder_config.5">disorder_config(5)</a> -
configuration</p>
- <p><a href="@url@?action=disorder.1">disorder(1)</a> - command line
+ <p><a href="@url?action=disorder.1">disorder(1)</a> - command line
client</p>
- <p><a href="@url@?action=disobedience.1">disobedience(1)</a> - GTK+
+ <p><a href="@url?action=disobedience.1">disobedience(1)</a> - GTK+
client</p>
- <p><a href="@url@?action=disorderd.8">disorderd(8)</a> - server</p>
+ <p><a href="@url?action=disorderd.8">disorderd(8)</a> - server</p>
- <p><a href="@url@?action=disorder-dump.8">disorder-dump(8)</a> -
+ <p><a href="@url?action=disorder-dump.8">disorder-dump(8)</a> -
dump/restore preferences database</p>
- <p><a href="@url@?action=disorder.3">disorder(3)</a> - C API</p>
+ <p><a href="@url?action=disorder.3">disorder(3)</a> - C API</p>
- <p><a href="@url@?action=disorder_protocol.5">disorder_protocol(5)</a> -
+ <p><a href="@url?action=disorder_protocol.5">disorder_protocol(5)</a> -
DisOrder control protocol</p>
</div>
-@include{topbarend}@
+@credits
</div>
</body>
</html>
-@@
-<!--
+@discard{
Local variables:
mode:sgml
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
+indent-tabs-mode:nil
+fill-column:79
End:
--->
+}@#
-->
<html>
<head>
-@include:stdhead@
- <title>@label:login.title@</title>
+@stdhead{login}
</head>
<body>
-@include{topbar}@
+@stdmenu{login}
<h1>@label:login.title@</h1>
@if{@ne{@label:error@}{error}@}{
}@
-@include{topbarend}@
+@credits
</body>
</html>
-@@
-<!--
+@discard{
Local variables:
mode:sgml
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
+indent-tabs-mode:nil
+fill-column:79
End:
--->
+}@#
-@discard{
-
This file is part of DisOrder.
Copyright (C) 2008 Richard Kettlewell
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 <head> text
+@# @name is the name of this page, for the <title> element
+@define {stdhead} {name}
+ {@quiethead
+<link rel=stylesheet
+ type="text/css"
+ href="@label{url.static}/disorder.css">
+<title>@label{@name.title}</title>}
+
+@# Non-displaying <head> text
+@define {quiethead} {}
+ {<link rel=stylesheet
+ type="text/css"
+ href="@label{url.static}/disorder.css">}
+
+@# Standard menu
+@# @current is the name of the current page, e.g. choosealpha, login
+@define {stdmenu} {current}
+ {<p class=menubar>
+@menuitem{@current}{playing}{true}
+@menuitem{@current}{choose}{@right{play}}
+@menuitem{@current}{search}{@right{play}}
+@menuitem{@current}{manage}{true}
+@menuitem{@current}{login}{true}
+@menuitem{@current}{help}{true}
+@menuitem{@current}{about}{true}
+</p>
+<hr>
+}
+
+@# Menu entry
+@# Used by @stdmenu
+@# @current is the name of the current page (not necessarily the action that
+@# got there!)
+@# @name is the name of the menu item
+@# @available is true if the menu item is available, else false
+@#
+@define {menuitem} {current name available}
+ {@if{@available}
+ { <a @if{@eq{@current}{@name}}
+ {class=activemenu}
+ {class=inactivemenu}
+ @if{@eq{name}{playing}}
+ {href="@url"}
+ {href="@url?action=@name"}
+ title="@label{menu.@q{@name}verbose}"
+ @label{menu.@name}</a>}
+ { <span class=invaldmenu title="@label{menu.@q{@name}verbose}">
+ @label{menu.@name}</span>}}
+
-@# Expand to &back=manage or to nothing
-@define {back} {}
- {@ifmanage{&back=manage}{}}
+@# Standard footer text
+@define {credits} {}
+ {<p class=credits>
+ <a href="http://www.greenend.org.uk/rjk/disorder/"
+ title="DisOrder web site">DisOrder
+ version @version</a>
+ © 2003-2008 Richard Kettlewell et al
+</p>}
@# Expand to the time that @id will be played
@# @what is the section
width=@width height=@height
title="@label{playing.@q{@dir}verbose}"
alt="@label{playing.@dir}">}}
-}@#
-->
<html>
<head>
-@include:stdhead@
- <title>@label:new.title@</title>
+@stdhead{new}
</head>
<body>
-@include{topbar}@
+@stdmenu{new}
<h1>@label:new.title@</h1>
@#{only display the table if there is something to put in it}@
</table>
}@
-@include{topbarend}@
+@credits
</body>
</html>
-@@
-<!--
+@discard{
Local variables:
mode:sgml
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
+indent-tabs-mode:nil
+fill-column:79
End:
--->
+}@#
{<img class=button width=@width height=@height
src="@image{no@dir}">}}
- @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}{}}
}@#
<html>
<head>
-@include{stdhead.tmpl}@#
+@quiethead
<title>@if{@isplaying}
{@playing{@part{@id}{title}}}
{@label{playing.title}}</title>
</head>
<body>
-@include{topbar.tmpl}
+@stdmenu{@ifmanage{manage}{playing}}
<h1>@label{playing.title}</h1>
@# Extra control buttons for the management page
</table>
}
-@include{topbarend.tmpl}@#
+@credits
</body>
</html>
@discard{
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
+indent-tabs-mode:nil
End:
-}@
+}@#
-->
<html>
<head>
-@include:stdhead@
- <title>@label:prefs.title@</title>
+@stdhead{prefs}
</head>
<body>
-@include{topbar}@
+@stdmenu{prefs}
<h1>@label:prefs.title@</h1>
<form class=prefs action="@url@" method=POST
</p>
</form>
-@include{topbarend}@
+@credits
</body>
</html>
-@@
-<!--
+@discard{
Local variables:
mode:sgml
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
+indent-tabs-mode:nil
+fill-column:79
End:
--->
+}@#
-->
<html>
<head>
-@include:stdhead@
- <title>@label:recent.title@</title>
+@stdhead{recent}
</head>
<body>
-@include{topbar}@
+@stdmenu{recent}
<h1>@label:recent.title@</h1>
@#{only display the table if there is something to put in it}@
</table>
}@
-@include{topbarend}@
+@credits
</body>
</html>
-@@
-<!--
+@discard{
Local variables:
mode:sgml
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
+indent-tabs-mode:nil
+fill-column:79
End:
--->
+}@#
-->
<html>
<head>
-@include:stdhead@
- <title>@label:search.title@</title>
+@stdhead{search}
</head>
<body>
-@include{topbar}@
+@stdmenu{search}
<h1>@label:search.title@</h1>
<form class=search action="@url@" method=POST
}@
</div>
-@include{topbarend}@
+@credits
</body>
</html>
-@@
-<!--
+@discard{
Local variables:
mode:sgml
sgml-always-quote-attributes:nil
sgml-indent-step:1
sgml-indent-data:t
+indent-tabs-mode:nil
+fill-column:79
End:
--->
+}@#
+++ /dev/null
-@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
-
-Anything that goes in all html HEAD elements goes here.
-}@#
-@include{stylesheet.tmpl}@#
+++ /dev/null
-@discard{
-This file is part of DisOrder.
-Copyright (C) 2005, 2007, 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
-
-This file is a standard place to put a link to a stylesheet,
-or an embedded stylesheet.
-}@#
- <link rel=stylesheet
- type="text/css"
- href="@image{disorder.css}">
+++ /dev/null
-<p class=menubar>
- <a class=@if{@eq{@action@}{playing}@}{activemenu}{inactivemenu}@
- href="@url@"
- title="@label:sidebar.playingverbose@">@label:sidebar.playing@</a>
- <a class=@if{@eq{@action@}{recent}@}{activemenu}{inactivemenu}@
- href="@url@?action=recent"
- title="@label:sidebar.recentverbose@">@label:sidebar.recent@</a>
- <a class=@if{@eq{@action@}{new}@}{activemenu}{inactivemenu}@
- href="@url@?action=new"
- title="@label:sidebar.newverbose@">@label:sidebar.new@</a>
-@right{play}{
- <a class=@if{@or{@eq{@action@}{choose}@}
- {@eq{@action@}{choosealpha}@}@}
- {activemenu}
- {inactivemenu}@
- href="@url@?action=@label:sidebar.choosewhich@"
- title="@label:sidebar.chooseverbose@">@label:sidebar.choose@</a>}{
- <span class=invalidmenu
- title="@label:sidebar.chooseverbose@">@label:sidebar.choose@</span>}@
-@right{play}{
- <a class=@if{@eq{@action@}{search}@}{activemenu}{inactivemenu}@
- href="@url@?action=search"
- title="@label:sidebar.searchverbose@">@label:sidebar.search@</a>}{
- <span class=invalidmenu
- title="@label:sidebar.searchverbose@">@label:sidebar.search@</span>}@
-<!-- disabled by default since now available from 'manage'
- <a class=@if{@eq{@action@}{volume}@}{activemenu}{inactivemenu}@
- href="@url@?action=volume"
- title="@label:sidebar.volumeverbose@">@label:sidebar.volume@</a>
--->
- <a class=@if{@eq{@action@}{manage}@}{activemenu}{inactivemenu}@
- href="@url@?mgmt=true"
- title="@label:sidebar.manageverbose@">@label:sidebar.manage@</a>
- <a class=@if{@or{@eq{@action@}{login}@}
- {@eq{@action@}{logout}@}
- {@eq{@action@}{register}@}
- {@eq{@action@}{reminder}@}
- {@eq{@action@}{edituser}@}@}{activemenu}{inactivemenu}@
- href="@url@?action=login"
- title="@label:sidebar.loginverbose@">@label:sidebar.login@</a>
- <a class=@if{@eq{@action@}{help}@}{activemenu}{inactivemenu}@
- href="@url@?action=help"
- title="@label:sidebar.helpverbose@">@label:sidebar.help@</a>
- <a class=@if{@eq{@action@}{about}@}{activemenu}{inactivemenu}@
- href="@url@?action=about"
- title="@label:sidebar.aboutverbose@">@label:sidebar.about@</a>
-</p>
-<hr>
-@@
-<!--
-This file is part of DisOrder.
-Copyright (C) 2005, 2007, 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
--->
+++ /dev/null
-@discard{
-This file is part of DisOrder.
-Copyright (C) 2005, 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
-}@#
-@include{credits.tmpl}@#
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<!--
-This file is part of DisOrder.
-Copyright (C) 2004, 2005, 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
--->
-<html>
- <head>
-@include:stdhead@
- <title>@label:volume.title@</title>
- </head>
- <body>
-@include{topbar}@
- <h1>@label:volume.title@</h1>
-
- <form class=volume action="@url@" method=POST>
- <p class=volume>
- <a class=imgbutton
- href="@url@?action=volume&delta=-@label:volume.resolution@">
- <img class=button src="@image:down@"
- alt="@label:volume.reduce@" title="@label:volume.reduceverbose@">
- </a>
- @label:volume.left@ <input size=3 name=left type=text value="@volume:left@">
- @label:volume.right@ <input size=3 name=right type=text value="@volume:right@">
- <button class=search name=action type=submit value=volume>
- @label:volume.set@
- </button>
- <a class=imgbutton
- href="@url@?action=volume&delta=@label:volume.resolution@">
- <img class=button src="@image:up@"
- alt="@label:volume.increase@" title="@label:volume.increaseverbose@">
- </a>
- </p>
- </form>
-
-@include{topbarend}@
- </body>
-</html>
-@@
-<!--
-Local variables:
-mode:sgml
-sgml-always-quote-attributes:nil
-sgml-indent-step:1
-sgml-indent-data:t
-End:
--->