This file is part of DisOrder.
Copyright (C) 2004-2008 Richard Kettlewell
-This program is free software; you can redistribute it and/or modify
+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
+the Free Software Foundation, either version 3 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.
+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
+along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<html>
<head>
{
<p class=choosealpha>
<a title="Directories starting with 'a'"
- href="@url?action=choose&regexp=^(the )?a">A</a> |
+ href="@url?action=choose&re=^(the )?a">A</a> |
<a title="Directories starting with 'b'"
- href="@url?action=choose&regexp=^(the )?b">B</a> |
+ href="@url?action=choose&re=^(the )?b">B</a> |
<a title="Directories starting with 'c'"
- href="@url?action=choose&regexp=^(the )?c">C</a> |
+ href="@url?action=choose&re=^(the )?c">C</a> |
<a title="Directories starting with 'd'"
- href="@url?action=choose&regexp=^(the )?d">D</a> |
+ href="@url?action=choose&re=^(the )?d">D</a> |
<a title="Directories starting with 'e'"
- href="@url?action=choose&regexp=^(the )?e">E</a> |
+ href="@url?action=choose&re=^(the )?e">E</a> |
<a title="Directories starting with 'f'"
- href="@url?action=choose&regexp=^(the )?f">F</a> |
+ href="@url?action=choose&re=^(the )?f">F</a> |
<a title="Directories starting with 'g'"
- href="@url?action=choose&regexp=^(the )?g">G</a> |
+ href="@url?action=choose&re=^(the )?g">G</a> |
<a title="Directories starting with 'h'"
- href="@url?action=choose&regexp=^(the )?h">H</a> |
+ href="@url?action=choose&re=^(the )?h">H</a> |
<a title="Directories starting with 'i'"
- href="@url?action=choose&regexp=^(the )?i">I</a> |
+ href="@url?action=choose&re=^(the )?i">I</a> |
<a title="Directories starting with 'j'"
- href="@url?action=choose&regexp=^(the )?j">J</a> |
+ href="@url?action=choose&re=^(the )?j">J</a> |
<a title="Directories starting with 'k'"
- href="@url?action=choose&regexp=^(the )?k">K</a> |
+ href="@url?action=choose&re=^(the )?k">K</a> |
<a title="Directories starting with 'l'"
- href="@url?action=choose&regexp=^(the )?l">L</a> |
+ href="@url?action=choose&re=^(the )?l">L</a> |
<a title="Directories starting with 'm'"
- href="@url?action=choose&regexp=^(the )?m">M</a> |
+ href="@url?action=choose&re=^(the )?m">M</a> |
<a title="Directories starting with 'n'"
- href="@url?action=choose&regexp=^(the )?n">N</a> |
+ href="@url?action=choose&re=^(the )?n">N</a> |
<a title="Directories starting with 'o'"
- href="@url?action=choose&regexp=^(the )?o">O</a> |
+ href="@url?action=choose&re=^(the )?o">O</a> |
<a title="Directories starting with 'p'"
- href="@url?action=choose&regexp=^(the )?p">P</a> |
+ href="@url?action=choose&re=^(the )?p">P</a> |
<a title="Directories starting with 'q'"
- href="@url?action=choose&regexp=^(the )?q">Q</a> |
+ href="@url?action=choose&re=^(the )?q">Q</a> |
<a title="Directories starting with 'r'"
- href="@url?action=choose&regexp=^(the )?r">R</a> |
+ href="@url?action=choose&re=^(the )?r">R</a> |
<a title="Directories starting with 's'"
- href="@url?action=choose&regexp=^(the )?s">S</a> |
+ href="@url?action=choose&re=^(the )?s">S</a> |
<a title="Directories starting with 't'"
- href="@url?action=choose&regexp=^(?!the [^t])t">T</a> |
+ href="@url?action=choose&re=^(?!the [^t])t">T</a> |
<a title="Directories starting with 'u'"
- href="@url?action=choose&regexp=^(the )?u">U</a> |
+ href="@url?action=choose&re=^(the )?u">U</a> |
<a title="Directories starting with 'v'"
- href="@url?action=choose&regexp=^(the )?v">V</a> |
+ href="@url?action=choose&re=^(the )?v">V</a> |
<a title="Directories starting with 'w'"
- href="@url?action=choose&regexp=^(the )?w">W</a> |
+ href="@url?action=choose&re=^(the )?w">W</a> |
<a title="Directories starting with 'x'"
- href="@url?action=choose&regexp=^(the )?x">X</a> |
+ href="@url?action=choose&re=^(the )?x">X</a> |
<a title="Directories starting with 'y'"
- href="@url?action=choose&regexp=^(the )?y">Y</a> |
+ href="@url?action=choose&re=^(the )?y">Y</a> |
<a title="Directories starting with 'z'"
- href="@url?action=choose&regexp=^(the )?z">Z</a> |
+ href="@url?action=choose&re=^(the )?z">Z</a> |
<a title="Directories starting with anything else"
- href="@url?action=choose&regexp=^[^a-z]">*</a>
+ href="@url?action=choose&re=^[^a-z]">*</a>
</p>
}
@# Always have a search form
- <form class=search
- action="@url"
- method=POST
- enctype="multipart/form-data" accept-charset=utf-8>
- <p class=search>Enter search terms:
- <input class=query name=query type=text value="@argq{query}"
- size=50>
- <button class=search name=submit type=submit>
- @label{search.search}
- </button>
- <input name=action type=hidden value=choose>
- </p>
- </form>
+ <div class=search>
+ <form class=search
+ action="@url"
+ method=POST
+ enctype="multipart/form-data" accept-charset=utf-8>
+ <p class=search>Enter search terms:
+ <input class=query name=query type=text value="@argq{query}"
+ size=50>
+ @submit{@label{search.search}}
+ <input name=action type=hidden value=choose>
+ </p>
+ </form>
+@actbutton{@label{search.clear}}{}{choose}
+ </div>
@if{@ne{@arg{query}}{}}
- {
-@# There's a search query
+ {@# There's a search query
<table class=search>
<tr class=headings>
<th class=artist>@label{heading.artist}</th>
@right{prefs}{
<td class=imgbutton>
<a class=imgbutton
- href="@url?action=prefs&0_file=@urlquote{@track}">
+ href="@url?action=prefs&track=@urlquote{@track}">
<img class=button src="@image{edit}"
title="@label{choose.prefsverbose}"
alt="@label{choose.prefs}">
</tr>}
}
</table>}
- {
-@# No search query
+ {@# No search query
+
+@# We have the following possible cases:
+@# choose.which dir re result
+@# choose "" - Ask for top level
+@# choose "" present Ask for top level with re applied
+@# choose present - Ask for dir
+@# choose present re Ask for dir with re applied
+@# choosealpha "" - Nothing
+@# choosealpha "" present Ask for top level with re applied
+@# choosealpha present - Ask for dir
+@# choosealpha present re Ask for dir with re applied
+@#
+@# So in fact the only oddity is choosealpha + no dir + no re.
+@#
+@# NB we don't really bother distinguishing between re being empty or absent,
+@# and the server deliberately cooperates in this.
+
+ @if{@ne{@arg{dir}}{}}{
+ <p class=directoryname>@#
+@breadcrumbs{@arg{dir}}
+ {/<a href="@url?action=choose&dir=@urlquote{@dir}">@#
+@basename{@dir}</a>}:</p>}
-@# TODO navigation...
+@# <p>dir=[@arg{dir}]<br>re=[@arg{re}]<br>which=@label{choose.which}</p>
+ @if{@or{@ne{@label{menu.choosewhich}}{choosealpha}}
+ {@ne{@arg{dir}}{}}
+ {@ne{@arg{re}}{}}}
+ {@#
<div class=directories>
<div class=filesdirectories>
@dirs{@arg{dir}}{@arg{re}}{
<p class=entry>
<a href="@url?action=choose&dir=@urlquote{@track}">
<img class=button src="@image{directory}" alt="">
- @display
+ @quote{@display}
</a>
</p>}
</div>
@define{sometracks}{template}{@template}@#
@right{prefs}{
<a class=imgprefs
- href="@url?action=prefs&0_file=@urlquote{@resolve{@track}}">
+ href="@url?action=prefs&track=@urlquote{@resolve{@track}}">
<img class=button
src="@image{edit}"
title="@label{choose.prefsverbose}"
alt="@label{choose.prefs}">
</a>
}@#
- <a href="@url?action=play&file=@urlquote{@track}&back=@urlquote{@thisurl}"
+ <a href="@url?action=play&track=@urlquote{@track}&back=@urlquote{@thisurl}"
title="@label{choose.play}">
- @display
+ @quote{@display}
</a>
@if{@eq{@trackstate{@track}}{playing}}
{[<b>playing</b>]}
{[<b>queued</b>]}
</p>}
@sometracks{
- <p class=all>
+ <div class=allfiles>
@right{prefs}{
<a class=imgprefs
href="@url?action=prefs&dir=@urlquote{@arg{dir}}">
title="@label{choose.allprefsverbose}"
alt="@label{choose.allprefs}">
</a>}
- <a class=button
- href="@url?action=play&dir=@urlquote{@arg{dir}}"&back=@urlquote{@thisurl}">
- @label{choose.playall}
- </a>
+ <form method=POST class=button action="@url">
+ <input type=hidden name=action value=play>
+ <input type=hidden name=dir value="@argq{dir}">
+ <input type=hidden name=back value="@quote{@thisurl}">
+ <input type=submit name=submit value="@label{choose.playall}">
+ </form>
</p>}
</div>
</div>
-
+ }
}
@credits