1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-11-03 09:03:01 +00:00

Admin: Port /admin/ to the new template approach

This commit is contained in:
Timur Ismagilov
2022-03-26 18:26:14 +03:00
parent 19d5a9e057
commit 0a273f55f4
8 changed files with 322 additions and 366 deletions

View File

@@ -33,10 +33,9 @@ func initAdmin(r *mux.Router) {
// handlerAdmin provides the admin panel.
func handlerAdmin(w http.ResponseWriter, rq *http.Request) {
var lc = l18n.FromRequest(rq)
w.Header().Set("Content-Type", "text/html;charset=utf-8")
w.WriteHeader(http.StatusOK)
io.WriteString(w, views.Base(lc.Get("admin.panel_title"), views.AdminPanel(lc), lc, user.FromRequest(rq)))
views.AdminPanel(views.MetaFrom(w, rq))
}
// handlerAdminShutdown kills the wiki.