chiark / gitweb /
Fiddle with CSS+HTML in effort to get more consistent buttons
[disorder] / templates / choose.tmpl
CommitLineData
460b9539 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2<!--
3This file is part of DisOrder.
3225872d 4Copyright (C) 2004-2008 Richard Kettlewell
460b9539 5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19USA
20-->
21<html>
22 <head>
0d0253c9 23@stdhead{choose}
460b9539 24 </head>
25 <body>
0d0253c9 26@stdmenu{choose}
e7ce7665 27 <h1>@label{choose.title}</h1>
328248ba 28
99955407 29 @if{@eq{@label{menu.choosewhich}}{choosealpha}}
48e472fa 30 {
328248ba 31 <p class=choosealpha>
3225872d 32 <a title="Directories starting with 'a'"
54755335 33 href="@url?action=choose&#38;re=^(the )?a">A</a> |
3225872d 34 <a title="Directories starting with 'b'"
54755335 35 href="@url?action=choose&#38;re=^(the )?b">B</a> |
3225872d 36 <a title="Directories starting with 'c'"
54755335 37 href="@url?action=choose&#38;re=^(the )?c">C</a> |
3225872d 38 <a title="Directories starting with 'd'"
54755335 39 href="@url?action=choose&#38;re=^(the )?d">D</a> |
3225872d 40 <a title="Directories starting with 'e'"
54755335 41 href="@url?action=choose&#38;re=^(the )?e">E</a> |
3225872d 42 <a title="Directories starting with 'f'"
54755335 43 href="@url?action=choose&#38;re=^(the )?f">F</a> |
3225872d 44 <a title="Directories starting with 'g'"
54755335 45 href="@url?action=choose&#38;re=^(the )?g">G</a> |
3225872d 46 <a title="Directories starting with 'h'"
54755335 47 href="@url?action=choose&#38;re=^(the )?h">H</a> |
3225872d 48 <a title="Directories starting with 'i'"
54755335 49 href="@url?action=choose&#38;re=^(the )?i">I</a> |
3225872d 50 <a title="Directories starting with 'j'"
54755335 51 href="@url?action=choose&#38;re=^(the )?j">J</a> |
3225872d 52 <a title="Directories starting with 'k'"
54755335 53 href="@url?action=choose&#38;re=^(the )?k">K</a> |
3225872d 54 <a title="Directories starting with 'l'"
54755335 55 href="@url?action=choose&#38;re=^(the )?l">L</a> |
3225872d 56 <a title="Directories starting with 'm'"
54755335 57 href="@url?action=choose&#38;re=^(the )?m">M</a> |
3225872d 58 <a title="Directories starting with 'n'"
54755335 59 href="@url?action=choose&#38;re=^(the )?n">N</a> |
3225872d 60 <a title="Directories starting with 'o'"
54755335 61 href="@url?action=choose&#38;re=^(the )?o">O</a> |
3225872d 62 <a title="Directories starting with 'p'"
54755335 63 href="@url?action=choose&#38;re=^(the )?p">P</a> |
3225872d 64 <a title="Directories starting with 'q'"
54755335 65 href="@url?action=choose&#38;re=^(the )?q">Q</a> |
3225872d 66 <a title="Directories starting with 'r'"
54755335 67 href="@url?action=choose&#38;re=^(the )?r">R</a> |
3225872d 68 <a title="Directories starting with 's'"
54755335 69 href="@url?action=choose&#38;re=^(the )?s">S</a> |
3225872d 70 <a title="Directories starting with 't'"
54755335 71 href="@url?action=choose&#38;re=^(?!the [^t])t">T</a> |
3225872d 72 <a title="Directories starting with 'u'"
54755335 73 href="@url?action=choose&#38;re=^(the )?u">U</a> |
3225872d 74 <a title="Directories starting with 'v'"
54755335 75 href="@url?action=choose&#38;re=^(the )?v">V</a> |
3225872d 76 <a title="Directories starting with 'w'"
54755335 77 href="@url?action=choose&#38;re=^(the )?w">W</a> |
3225872d 78 <a title="Directories starting with 'x'"
54755335 79 href="@url?action=choose&#38;re=^(the )?x">X</a> |
3225872d 80 <a title="Directories starting with 'y'"
54755335 81 href="@url?action=choose&#38;re=^(the )?y">Y</a> |
3225872d 82 <a title="Directories starting with 'z'"
54755335 83 href="@url?action=choose&#38;re=^(the )?z">Z</a> |
3225872d 84 <a title="Directories starting with anything else"
54755335 85 href="@url?action=choose&#38;re=^[^a-z]">*</a>
328248ba 86 </p>
48e472fa
RK
87}
88
b43dc0cc
RK
89@# Always have a search form
90 <form class=search
91 action="@url"
92 method=POST
93 enctype="multipart/form-data" accept-charset=utf-8>
94 <p class=search>Enter search terms:
95 <input class=query name=query type=text value="@argq{query}"
96 size=50>
49e57291
RK
97 <span class=button>
98 <button class=search name=submit type=submit>
99 @label{search.search}
100 </button>
101 </span>
e7ce7665 102 <input name=action type=hidden value=choose>
54755335
RK
103 <a class=button
104 href="@url?action=choose">
105 @label{search.clear}
106 </a>
b43dc0cc
RK
107 </p>
108 </form>
109
110 @if{@ne{@arg{query}}{}}
54755335 111 {@# There's a search query
35248665
RK
112 <table class=search>
113 <tr class=headings>
114 <th class=artist>@label{heading.artist}</th>
115 <th class=album>@label{heading.album}</th>
116 <th class=title>@label{heading.title}</th>
117 <th class=length>@label{heading.length}</th>
118@right{prefs}{
119 <th class=button>&nbsp;</th>}
120 </tr>
121 @search{@arg{query}}{
122 <tr class=@parity>
123 <td class=artist>@martist{search}{@track}</td>
124 <td class=album>@malbum{search}{@track}</td>
e7ce7665
RK
125 <td class=title>@mtitleplay{search}{@track}</td>
126 <td class=length>@length{@track}</td>
35248665
RK
127 @right{prefs}{
128 <td class=imgbutton>
129 <a class=imgbutton
02eaa49d 130 href="@url?action=prefs&#38;track=@urlquote{@track}">
35248665
RK
131 <img class=button src="@image{edit}"
132 title="@label{choose.prefsverbose}"
133 alt="@label{choose.prefs}">
134 </a>
135 </td>
136 </tr>}
137 }
138 </table>}
54755335
RK
139 {@# No search query
140
141@# We have the following possible cases:
142@# choose.which dir re result
143@# choose "" - Ask for top level
144@# choose "" present Ask for top level with re applied
145@# choose present - Ask for dir
146@# choose present re Ask for dir with re applied
147@# choosealpha "" - Nothing
148@# choosealpha "" present Ask for top level with re applied
149@# choosealpha present - Ask for dir
150@# choosealpha present re Ask for dir with re applied
151@#
152@# So in fact the only oddity is choosealpha + no dir + no re.
153@#
154@# NB we don't really bother distinguishing between re being empty or absent,
155@# and the server deliberately cooperates in this.
b43dc0cc 156
f4a26919
RK
157 @if{@ne{@arg{dir}}{}}{
158 <p class=directoryname>@#
159@breadcrumbs{@arg{dir}}
160 {/<a href="@url?action=choose&#38;dir=@urlquote{@dir}">@#
161@basename{@dir}</a>}:</p>}
48e472fa 162
54755335
RK
163@# <p>dir=[@arg{dir}]<br>re=[@arg{re}]<br>which=@label{choose.which}</p>
164
165 @if{@or{@ne{@label{menu.choosewhich}}{choosealpha}}
166 {@ne{@arg{dir}}{}}
167 {@ne{@arg{re}}{}}}
168 {@#
48e472fa
RK
169 <div class=directories>
170 <div class=filesdirectories>
171 @dirs{@arg{dir}}{@arg{re}}{
172 <p class=entry>
173 <a href="@url?action=choose&#38;dir=@urlquote{@track}">
174 <img class=button src="@image{directory}" alt="">
175 @display
176 </a>
177 </p>}
178 </div>
179 </div>
460b9539 180
48e472fa 181@define{sometracks}{template}{}
460b9539 182
48e472fa
RK
183 <div class=files>
184 <div class=filesdirectories>
e7ce7665 185 @tracks{@arg{dir}}{@arg{re}}{
48e472fa
RK
186 <p class=entry>
187@define{sometracks}{template}{@template}@#
e7ce7665 188 @right{prefs}{
48e472fa 189 <a class=imgprefs
02eaa49d 190 href="@url?action=prefs&#38;track=@urlquote{@resolve{@track}}">
b43dc0cc
RK
191 <img class=button
192 src="@image{edit}"
e7ce7665
RK
193 title="@label{choose.prefsverbose}"
194 alt="@label{choose.prefs}">
48e472fa
RK
195 </a>
196 }@#
02eaa49d 197 <a href="@url?action=play&#38;track=@urlquote{@track}&#38;back=@urlquote{@thisurl}"
48e472fa
RK
198 title="@label{choose.play}">
199 @display
200 </a>
201 @if{@eq{@trackstate{@track}}{playing}}
202 {[<b>playing</b>]}
203 @if{@eq{@trackstate{@track}}{queued}}
204 {[<b>queued</b>]}
205 </p>}
206 @sometracks{
207 <p class=all>
208 @right{prefs}{
209 <a class=imgprefs
210 href="@url?action=prefs&#38;dir=@urlquote{@arg{dir}}">
211 <img class=button
212 src="@image{edit}"
e7ce7665
RK
213 title="@label{choose.allprefsverbose}"
214 alt="@label{choose.allprefs}">
48e472fa
RK
215 </a>}
216 <a class=button
54755335 217 href="@url?action=play&#38;dir=@urlquote{@arg{dir}}&#38;back=@urlquote{@thisurl}">
48e472fa
RK
218 @label{choose.playall}
219 </a>
220 </p>}
221 </div>
222 </div>
54755335 223 }
b43dc0cc
RK
224 }
225
0d0253c9 226@credits
460b9539 227 </body>
228</html>
0d0253c9 229@discard{
460b9539 230Local variables:
231mode:sgml
232sgml-always-quote-attributes:nil
233sgml-indent-step:1
234sgml-indent-data:t
0d0253c9
RK
235indent-tabs-mode:nil
236fill-column:79
460b9539 237End:
0d0253c9 238}@#