diff --git a/handlers/application/silvermobi.go b/handlers/application/silvermobi.go index 27309d5..21e986e 100644 --- a/handlers/application/silvermobi.go +++ b/handlers/application/silvermobi.go @@ -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") } diff --git a/main.go b/main.go index b43de57..56c028f 100755 --- a/main.go +++ b/main.go @@ -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) diff --git a/renderer/silvermobi.go b/renderer/silvermobi.go index 7b6a2da..df5eb48 100644 --- a/renderer/silvermobi.go +++ b/renderer/silvermobi.go @@ -1,3 +1,16 @@ package renderer -const silvermobiMenu = "silvermobi" \ No newline at end of file +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) + +}