]> git.plutz.net Git - serve0/blobdiff - templates/list.html.sh
increase number of quicklinks, make player panel available in tree view
[serve0] / templates / list.html.sh
index a4e50bb2a274b2fb67158021c411e748844dbef3..2e49dd507fd01189b3fe99df7609cd0271a4067a 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright 2014, 2015 Paul Hänsch
+# Copyright 2014 - 2016 Paul Hänsch
 #
 # This file is part of Serve0
 # 
 # along with Serve0  If not, see <http://www.gnu.org/licenses/>. 
 
 cat <<EOF
-  <form class="panel" id="search" style="display: block;"
-        action="?" method="get" accept-charset="UTF-8">
+  <form class="panel" id="search" action="?" method="get" accept-charset="UTF-8">
     <input type="text" name="s" value="$search" placeholder="Search">
 
-    <label for="o1" class="order">Order by:</label>
     <select class="order" size="1" name="o" id="o1">
+      <option class="label" selected disabled>Order by</option>
       <option>Name</option>
       <option>Date</option>
       <option>Length</option>
     </select>
-    <input type="submit" name="submit" value="Find">
+    <!-- input type="submit" name="submit" value="Find" -->
 
     <a class="panel clearsearch" href="?">Clear All</a>
-    <a class="panel advanced show" href="#advfilter">Advanced</a>
+    <a class="panel toggle" href="#advfilter">Advanced</a>
+    <a class="panel toggle" href="#playctl">Player</a>
 
     <div class="pagination_nav">
       <label>Page:</label>
-      <a href="?${page_prev}">&lt;&lt;</a>
-      <a href="?${page_this}">$(($page + 1))</a>
-      <a href="?${page_next}">&gt;&gt;</a>
+      $(seq 1 $pagecount \
+        | while read pn; do
+          plink="$(($pn * $pagesize - $pagesize + 1))"
+          printf '<a %s href="?%spn=%s">%s</a>\n' "$([ $plink = $page ] && printf class=current)" "$page_link" "$plink" "$pn"
+        done
+       )
     </div>
   </form>
 
-  $(. $_EXEC/templates/advfilter.html.sh)
+  $(. $_EXEC/templates/playpanel.html.sh)
 
   <form action="?action=multitag&${page_this}" method="post" accept-charset="UTF-8">
     <ul id="thumblist">
@@ -48,16 +51,24 @@ cat <<EOF
     $(. $_EXEC/templates/tagger.html.sh)
   </form>
 
-  <div class="panel footer" id="foot">
-    <a class="panel tagger show" href="#tagger">Add Tags</a>
+  <div class="panel" id="foot">
+    <a class="panel toggle" href="#tagger">Add Tags</a>
+    <a class="panel toggle" href="#preferences">Preferences</a>
+    <a class="panel treeview" href="?p=tree">Browse Folders</a>
 
     <div class="pagination_nav">
       <label>Page:</label>
-      <a href="?${page_prev}">&lt;&lt;</a>
-      <a href="?${page_this}">$(($page + 1))</a>
-      <a href="?${page_next}">&gt;&gt;</a>
+      $(seq 1 $pagecount \
+        | while read pn; do
+          plink="$(($pn * $pagesize - $pagesize + 1))"
+          printf '<a %s href="?%spn=%s">%s</a>\n' "$([ $plink = $page ] && printf class=current)" "$page_link" "$plink" "$pn"
+        done
+       )
     </div>
   </div>
+
+  $(. $_EXEC/templates/preferences.html.sh)
+  $(. $_EXEC/templates/advfilter.html.sh)
 EOF
 
 # vi:set filetype=html: