]> git.plutz.net Git - serve0/blobdiff - templates/list.html.sh
styling for pagination links
[serve0] / templates / list.html.sh
index e25daf3c06274e41a41bd2727161313cda7a18e0..e60f3b8b4d4ac9792426c19876841a774c68819d 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright 2014 - 2016 Paul Hänsch
+# Copyright 2014 - 2017 Paul Hänsch
 #
 # This file is part of Serve0
 # 
@@ -16,6 +16,8 @@
 # along with Serve0  If not, see <http://www.gnu.org/licenses/>. 
 
 cat <<EOF
+
+  <input type=radio name=topmenu id=btn_search checked><label for=btn_search>Search</label>
   <form class="panel" id="search" action="?" method="get" accept-charset="UTF-8">
     <input type="text" name="s" value="$search" placeholder="Search">
 
@@ -28,57 +30,46 @@ cat <<EOF
     <!-- input type="submit" name="submit" value="Find" -->
 
     <a class="panel clearsearch" href="?">Clear</a>
-    <a class="panel toggle" href="#morelinks">More</a>
-
-    <div class="pagination_nav">
-      <label>Page:</label>
-EOF
+  </form>
 
-  pages="$(
-  seq 1 $(pagecount) \
-  | while read pn; do
-    plink="$(($pn * $pagesize - $pagesize + 1))"
-    
-    case "$plink" in
-      $(($page - $pagesize))) class=previous;;
-      $page) class=current;;
-      $(($page + $pagesize))) class=next;;
-      * ) class='';;
-    esac
+  <input type=radio name=topmenu id=btn_advfilter><label for=btn_advfilter>Advanced</label>
+  $(. $_EXEC/templates/advfilter.html.sh)
 
-    printf '<a class="%s" href="?%spn=%s">%s</a>\n' "$class" "$page_link" "$plink" "$pn"
-  done
-  )"
-  printf %s "$pages"
-      
-cat <<EOF
-    </div>
-  </form>
+  <input type=radio name=topmenu id=btn_preferences><label for=btn_preferences>Preferences</label>
+  $(. $_EXEC/templates/preferences.html.sh)
 
+  <input type=radio name=topmenu id=btn_morelinks><label for=btn_morelinks>{+}</label>
   <div class="panel switchable top" id="morelinks">
     <a class="panel toggle" href="#">Hide</a>
 
-    <a class="panel toggle" href="#advfilter">Advanced</a>
-    <a class="panel toggle" href="#preferences">Preferences</a>
-
-    <a class="panel treeview" href="?p=tree">Browse Folders</a>
-    <a class="panel" href="?p=quicklinks">Most recent</a>
-
+    <a class="panel treeview" href="?p=browse">Browse Folders</a>
     <a class="panel" href="?p=playctl">Player</a>
   </div>
-  $(. $_EXEC/templates/preferences.html.sh)
 
   <form action="?action=multitag" method="post" accept-charset="UTF-8">
-    <input type="hidden" name="o" value="${order}">
-    <input type="hidden" name="s" value="${search}">
-    <input type="hidden" name="f" value="${filter}">
-    <input type="hidden" name="pn" value="${page}">
+    <input type="hidden" name="page" value="?$(attribsafe "${page_this}")">
 
     <ul id="thumblist">
 EOF
 
   thumblist
 
+  pages="$(
+  seq 1 $(pagecount) \
+  | while read pn; do
+    plink="$(($pn * $pagesize - $pagesize + 1))"
+    
+    case "$plink" in
+      ($(($page - $pagesize))) class=previous;;
+      ($page) class=current;;
+      ($(($page + $pagesize))) class=next;;
+      (*) class='';;
+    esac
+  
+    printf '<a class="%s" href="?%spn=%s">%s</a>\n' "$class" "$page_link" "$plink" "$pn"
+  done
+  )"
+
 cat <<EOF
     </ul>
     $(. $_EXEC/templates/tagger.html.sh)
@@ -94,7 +85,6 @@ cat <<EOF
     </div>
   </div>
 
-  $(. $_EXEC/templates/advfilter.html.sh)
 EOF
 
 # vi:set filetype=html: