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