]> git.plutz.net Git - serve0/blob - templates/list.html.sh
preserve current page data when switching filter panel
[serve0] / templates / list.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&${page_this}">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   <form action="?action=multitag&${page_this}" method="post" accept-charset="UTF-8">
43     <ul id="thumblist">
44       $(thumblist)
45     </ul>
46     <div class="panel footer" id="foot">
47       <a class="panel tagger show" href="#foot" onclick="javascript:hide('foot');show_block('tagger');">Add Tags</a>
48
49       <div class="pagination_nav">
50         <label>Page:</label>
51         <a href="?${page_prev}">&lt;&lt;</a>
52         <a href="?${page_this}">$(($page + 1))</a>
53         <a href="?${page_next}">&gt;&gt;</a>
54       </div>
55     </div>
56
57     <div class="panel footer" id="tagger" style="display: none;">
58       <a class="panel tagger hide" href="#"
59        onclick="javascript:hide('tagger');$(for n in $(seq 1 4); do echo "hide('filter$n');"; done)show_block('foot')"
60       >Hide</a>
61       <hr>
62       <p class="help">Add selectetd tags to selected videos.</p>
63       <p class="newtag">
64         <label class="category">None:</label>
65         <select name="ctag" size="12" multiple id="${n}_none">
66          $(echo "$taglist" |sed -rn 's;^([^:]+)$;<option value="\1">\1</option>;p')
67         </select>
68       </p>
69       $(echo "$taglist" |sed -rn 's;^([^:]+):.*$;\1;p' |sort -u |while read cat; do echo "
70       <p class=\"newtag\">
71         <label class=\"category\">${cat}:</label>
72         <input type=\"hidden\" name=\"category\" value=\"$cat\">
73         <select name=\"ctag\" size=\"12\" multiple id=\"${n}_$cat\">
74          $(echo "$taglist" |sed -rn "s;^${cat}:(.*)$;<option value=\"${cat}:\\1\">\\1</option>;p")
75         </select>
76       </p>"
77       done)
78       <p class="newtag additional">
79         <label class="additional">Additional Tags (one per line):</label>
80         <textarea name="tags" rows="2"></textarea>
81       </p>
82       <input type="submit" value="Add Tags!">
83     </div>
84   </form>
85 EOF
86
87 # vi:set filetype=html: