]> git.plutz.net Git - serve0/blob - templates/view.html.sh
replaced all javascript bits
[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;"
20         action="?" method="get" accept-charset="UTF-8">
21     <input type="text" name="s" value="$search" placeholder="Search">
22
23     <label for="o1" class="order">Order by:</label>
24     <select class="order" size="1" name="o" id="o1">
25       <option>Name</option>
26       <option>Date</option>
27       <option>Length</option>
28     </select>
29     <input type="submit" name="submit" value="Find">
30
31     <a class="panel clearsearch" href="?">Clear All</a>
32     <a class="panel advanced show" href="?p=filter">Advanced</a>
33
34     <div class="pagination_nav">
35       <label>Page:</label>
36       <a href="?${page_prev}">&lt;&lt;</a>
37       <a href="?${page_this}">$(($page + 1))</a>
38       <a href="?${page_next}">&gt;&gt;</a>
39     </div>
40   </form>
41
42   <div class="panel" id="videoview">
43     <a href="?p=list" class="panel">Dismiss</a>
44     <div class="video">
45       <a href="$video">Full</a>
46       <video controls>
47         <source src="$video" type='video/mp4; codecs="avc1.4D401E, mp3"'>"
48       </video>
49     </div>
50   
51     <div class="tabcontainer">
52     <input type="radio" class="tabhandle" name="viewmode" value="view" id="viewmeta" checked>
53     <div class="videoinfo tabcontent">
54       <h2>$info</h2>
55       <label class="meta edit" for="editmeta">Edit</label>
56
57       <span class="info property">$(($length / 60)):$(($length % 60)) min</span>
58       <span class="info property">Width: $width</span>
59       <span class="info property">Height: $height</span><br>
60
61       <span class="label tags">Tags:</span>
62       $(echo "$tags" |sed -r 's:\|*([^|]+)\|*:<span class="info tag">\1</span>:g')
63       $([ -n "$description" ] && echo "<span class=\"info description\">$(_wiki <<<"$description")</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       <input type="hidden" name="length" value="$length">
71       <input type="hidden" name="width" value="$width">
72       <input type="hidden" name="height" value="$height">
73
74       <h2>$info</h2>
75       <label class="meta cancel" for="viewmeta">Cancel</label>
76
77       <span class="info property">$(($length / 60)):$(($length % 60)) min</span>
78       <span class="info property">Width: $width</span>
79       <span class="info property">Height: $height</span>
80   
81       <span class="label tags">Tags:</span>
82       <select class="edit tags" name="tag" size="16" multiple>
83         $(echo "$taglist" |while read line; do
84           echo "<option $(egrep -q "(^|.*\|)$line(\|.*|$)" "$meta" && echo -n selected)>$line</option>"
85         done)
86       </select>
87
88       <span class="label moretags">Additional Tags (one per line):</span>
89       <textarea class="edit moretags" name="tags" rows="4"></textarea>
90
91       <span class="label description">Description:</span>
92       <textarea class="edit description" name="description" rows="4">$description</textarea>
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       $(thumblist)
103     </ul>
104     <div class="panel footer" id="foot">
105       <div class="pagination_nav">
106         <label>Page:</label>
107         <a href="?${page_prev}">&lt;&lt;</a>
108         <a href="?${page_this}">$(($page + 1))</a>
109         <a href="?${page_next}">&gt;&gt;</a>
110       </div>
111     </div>
112   </form>
113 EOF
114
115 # vi:set filetype=html: