25 lines
721 B
Go
25 lines
721 B
Go
package renderer
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
const membersMenu = "members"
|
|
|
|
func (renderer *Renderer) MemberDisplay(w http.ResponseWriter, r *http.Request, admins any) {
|
|
files := renderer.ThemeConfig.GetStringSlice("views.members.display.files")
|
|
|
|
state := NewState(r, renderer.ThemeConfig, membersMenu)
|
|
state.ViewState = map[string]any{
|
|
"admins": admins,
|
|
}
|
|
renderer.Render("members_list", w, r, files, state)
|
|
}
|
|
|
|
func (renderer *Renderer) MemberUpdate(w http.ResponseWriter, r *http.Request, user any) {
|
|
files := renderer.ThemeConfig.GetStringSlice("views.members.update.files")
|
|
state := NewState(r, renderer.ThemeConfig, membersMenu)
|
|
state.ViewState = user
|
|
renderer.Render("members_update", w, r, files, state)
|
|
}
|