parcoursmob/renderer/conseillers.go

25 lines
761 B
Go
Raw Permalink Normal View History

2022-12-14 11:18:11 +00:00
package renderer
import (
"net/http"
)
const conseillersMenu = "conseillers"
func (renderer *Renderer) ConseillerDisplay(w http.ResponseWriter, r *http.Request, admins any) {
files := renderer.ThemeConfig.GetStringSlice("views.conseillers.display.files")
state := NewState(r, renderer.ThemeConfig, conseillersMenu)
state.ViewState = map[string]any{
"admins": admins,
}
renderer.Render("conseillers_list", w, r, files, state)
}
2022-12-15 16:08:30 +00:00
func (renderer *Renderer) ConseillerUpdate(w http.ResponseWriter, r *http.Request, user any) {
files := renderer.ThemeConfig.GetStringSlice("views.conseillers.update.files")
state := NewState(r, renderer.ThemeConfig, conseillersMenu)
state.ViewState = user
renderer.Render("conseillers_update", w, r, files, state)
}