change varsilvermobi to solidarity_mobility

This commit is contained in:
Maxime 2024-04-25 14:45:03 +02:00
parent ebad682a65
commit ea400eefcd
3 changed files with 9 additions and 9 deletions

View File

@ -139,7 +139,7 @@ func main() {
//=================================silvermobi====================================
application.HandleFunc("/silvermobi/create", applicationHandler.SilvermobiBookingCreate)
application.HandleFunc("/silvermobi/", applicationHandler.SilvermobiBookingList)
application.HandleFunc("/solidarity_mobility/", applicationHandler.SilvermobiBookingList)
application.HandleFunc("/silvermobi/update/{memberid}/{bookingid}", applicationHandler.SilvermobiBookingUpdate)
application.HandleFunc("/silvermobi/delete/{memberid}/{bookingid}", applicationHandler.SilvermobiBookingDelete)

View File

@ -251,11 +251,11 @@ func NewState(r *http.Request, themeConfig *viper.Viper, menuState string) Rende
Icon: "hero:outline/user-group",
})
}
if modules["silvermobi"] != nil && modules["silvermobi"].(bool) {
if modules["solidarity_mobility"] != nil && modules["solidarity_mobility"].(bool) {
ls.MenuItems = append(ls.MenuItems, MenuItem{
Title: "Silvermobi",
Link: "/app/silvermobi/",
Active: menuState == silvermobiMenu,
Title: "Mobilité solidaire",
Link: "/app/solidarity_mobility/",
Active: menuState == solidaritymobilityMenu,
Icon: "hero:outline/map",
})
}

View File

@ -5,11 +5,11 @@ import (
)
const silvermobiMenu = "silvermobi"
const solidaritymobilityMenu = "solidarity_mobility"
func (renderer *Renderer) SilvermobiBookingList( w http.ResponseWriter, r *http.Request) {
files:= renderer.ThemeConfig.GetStringSlice("views.silvermobi.list.files")
state := NewState(r, renderer.ThemeConfig, silvermobiMenu)
files:= renderer.ThemeConfig.GetStringSlice("views.solidarity_mobility.list.files")
state := NewState(r, renderer.ThemeConfig, solidaritymobilityMenu)
state.ViewState = map[string]any{
"beneficiaries": map[string]any{
"count": "nbaccounts",
@ -20,6 +20,6 @@ func (renderer *Renderer) SilvermobiBookingList( w http.ResponseWriter, r *http.
}
renderer.Render("silvermobi", w, r, files, state)
renderer.Render("solidarity_mobility", w, r, files, state)
}