X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/9faa7a88b7419b2d6151ac2c3fa52261c876ee8d..812b526d127c6657e571db8b33a58137af6709cd:/templates/choose.tmpl diff --git a/templates/choose.tmpl b/templates/choose.tmpl index 844fe9a..10fc031 100644 --- a/templates/choose.tmpl +++ b/templates/choose.tmpl @@ -3,158 +3,231 @@ 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 . --> -@include:stdhead@ - @label:choose.title@ +@stdhead{choose} -@include{topbar}@ -

@label:choose.title@

+@stdmenu{choose} +

@label{choose.title}

- @#{always have the first-letter bar, if choosealpha enabled}@ - @if{@eq{@label:sidebar.choosewhich@}{choosealpha}@}{ - + @if{@eq{@label{menu.choosewhich}}{choosealpha}} + {

A | + href="@url?action=choose&re=^(the )?a">A | B | + href="@url?action=choose&re=^(the )?b">B | C | + href="@url?action=choose&re=^(the )?c">C | D | + href="@url?action=choose&re=^(the )?d">D | E | + href="@url?action=choose&re=^(the )?e">E | F | + href="@url?action=choose&re=^(the )?f">F | G | + href="@url?action=choose&re=^(the )?g">G | H | + href="@url?action=choose&re=^(the )?h">H | I | + href="@url?action=choose&re=^(the )?i">I | J | + href="@url?action=choose&re=^(the )?j">J | K | + href="@url?action=choose&re=^(the )?k">K | L | + href="@url?action=choose&re=^(the )?l">L | M | + href="@url?action=choose&re=^(the )?m">M | N | + href="@url?action=choose&re=^(the )?n">N | O | + href="@url?action=choose&re=^(the )?o">O | P | + href="@url?action=choose&re=^(the )?p">P | Q | + href="@url?action=choose&re=^(the )?q">Q | R | + href="@url?action=choose&re=^(the )?r">R | S | + href="@url?action=choose&re=^(the )?s">S | T | + href="@url?action=choose&re=^(?!the [^t])t">T | U | + href="@url?action=choose&re=^(the )?u">U | V | + href="@url?action=choose&re=^(the )?v">V | W | + href="@url?action=choose&re=^(the )?w">W | X | + href="@url?action=choose&re=^(the )?x">X | Y | + href="@url?action=choose&re=^(the )?y">Y | Z | + href="@url?action=choose&re=^(the )?z">Z | * + href="@url?action=choose&re=^[^a-z]">*

- }@ +} + +@# Always have a search form + + + @if{@ne{@arg{query}}{}} + {@# There's a search query + + + + + + +@right{prefs}{ + } + + @search{@arg{query}}{ + + + + + + @right{prefs}{ + + } + } + } + {@# 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}}{}}{ +

@# +@breadcrumbs{@arg{dir}} + {/@# +@basename{@dir}}:

} - @if{@ne{@arg:directory@}{}@}{ -

@navigate{@arg:directory@}{/@basename@}@:

- }@ +@#

dir=[@arg{dir}]
re=[@arg{re}]
which=@label{choose.which}

- @if{@isdirectories@}{ -
-

- @label:choose.directories@ -

- @choose{directories}{ -

- - - @transform{@file@}{dir}{display}@ - -

- }@ -
- }@ - @if{@isfiles@}{ -
-

- @label:choose.files@ -

- @choose{files}{ -

- @right{prefs}{@label:choose.prefs@}@ - @transform{@file@}{track}{display}@ - @if{@eq{@trackstate{@file@}@}{playing}@}{[playing]}@ - @if{@eq{@trackstate{@file@}@}{queued}@}{[queued]}@ -

- }@ -

- @right{prefs}{@label:choose.allprefs@}@ - - @label:choose.playall@ - -

-
- }@ + @if{@or{@ne{@label{menu.choosewhich}}{choosealpha}} + {@ne{@arg{dir}}{}} + {@ne{@arg{re}}{}}} + {@# +
+
+ @dirs{@arg{dir}}{@arg{re}}{ +

+ + + @quote{@display} + +

} +
+
-@include{topbarend}@ +@define{sometracks}{template}{} + +
+
+ @tracks{@arg{dir}}{@arg{re}}{ +

+@define{sometracks}{template}{@template}@# + @right{prefs}{ + + @label{choose.prefs} + + }@# + + @quote{@display} + + @if{@eq{@trackstate{@track}}{playing}} + {[playing]} + @if{@eq{@trackstate{@track}}{queued}} + {[queued]} +

} + @sometracks{ +
+ @right{prefs}{ + + @label{choose.allprefs} + } +
+ + + + +
+

} +
+
+ } + } + +@credits -@@ - +}@#