-# 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" href="?p=playctl">Player</a>
<div class="pagination_nav">
<label>Page:</label>
- <a href="?${page_prev}"><<</a>
- <a href="?${page_this}">$(($page + 1))</a>
- <a href="?${page_next}">>></a>
+EOF
+
+ 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
+
+cat <<EOF
</div>
</form>
- $(. $_EXEC/templates/advfilter.html.sh)
-
<form action="?action=multitag&${page_this}" method="post" accept-charset="UTF-8">
<ul id="thumblist">
- $(thumblist)
+EOF
+
+ thumblist
+
+cat <<EOF
</ul>
- $($_EXEC/templates/tagger.html.sh)
+ $(. $_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}"><<</a>
- <a href="?${page_this}">$(($page + 1))</a>
- <a href="?${page_next}">>></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: