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

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

View File

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

View File

@ -1,3 +1,16 @@
package renderer package renderer
import (
"net/http"
)
const silvermobiMenu = "silvermobi" 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)
}