-# Copyright 2014, 2015 Paul Hänsch
+# Copyright 2014 - 2016 Paul Hänsch
#
# This file is part of Serve0
#
<input type="submit" name="submit" value="Find">
<a class="panel clearsearch" href="?">Clear All</a>
- <a class="panel advanced show" href="?p=filter">Advanced</a>
+ <a class="panel" href="${info:+?p=list&${page_this}}${info:-?p=tree&d=${directory}&${page_this}}">Dismiss</a>
<div class="pagination_nav">
<label>Page:</label>
</div>
</form>
-<div class="panel" id="videoview">
- <a href="${info:+?p=list&${page_this}}${info:-?p=tree&d=${directory}&${page_this}}" class="panel">Dismiss</a>
- <h1>$info</h1>
-
- <div class="video">
- <a href="$video">Full</a>
- <video controls>
- <source src="$video" type='video/mp4; codecs="avc1.4D401E, mp3"'>"
- </video>
- </div>
-
- <div class="tabcontainer">
- <input type="radio" class="tabhandle" name="viewmode" value="view" id="viewmeta" checked>
- <div class="videoinfo tabcontent">
- <label class="meta edit" for="editmeta">Edit</label>
-
- <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>
- $(echo "$tags" |sed -r 's:\|*([^|]+)\|*:<span class="info tag">\1</span>:g')
- ${description:+<span class="info description">$(echo -E "$description" |_wiki)</span>}
- </div>
- </div>
-
- <div class="tabcontainer">
- <input type="radio" class="tabhandle" name="viewmode" value="edit" id="editmeta">
- <form class="videoinfo tabcontent" action="?action=meta&${page_this}" method="post" accept-charset="UTF-8">
- <label class="meta cancel" for="viewmeta">Cancel Edit</label>
-
- <input type="hidden" name="length" value="$length">
- <input type="hidden" name="width" value="$width">
- <input type="hidden" name="height" value="$height">
-
- <span class="info length">$(($length / 60)):$(($length % 60)) min</span>
- <span class="info width" >Width: $width</span>
- <span class="info height">Height: $height</span>
-
- <span class="label tags">Tags:</span>
- <select class="edit tags" name="tag" size="16" multiple>
- $(echo "$taglist" |while read line; do
- echo "<option $(egrep -q "(^|.*\|)$line(\|.*|$)" "$meta" && echo -n selected)>$line</option>"
- done)
- </select>
-
- <label class="moretags">Additional Tags (one per line):</label>
- <textarea class="edit moretags" name="tags" rows="4"></textarea>
-
+<div id="videoview">
+ <h1>$info</h1>
+
+ <a href="$video">Download</a>
+ <video autoplay controls>
+ <source src="$video" type='video/mp4; codecs="avc1.4D401E, mp3"'>"
+ </video>
+
+ <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>
+ $(echo "$tags" |sed -r 's:\|*([^|]+)\|*:<span class="info tag">\1</span>:g')
+ ${description:+<span class="info description">$(echo -E "$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 class="edit description" name="description" rows="4">$description</textarea>
+ <textarea name="description" rows="4">$description</textarea>
+ </p>
+ <input type="submit" value="Edit!">
+ <input type="submit" name="trash" value="Delete Video">
- <input type="submit" value="Submit">
- <input type="submit" name="trash" value="Delete Video">
- <!-- input type="submit" name="cancel" value="Cancel" -->
- </form>
- </div>
-</div>
+ <a class="panel toggle" href="#foot">Hide</a>
-<form>
- <ul id="thumblist">
- $([ -n "$info" ] && thumblist || filelist)
- </ul>
-</form>
+ </form>
+</div>
<div class="panel footer" id="foot">
+ <a class="panel toggle" href="#tagger">Add Tags</a>
+
<div class="pagination_nav">
<label>Page:</label>
<a href="?${page_prev}"><<</a>