25 lines
761 B
Go
25 lines
761 B
Go
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)
|
|
}
|
|
|
|
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)
|
|
}
|