add path to silvemobi.html in parcourmob/config.yaml + add path and state in renderer/silvermobi.go

This commit is contained in:
Maxime 2024-04-24 12:18:05 +02:00
parent bfc39c22f7
commit cc27f9ef1d
3 changed files with 20 additions and 6 deletions

View File

@ -7,6 +7,7 @@ import (
func (h *ApplicationHandler) SilvermobiBookingList(w http.ResponseWriter, r *http.Request ) {
h.Renderer.SilvermobiBookingList(w, r)
fmt.Println("SilverBookingR")
}

View File

@ -137,11 +137,11 @@ func main() {
application.HandleFunc("/support/", applicationHandler.SupportSend)
/*********************** CODE GROUP **************************/
// silvermobi
application.HandleFunc("/app/silvermobi/", applicationHandler.SilvermobiBookingCreate)
//=================================silvermobi====================================
application.HandleFunc("/app/silvermobi/create", applicationHandler.SilvermobiBookingCreate)
application.HandleFunc("/app/silvermobi/", applicationHandler.SilvermobiBookingList)
application.HandleFunc("/app/silvermobi/", applicationHandler.SilvermobiBookingUpdate)
application.HandleFunc("/app/silvermobi/", applicationHandler.SilvermobiBookingDelete)
application.HandleFunc("/app/silvermobi/update/{memberid}/{bookingid}", applicationHandler.SilvermobiBookingUpdate)
application.HandleFunc("/app/silvermobi/delete/{memberid}/{bookingid}", applicationHandler.SilvermobiBookingDelete)
appGroup := application.PathPrefix("/group_module").Subrouter()
appGroup.HandleFunc("/", applicationHandler.Groups)

View File

@ -1,3 +1,16 @@
package renderer
import (
"net/http"
)
const silvermobiMenu = "silvermobi"
func (renderer *Renderer) SilvermobiBookingList( w http.ResponseWriter, r *http.Request) {
files:= renderer.ThemeConfig.GetStringSlice("views.silvermobi.list.files")
state := NewState(r, renderer.ThemeConfig, silvermobiMenu)
renderer.Render("silvermobi settings", w, r, files, state)
}