+# Copyright 2014 - 2016 Paul Hänsch
+#
+# This file is part of Serve0
+#
+# Serve0 is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Serve0 is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# 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">
+ <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>Name</option>
+ <option>Date</option>
+ <option>Length</option>
+ </select>
+ <input type="submit" name="submit" value="Find">
+
+ <a class="panel clearsearch" href="?">Clear All</a>
+ <a class="panel" href="${info:+?p=list&${page_this}}${info:-?p=tree&d=${directory}&${page_this}}#$(urlsafe $info)">Dismiss</a>
+
+ <div class="pagination_nav">
+ <label>Page:</label>
+ <a href="?p=view&${page_prev}"><<</a>
+ <a href="?p=view&${page_this}">$(($page + 1))</a>
+ <a href="?p=view&${page_next}">>></a>
+ </div>
+</form>
+
+<div id="playctl">
+ <h1>$info</h1>
+ <a href="$video">Download</a>
+
+ <form action="?action=playctl" method="post">
+ <button type="submit" name="seek" value="-60"><<<</button>
+ <button type="submit" name="seek" value="-10"><<</button>
+ <button type="submit" name="ctl" value="stop">■</button>
+ <button type="submit" name="ctl" value="pause">|| / ▶</button>
+ <button type="submit" name="seek" value="+10">>></button>
+ <button type="submit" name="seek" value="+60">>>></button>
+ <br>
+ <button type="submit" name="amp" value="off">Amp Off</button>
+ <button type="submit" name="amp" value="on">Amp On</button>
+ $(for n in $(seq 0 5 100); do
+ printf '<button class="%s" type="submit" name="vol" value="%s"> </button>' "$([ "$volume" = "$n" ] && printf selected)" "$n"
+ done)
+ </form>
+
+ <span class="info length">$(($length / 60)):$(($length % 60)) min</span>
+ <span class="info width" >Width: $width</span>
+ <span class="info height">Height: $height</span><br>
+
+ <label class="tags">Tags:</label>
+ $(printf %s\\n "$tags" |sed -r 's:\|*([^|]+)\|*:<span class="info tag">\1</span>:g')
+ ${description:+<span class="info description">$(printf %s "$description" |_wiki)</span>}
+
+ <form class="panel" id="tagger" action="?action=meta&${page_this}" method="post" accept-charset="UTF-8">
+ <input type="hidden" name="length" value="$length">
+ <input type="hidden" name="width" value="$width">
+ <input type="hidden" name="height" value="$height">
+
+ $(
+ for cat in $(list_categories); do
+ printf '<p class="newtag"><label class="category">%s:</label><select name="tag" size="12" multiple>' "${cat}"
+ catt="${cat}:"
+ [ "$catt" = "none:" ] && catt=''
+
+ printf %s "$taglist" |egrep '^'"$catt"'[^:]+$' |while read line; do
+ printf '<option %s value="%s">%s</option>' \
+ "$(egrep -q "(^|.*\|)$line(\|.*|$)" "$meta" && printf selected)" \
+ "$line" "${line#*:}"
+ done
+ printf '</select></p>'
+ done
+ )
+
+ <p class="newtag additional">
+ <label class="additional">Additional Tags (one per line):</label>
+ <textarea name="tags" rows="4"></textarea>
+ </p>
+ <p class="newtag description">
+ <label class="description">Description:</label>
+ <textarea name="description" rows="4">$description</textarea>
+ </p>
+ <input type="submit" value="Edit!">
+ <input type="submit" name="trash" value="Delete Video">
+
+ <a class="panel toggle" href="#foot">Hide</a>
+
+ </form>
+</div>
+
+<div class="panel footer" id="foot">
+ <a class="panel toggle" href="#tagger">Edit Tags</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>
+ </div>
+</div>
+EOF
+
+# vi:set filetype=html: