all but todo is at least semi functional
This commit is contained in:
@@ -260,18 +260,18 @@ func (server *Server) uiFilesHandler(w http.ResponseWriter, r *http.Request) err
|
||||
if len(id) > 1 && parent.Title == "" {
|
||||
return err
|
||||
}
|
||||
leaf.Title = "My New File"
|
||||
}
|
||||
data := map[string]interface{}{
|
||||
"This": map[string]string{
|
||||
"Title": leaf.Title,
|
||||
"Content": leaf.Content,
|
||||
"ID": r.URL.Path,
|
||||
"PID": path.Dir(r.URL.Path),
|
||||
"PID": strings.TrimPrefix(path.Dir(r.URL.Path), "/"),
|
||||
"PTitle": parent.Title,
|
||||
},
|
||||
"Tree": string(branchesJSON),
|
||||
}
|
||||
log.Printf("%v => %+v", id, data)
|
||||
return t.Lookup("files").Execute(w, data)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user