]> git.plutz.net Git - serve0/blob - templates/tagger.html.sh
merged filter and list page
[serve0] / templates / tagger.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   <div class="panel footer" id="tagger">
20     <a class="panel tagger hide" href="#foot">Hide</a>
21     <hr>
22     <p class="help">Add selectetd tags to selected videos.</p>
23     <p class="newtag">
24       <label class="category">None:</label>
25       <select name="ctag" size="12" multiple id="${n}_none">
26        $(echo "$taglist" |sed -rn 's;^([^:]+)$;<option value="\1">\1</option>;p')
27       </select>
28     </p>
29     $(echo "$taglist" |sed -rn 's;^([^:]+):.*$;\1;p' |sort -u |while read cat; do echo "
30     <p class=\"newtag\">
31       <label class=\"category\">${cat}:</label>
32       <input type=\"hidden\" name=\"category\" value=\"$cat\">
33       <select name=\"ctag\" size=\"12\" multiple id=\"${n}_$cat\">
34        $(echo "$taglist" |sed -rn "s;^${cat}:(.*)$;<option value=\"${cat}:\\1\">\\1</option>;p")
35       </select>
36     </p>"
37     done)
38     <p class="newtag additional">
39       <label class="additional">Additional Tags (one per line):</label>
40       <textarea name="tags" rows="2"></textarea>
41     </p>
42     <input type="submit" value="Add Tags!">
43   </div>
44 EOF
45
46 # vi:set filetype=html: