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