3 [ -n "$include_widgets" ] && return 0
6 . "$_EXEC/cgilite/storage.sh"
8 w_tags="$(find "$_DATA/" -path '*/.index/meta' -print0 \
10 | cut -d= -f2- |tr , '\n' | sort -u)"
11 w_tags="$(UNSTRING "$w_tags")"
15 [form #search method=GET action=?
17 [option disabled=disabled Order By]
18 [option value=Name Name]
19 [option value=Date Date]
20 [option value=Length Length]
22 [input name=s placeholder=Search value="%s"]
30 fakemp4="$(COOKIE fakemp4)"
33 [form #prefs method="POST" action="?a=setprefs"
36 [label for=prefs_ps Pagesize]
37 [input #prefs_ps type=number name=pagesize value="%s"][br]
38 [radio "mode" "browse" %s #prefs_modebrowse] [label for=prefs_modebrowse Browse Folders][br]
39 [radio "mode" "index" %s #prefs_modeindex ] [label for=prefs_modeindex View Full Index][br]
40 [checkbox "fakemp4" "yes" %s #prefs_fmp4] [label for=prefs_fmp4 Fake .MP4 file ending][br]
41 [submit "store" "store" Set Cookie]
44 "$(HTML "$REQUEST_URI")" "$LISTSIZE" \
45 "$([ "$mode" = index ] || printf checked)" \
46 "$([ "$mode" = index ] && printf checked)" \
47 "$([ "$fakemp4" = yes ] && printf checked)"
51 [ -d "$_DATA/$ITEM/.index" ] || printf '
52 [form #index method="POST" action="?a=spawnindex"
54 [label Set up for Index view: ]
55 [checkbox "recursive" "yes" #spawn_recursive] [label for=spawn_recursive Include subdirectories]
56 [submit "spawn" "spawn" Set up]
58 ' "$(HTML "$REQUEST_URI")"
63 printf '[div #multitag [input type="hidden" name="ref" value="%s"]' "$(HTML "$REQUEST_URI")"
64 printf '[a href="#" Hide][br]'
66 printf '[fieldset [legend %s:][select name=tag size=4 multiple' "Tags"
67 printf %s "$w_tags" |grep -vF ":" |grep -vxF '' \
68 | while read -r tag; do
69 printf '[option value="%s" %s]' "$(HTML "$tag")" "$(HTML "$tag")"
73 printf %s "$w_tags" |cut -sd: -f1 |sort -u \
74 | while read -r category; do
75 printf '[fieldset [legend %s:][select name=tag size=4 multiple' "$(HTML "$category")"
76 printf %s "$w_tags" |grep -wF "${category}" \
77 | while read -r tag; do
78 printf '[option value="%s" %s]' "$(HTML "$tag")" "$(HTML "${tag#*:}")"
83 printf '[fieldset [legend New:][textarea name=newtag\n][button type=Submit Add Tags]]]'