]> git.plutz.net Git - serve0/blob - templates/view.html.sh
new folder browse section
[serve0] / templates / view.html.sh
1 # Copyright 2014, 2015 Paul Hänsch
2 #
3 # This file is part of Serve0
4
5 # Serve0 is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9
10 # Serve0 is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU Affero General Public License for more details.
14
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Serve0  If not, see <http://www.gnu.org/licenses/>. 
17
18 cat <<EOF
19 <form class="panel" id="search" style="display: block;" action="?" method="get" accept-charset="UTF-8">
20   <input type="text" name="s" value="$search" placeholder="Search">
21
22   <label for="o1" class="order">Order by:</label>
23   <select class="order" size="1" name="o" id="o1">
24     <option>Name</option>
25     <option>Date</option>
26     <option>Length</option>
27   </select>
28   <input type="submit" name="submit" value="Find">
29
30   <a class="panel clearsearch" href="?">Clear All</a>
31   <a class="panel advanced show" href="?p=filter">Advanced</a>
32
33   <div class="pagination_nav">
34     <label>Page:</label>
35     <a href="?p=view&amp;${page_prev}">&lt;&lt;</a>
36     <a href="?p=view&amp;${page_this}">$(($page + 1))</a>
37     <a href="?p=view&amp;${page_next}">&gt;&gt;</a>
38   </div>
39 </form>
40
41 <div class="panel" id="videoview">
42   <a href="${info:+?p=list&amp;${page_this}}${info:-?p=tree&amp;d=${directory}&amp;${page_this}}" class="panel">Dismiss</a>
43     <h1>$info</h1>
44
45   <div class="video">
46     <a href="$video">Full</a>
47     <video controls>
48       <source src="$video" type='video/mp4; codecs="avc1.4D401E, mp3"'>"
49     </video>
50   </div>
51
52   <div class="tabcontainer">
53     <input type="radio" class="tabhandle" name="viewmode" value="view" id="viewmeta" checked>
54     <div class="videoinfo tabcontent">
55       <label class="meta edit" for="editmeta">Edit</label>
56
57       <span class="info length">$(($length / 60)):$(($length % 60)) min</span>
58       <span class="info width" >Width: $width</span>
59       <span class="info height">Height: $height</span><br>
60
61       <label class="tags">Tags:</label>
62       $(echo "$tags" |sed -r 's:\|*([^|]+)\|*:<span class="info tag">\1</span>:g')
63       ${description:+<span class="info description">$(echo -E "$description" |_wiki)</span>}
64     </div>
65   </div>
66
67   <div class="tabcontainer">
68     <input type="radio" class="tabhandle" name="viewmode" value="edit" id="editmeta">
69     <form class="videoinfo tabcontent" action="?action=meta&${page_this}" method="post" accept-charset="UTF-8">
70       <label class="meta cancel" for="viewmeta">Cancel Edit</label>
71
72       <input type="hidden" name="length" value="$length">
73       <input type="hidden" name="width" value="$width">
74       <input type="hidden" name="height" value="$height">
75
76       <span class="info length">$(($length / 60)):$(($length % 60)) min</span>
77       <span class="info width" >Width: $width</span>
78       <span class="info height">Height: $height</span>
79
80       <span class="label tags">Tags:</span>
81       <select class="edit tags" name="tag" size="16" multiple>
82         $(echo "$taglist" |while read line; do
83           echo "<option $(egrep -q "(^|.*\|)$line(\|.*|$)" "$meta" && echo -n selected)>$line</option>"
84         done)
85       </select>
86
87       <label class="moretags">Additional Tags (one per line):</label>
88       <textarea class="edit moretags" name="tags" rows="4"></textarea>
89
90       <label class="description">Description:</label>
91       <textarea class="edit description" name="description" rows="4">$description</textarea>
92
93       <input type="submit" value="Submit">
94       <input type="submit" name="trash" value="Delete Video">
95       <!-- input type="submit" name="cancel" value="Cancel" -->
96     </form>
97   </div>
98 </div>
99
100 <form>
101   <ul id="thumblist">
102     $([ -n "$info" ] && thumblist || filelist)
103   </ul>
104 </form>
105
106 <div class="panel footer" id="foot">
107   <div class="pagination_nav">
108     <label>Page:</label>
109     <a href="?${page_prev}">&lt;&lt;</a>
110     <a href="?${page_this}">$(($page + 1))</a>
111     <a href="?${page_next}">&gt;&gt;</a>
112   </div>
113 </div>
114 EOF
115
116 # vi:set filetype=html: