{{/* Folder tree rows (tree.go), shared by the sidebar and the tree picker. Expandable folders are native
: open/close needs no script, and a folder's children load via htmx the first time it opens, unless the server pre-expanded them. A label inside selects its radio without toggling the folder; the rest of the row toggles. */}} {{define "rows"}}{{range .}}{{if .Expandable}}
{{template "label" .}}
{{template "rows" .Children}}
{{else}}
{{template "label" .}}
{{end}}{{end}}{{end}} {{define "row-class"}}tree-row{{if .Active}} is-active{{end}}{{if and (not .Link) (not .Selectable)}} is-disabled{{end}}{{end}} {{define "label"}}{{if .Link}}{{.Name}} {{- else if .Selectable}} {{- else}}{{.Name}}{{end}}{{end}}