lot of new functionalities

This commit is contained in:
Arnaud Delcasse
2025-10-14 18:11:13 +02:00
parent a6f70a6e85
commit d992a7984f
164 changed files with 15113 additions and 9442 deletions

View File

@@ -5,9 +5,10 @@ import (
"html/template"
"net/http"
"git.coopgo.io/coopgo-apps/parcoursmob/utils/icons"
"git.coopgo.io/coopgo-apps/parcoursmob/utils/identification"
cache "git.coopgo.io/coopgo-apps/parcoursmob/utils/storage"
"git.coopgo.io/coopgo-apps/parcoursmob/core/utils/icons"
"git.coopgo.io/coopgo-apps/parcoursmob/core/utils/identification"
cache "git.coopgo.io/coopgo-apps/parcoursmob/core/utils/storage"
xlsxrenderer "git.coopgo.io/coopgo-apps/parcoursmob/renderer/xlsx"
"git.coopgo.io/coopgo-platform/emailing"
"git.coopgo.io/coopgo-platform/groups-management/storage"
"github.com/coreos/go-oidc/v3/oidc"
@@ -21,6 +22,7 @@ type Renderer struct {
ThemeConfig *viper.Viper
Mailer *emailing.Mailer
FileStorage cache.FileStorage
XLSX *xlsxrenderer.XLSXRenderer
}
func NewRenderer(global *viper.Viper, templates_dir string, filestorage cache.FileStorage) *Renderer {
@@ -36,6 +38,7 @@ func NewRenderer(global *viper.Viper, templates_dir string, filestorage cache.Fi
GlobalConfig: global,
ThemeConfig: theme,
FileStorage: filestorage,
XLSX: xlsxrenderer.NewXLSXRenderer(global),
}
}
@@ -138,7 +141,8 @@ func NewState(r *http.Request, themeConfig *viper.Viper, menuState string) Rende
Active: menuState == administrationMenu,
},
Menu: menu,
Menu: menu,
ActiveMenu: menuState,
// DEPRECATED
MenuItems: []MenuItem{
@@ -232,14 +236,6 @@ func NewState(r *http.Request, themeConfig *viper.Viper, menuState string) Rende
Icon: "hero:outline/document-text",
})
}
/*if modules["diags"] != nil && modules["diags"].(bool) {
ls.MenuItems = append(ls.MenuItems, MenuItem{
Title: "Diagnostics",
Link: "/app/diags/",
Active: menuState == diagsMenu,
Icon: "hero:outline/document-text",
})
}*/
return RenderState{
IconSet: icons.NewIconSet(iconset),