wip
This commit is contained in:
@@ -200,7 +200,6 @@ func (server *Server) putContentHandler(filePath string, w http.ResponseWriter,
|
||||
}
|
||||
|
||||
func (server *Server) uiSearchHandler(w http.ResponseWriter, r *http.Request) error {
|
||||
r.URL.Path = strings.TrimPrefix(r.URL.Path, "/ui/files")
|
||||
t, err := server.uiSubTemplates()
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -261,11 +260,11 @@ func (server *Server) uiFilesHandler(w http.ResponseWriter, r *http.Request) err
|
||||
leaf.Title = "My New File"
|
||||
}
|
||||
data := map[string]interface{}{
|
||||
"This": map[string]string{
|
||||
"This": map[string]interface{}{
|
||||
"Title": leaf.Title,
|
||||
"Content": leaf.Content,
|
||||
"ID": r.URL.Path,
|
||||
"PID": strings.TrimPrefix(path.Dir(r.URL.Path), "/"),
|
||||
"ID": id,
|
||||
"PID": id.Pop(),
|
||||
"PTitle": parent.Title,
|
||||
},
|
||||
"Tree": string(branchesJSON),
|
||||
|
||||
Reference in New Issue
Block a user