]> git.plutz.net Git - serve0/blob - templates/list.html.sh
more compact video list
[serve0] / templates / list.html.sh
1 # Copyright 2014 - 2016 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" action="?" method="get" accept-charset="UTF-8">
20     <input type="text" name="s" value="$search" placeholder="Search">
21
22     <select class="order" size="1" name="o" id="o1">
23       <option class="label" selected disabled>Order by</option>
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 toggle" href="#advfilter">Advanced</a>
32     <a class="panel treeview" href="?p=tree">Browse Folders</a>
33     <a class="panel" href="?p=playctl">Player</a>
34
35     <div class="pagination_nav">
36       <label>Page:</label>
37 EOF
38
39   pages="$(
40   seq 1 $(pagecount) \
41   | while read pn; do
42     plink="$(($pn * $pagesize - $pagesize + 1))"
43     
44     case "$plink" in
45       $(($page - $pagesize))) class=previous;;
46       $page) class=current;;
47       $(($page + $pagesize))) class=next;;
48       * ) class='';;
49     esac
50
51     printf '<a class="%s" href="?%spn=%s">%s</a>\n' "$class" "$page_link" "$plink" "$pn"
52   done
53   )"
54   printf %s "$pages"
55       
56 cat <<EOF
57     </div>
58   </form>
59
60   <form action="?action=multitag" method="post" accept-charset="UTF-8">
61     <input type="hidden" name="o" value="${order}">
62     <input type="hidden" name="s" value="${search}">
63     <input type="hidden" name="f" value="${filter}">
64     <input type="hidden" name="pn" value="${page}">
65
66     <ul id="thumblist">
67 EOF
68
69   thumblist
70
71 cat <<EOF
72     </ul>
73     $(. $_EXEC/templates/tagger.html.sh)
74   </form>
75
76   <div class="panel" id="foot">
77     <a class="panel toggle" href="#tagger">Add Tags</a>
78     <a class="panel toggle" href="#preferences">Preferences</a>
79     <a class="panel toggle" href="#">^ top ^</a>
80     
81
82     <div class="pagination_nav">
83       <label>Page:</label>
84       ${pages}
85     </div>
86   </div>
87
88   $(. $_EXEC/templates/preferences.html.sh)
89   $(. $_EXEC/templates/advfilter.html.sh)
90 EOF
91
92 # vi:set filetype=html: