parcoursmob/renderer/members.go

25 lines
721 B
Go
Raw Normal View History

2023-01-17 07:31:07 +00:00
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)
}