3 [ -n "$include_widgets" ] && return 0
6 . "$_EXEC/cgilite/storage.sh"
8 w_tags="$(find "$_DATA/" -path '*/.index/meta' -exec cut -f4 '{}' + \
9 | cut -d= -f2- |tr , '\n' | sort -u)"
10 w_tags="$(UNSTRING "$w_tags")"
14 [form #search method=GET action=?
16 [option disabled=disabled Order By]
17 [option value=Name Name]
18 [option value=Date Date]
19 [option value=Length Length]
21 [input name=s placeholder=Search value="%s"]
28 fakemp4="$(COOKIE fakemp4)"
31 [form #prefs method="POST" action="?a=setprefs"
34 [label for=prefs_ps Pagesize]
35 [input #prefs_ps type=number name=pagesize value="%s"][br]
36 [radio "mode" "browse" %s #prefs_modebrowse] [label for=prefs_modebrowse Browse Folders][br]
37 [radio "mode" "index" %s #prefs_modeindex ] [label for=prefs_modeindex View Full Index][br]
38 [checkbox "fakemp4" "yes" %s #prefs_fmp4] [label for=prefs_fmp4 Fake .MP4 file ending][br]
39 [submit "store" "store" Set Cookie]
42 "$(HTML "$REQUEST_URI")" "$LISTSIZE" \
43 "$([ "$mode" = index ] || printf checked)" \
44 "$([ "$mode" = index ] && printf checked)" \
45 "$([ "$fakemp4" = yes ] && printf checked)"
49 [ -d "$_DATA/$ITEM/.index" ] || printf '
50 [form #index method="POST" action="?a=spawnindex"
52 [label Set up for Index view: ]
53 [checkbox "recursive" "yes" #spawn_recursive] [label for=spawn_recursive Include subdirectories]
54 [submit "spawn" "spawn" Set up]
56 ' "$(HTML "$REQUEST_URI")"
60 printf '[div #multitag [input type="hidden" name="ref" value="%s"]' "$(HTML "$REQUEST_URI")"
61 printf '[a href="#" Hide][br]'
63 printf '[fieldset [legend %s:][select name=tag size=4 multiple' "Tags"
64 printf %s "$w_tags" |grep -vF ":" |grep -vxF '' \
65 | while read -r tag; do
66 printf '[option value="%s" %s]' "$(HTML "$tag")" "$(HTML "$tag")"
70 printf %s "$w_tags" |cut -sd: -f1 |sort -u \
71 | while read -r category; do
72 printf '[fieldset [legend %s:][select name=tag size=4 multiple' "$(HTML "$category")"
73 printf %s "$w_tags" |grep -wF "${category}" \
74 | while read -r tag; do
75 printf '[option value="%s" %s]' "$(HTML "$tag")" "$(HTML "${tag#*:}")"
80 printf '[fieldset [legend New:][textarea name=newtag\n][button type=Submit Add Tags]]]'