From ea400eefcd46c4637d666f34345cdc0213b75698 Mon Sep 17 00:00:00 2001 From: Maxime Date: Thu, 25 Apr 2024 14:45:03 +0200 Subject: [PATCH] change varsilvermobi to solidarity_mobility --- main.go | 2 +- renderer/renderer.go | 8 ++++---- renderer/silvermobi.go | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/main.go b/main.go index d713e2d..071139a 100755 --- a/main.go +++ b/main.go @@ -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) diff --git a/renderer/renderer.go b/renderer/renderer.go index 1de92fd..88f8985 100755 --- a/renderer/renderer.go +++ b/renderer/renderer.go @@ -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", }) } diff --git a/renderer/silvermobi.go b/renderer/silvermobi.go index 6e724f3..2521ae7 100644 --- a/renderer/silvermobi.go +++ b/renderer/silvermobi.go @@ -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) }