{{define "list"}}
{{range .append}}{{end}} {{$sort := meta .sort}} {{$reverse := meta .reverse}} {{range .append}} {{if eq $sort .}} {{else if eq $reverse .}} {{else if eq . "path"}} {{else}} {{end}} {{end}} {{if .append}} {{$meta := .}} {{$first := index .append 0}} {{range $i, $k := index . $first}} {{range $key := index $meta "append"}} {{if eq $key "name"}} {{else if eq $key "path"}} {{else}} {{end}} {{end}} {{end}} {{end}}
{{.}}{{.}}{{.}}
{{index $meta $key $i}} {{index $meta $key $i}}
{{end}} {{define "git"}}
branch
{{index . "branch"}}
status
{{index . "status"}}
{{end}} {{define "upload"}}
upload
{{end}} {{define "create"}}
create
filename:
content:
{{end}} {{define "main"}} {{$msg := .}} {{$meta := .Meta}} {{range .Meta.tmpl}} {{if eq . "login"}} {{template "login" $meta}} {{else if eq . "userinfo"}} {{template "userinfo" $meta}} {{else if eq . "share"}} {{template "share" $msg.Sessions.share}} {{else if eq . "list"}} {{template "list" $msg.Sessions.list.Meta}} {{else if eq . "git"}} {{if $msg.Sessions.git}} {{template "git" $msg.Sessions.git.Meta}} {{end}} {{else if eq . "upload"}} {{template "upload" $meta}} {{else if eq . "create"}} {{template "create" $meta}} {{end}} {{end}} {{end}}