add createDriver renderer et handler
This commit is contained in:
parent
f43d02c762
commit
a8ef3b758f
|
@ -144,4 +144,11 @@ func (h *ApplicationHandler) SolidarityService (w http.ResponseWriter, r *http.R
|
|||
h.cache.PutWithTTL(cacheid, accounts, 1*time.Hour)
|
||||
|
||||
h.Renderer.BeneficiariesSolidarity(w, r, accounts, drivers, parcourmobAccounts, cacheid)
|
||||
}
|
||||
|
||||
func (h *ApplicationHandler) CreateDriver (w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
|
||||
|
||||
h.Renderer.CreateDriver(w, r)
|
||||
}
|
2
main.go
2
main.go
|
@ -140,6 +140,8 @@ func main() {
|
|||
//=================================silvermobi====================================
|
||||
application.HandleFunc("/solidarity_service/", applicationHandler.SolidarityService)
|
||||
application.HandleFunc("/solidarity_service/create/{id}", applicationHandler.DriversJourney)
|
||||
application.HandleFunc("/solidarity_service/driver/create", applicationHandler.CreateDriver)
|
||||
|
||||
|
||||
appGroup := application.PathPrefix("/group_module").Subrouter()
|
||||
appGroup.HandleFunc("/", applicationHandler.Groups)
|
||||
|
|
|
@ -114,3 +114,10 @@ func (renderer *Renderer) SolidarityServiceListAvailableDrivers(w http.ResponseW
|
|||
|
||||
renderer.Render("solidarity_service", w, r, files, state)
|
||||
}
|
||||
|
||||
func (renderer *Renderer) CreateDriver(w http.ResponseWriter, r *http.Request) {
|
||||
files := renderer.ThemeConfig.GetStringSlice("views.solidarity_service.create_driver.files")
|
||||
state := NewState(r, renderer.ThemeConfig, solidarityserviceMenu)
|
||||
|
||||
renderer.Render("solidarity_service", w, r, files, state)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue