1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-09-13 09:26:23 -07:00

Add template override page (doesn't do anything yet)

This commit is contained in:
Eggbertx 2023-12-10 20:46:08 -08:00
parent 72d6b08a27
commit 4c73891ff5
5 changed files with 59 additions and 31 deletions

View file

@ -578,6 +578,19 @@ func registerAdminPages() {
outputStr += "Done building boards<hr />"
return outputStr, nil
}},
Action{
ID: "templates",
Title: "Creat/Edit template overrides",
Permissions: AdminPerms,
Callback: func(writer http.ResponseWriter, request *http.Request, staff *gcsql.Staff, wantsJSON bool, infoEv, errEv *zerolog.Event) (output interface{}, err error) {
buf := bytes.NewBufferString("")
serverutil.MinifyTemplate(gctemplates.ManageTemplateOverride, map[string]any{
"currentTemplate": "manage_stuff.html",
"templateText": "template goes here",
}, buf, "text/html")
return buf.String(), nil
}},
Action{
ID: "wordfilters",
Title: "Wordfilters",