fix(webui): display user accounts menu entry to admin even on error pages
This commit is contained in:
parent
7a3bf725b0
commit
7abe963bfd
10 changed files with 33 additions and 33 deletions
|
@ -7,15 +7,15 @@ import (
|
|||
|
||||
var errorTemplates = template.Must(template.ParseFS(htmlFS, "html/base.html", "html/error.html"))
|
||||
|
||||
func errorResponse(w http.ResponseWriter, status int, err error) {
|
||||
func errorResponse(w http.ResponseWriter, r *http.Request, status int, err error) {
|
||||
type ErrorData struct {
|
||||
Page
|
||||
Page *Page
|
||||
Err error
|
||||
Status int
|
||||
StatusText string
|
||||
}
|
||||
render(w, errorTemplates, status, &ErrorData{
|
||||
Page: Page{Title: "Error", Section: "error"},
|
||||
Page: makePage(r, &Page{Title: "Error", Section: "error"}),
|
||||
Err: err,
|
||||
Status: status,
|
||||
StatusText: http.StatusText(status),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue