X-Git-Url: http://git.plutz.net/?p=serve0;a=blobdiff_plain;f=widgets.sh;h=b7767c0299afec316cd11bbc7259717b93bdd2ad;hp=c0de813d3d6e2f3bb149c03b97cd58b0d6525b40;hb=dfdfcfb7ac57a823e639a19d268436753385cbed;hpb=d716f2ce1fe64cf87f777490315bc51906001c72 diff --git a/widgets.sh b/widgets.sh index c0de813..b7767c0 100644 --- a/widgets.sh +++ b/widgets.sh @@ -20,6 +20,7 @@ w_prefs(){ mode="$(COOKIE mode)" printf ' [form #prefs method="POST" action="?a=setprefs" + [a href="#" x] [hidden "ref" "%s"] [label for=prefs_ps Pagesize] [input #prefs_ps type=number name=pagesize value="%s"][br] @@ -34,3 +35,14 @@ w_prefs(){ "$([ "$mode" = index ] && printf checked)" \ "$([ "$fakemp4" = yes ] && printf checked)" } + +w_index(){ + [ -d "$_DATA/$ITEM/.index" ] || printf ' + [form #index method="POST" action="?a=spawnindex" + [hidden "ref" "%s"] + [label Set up for Index view: ] + [checkbox "recursive" "yes" #spawn_recursive] [label for=spawn_recursive Include subdirectories] + [submit "spawn" "spawn" Set up] + ] + ' "$(HTML "$REQUEST_URI")" +}