]> git.plutz.net Git - serve0/blobdiff - templates/playctl.html.sh
styling for pagination links
[serve0] / templates / playctl.html.sh
index d530131c80557f447b320bcbbf735cf6946db729..5d0159791e04095245ae9eaad0fbfe5d0b584dab 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright 2014 - 2016 Paul Hänsch
+# Copyright 2014 - 2017 Paul Hänsch
 #
 # This file is part of Serve0
 # 
@@ -29,11 +29,12 @@ cat <<EOF
   </select>
   <!-- input type="submit" name="submit" value="Find" -->
 
-  <a class="panel" href="${info:+?p=list&amp;${page_this}}${directory:+?p=tree&amp;d=${directory}&amp;${page_this}}#$(urlsafe $info)">Dismiss</a>
+  <a class="panel" href="${_GET[w]:-${info:+?p=list&amp;${page_this}}${directory:+?p=browse&amp;d=${directory}&amp;${page_this}}#$(urlsafe $info)}">Dismiss</a>
 </form>
 
 <input type=radio name=topmenu id=btn_playctl><label for=btn_playctl>Audio</label>
 <form class="panel switchable top playctl" id="advctl" action="?action=playctl" method="post">
+  <input type="hidden" name="referrer" value="$(attribsafe "${REQUEST_URI}")">
   <fieldset class="volume">
     <button type="submit" name="amp" value="off">Amp Off</button>
     <button type="submit" name="amp" value="on">Amp On</button>
@@ -54,15 +55,15 @@ cat <<EOF
   <a class="panel toggle" href="#">Hide</a>
 
   <a class="panel listview" href="?p=list">Index view</a>
-  <a class="panel treeview" href="?p=tree">Browse Folders</a>
+  <a class="panel treeview" href="?p=browse">Browse Folders</a>
 </div>
 
 
 <div id="playctl">
   <h1>$info</h1>
-  <a href="$video">Download</a>
 
-  <form action="?action=playctl" method="post" class="playctl">
+  <form action="${actionuri}" method="post" class="playctl">
+    <input type="hidden" name="referrer" value="$(attribsafe "//${HTTP_HOST}${REQUEST_URI}")">
     <fieldset class="playback">
       <button type="submit" name="seek" value="-60">&lt;&lt;&lt;</button>
       <button type="submit" name="seek" value="-10">&lt;&lt;</button>
@@ -73,7 +74,13 @@ cat <<EOF
     </fieldset>
     <fieldset class="volume">
       $(for n in $(seq 0 5 100); do
-        printf '<button class="%s" type="submit" name="vol" value="%s">&nbsp;</button>' "$([ "$volume" = "$n" ] && printf selected)" "$n"
+        printf '<button class="%s" type="submit" name="vol" value="%s">&nbsp;</button>' \
+          "$( [ "$n" = "$volume" ] && printf selected
+              [ "$n" = "$((volume - 10))" ] && printf llselected
+              [ "$n" = "$((volume -  5))" ] && printf  lselected
+              [ "$n" = "$((volume +  5))" ] && printf  gselected
+              [ "$n" = "$((volume + 10))" ] && printf ggselected
+           )" "$n"
       done)
     </fieldset>
   </form>
@@ -87,6 +94,7 @@ cat <<EOF
 </div>
 
 <form class="panel switchable bottom" id="tagger" action="?action=meta&${page_this}" method="post" accept-charset="UTF-8">
+  <input type="hidden" name="referrer" value="$(attribsafe "${REQUEST_URI}")">
   <input type="hidden" name="length" value="$length">
   <input type="hidden" name="width" value="$width">
   <input type="hidden" name="height" value="$height">