fix about ... page
[disorder] / templates / choose.tmpl
index 0b08491..7e60d55 100644 (file)
@@ -26,7 +26,7 @@ USA
 @stdmenu{choose}
    <h1>@label:choose.title@</h1>
   
-  @if{@eq{@label{sidebar.choosewhich}}{choosealpha}}
+  @if{@eq{@label{menu.choosewhich}}{choosealpha}}
      {
    <p class=choosealpha>
     <a title="Directories starting with 'a'"
@@ -86,6 +86,54 @@ USA
    </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=search>
+     </p>
+   </form>
+
+   @if{@ne{@arg{query}}{}}
+      {
+@# There's a search query
+  <table class=search>
+    <tr class=headings>
+     <th class=artist>@label{heading.artist}</th>
+     <th class=album>@label{heading.album}</th>
+     <th class=title>@label{heading.title}</th>
+     <th class=length>@label{heading.length}</th>
+@right{prefs}{
+     <th class=button>&nbsp;</th>}
+    </tr>
+    @search{@arg{query}}{
+    <tr class=@parity>
+     <td class=artist>@martist{search}{@track}</td>
+     <td class=album>@malbum{search}{@track}</td>
+     <td class=title>@mtitle{search}{@track}</td>
+     <td class=length>@length{@id}</td>
+     @right{prefs}{
+     <td class=imgbutton>
+      <a class=imgbutton
+         href="@url?action=prefs&#38;0_file=@urlquote{@track}">
+       <img class=button src="@image{edit}"
+            title="@label{choose.prefsverbose}"
+            alt="@label{choose.prefs}">
+      </a>
+     </td>
+    </tr>}
+    }
+  </table>}
+      {
+@# No search query
+
 @# TODO navigation...
 
    <div class=directories>
@@ -110,10 +158,10 @@ USA
        @rights{prefs}{
         <a class=imgprefs
            href="@url?action=prefs&#38;0_file=@urlquote{@resolve{@track}}">
-        <img class=button
-             src="@image{edit}"
-             title="@label:choose.prefsverbose@"
-             alt="@label:choose.prefs@">
+         <img class=button
+              src="@image{edit}"
+              title="@label:choose.prefsverbose@"
+              alt="@label:choose.prefs@">
         </a>
        }@#
        <a href="@url?action=play&#38;file=@urlquote{@track}&#38;back=@urlquote{@thisurl}"
@@ -143,6 +191,8 @@ USA
     </div>
    </div>
 
+   }
+
 @credits
  </body>
 </html>