Commit 12270022 by Torkel Ödegaard

added sidemeu stuff

parent a4910c7a
...@@ -84,16 +84,23 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) { ...@@ -84,16 +84,23 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
data.User.LightTheme = true data.User.LightTheme = true
} }
dashboardChildNavs := []*dtos.NavLink{ if c.OrgRole == m.ROLE_ADMIN || c.OrgRole == m.ROLE_EDITOR {
{Text: "Home", Url: setting.AppSubUrl + "/"}, data.MainNavLinks = append(data.MainNavLinks, &dtos.NavLink{
{Text: "Playlists", Url: setting.AppSubUrl + "/playlists"}, Text: "New",
{Text: "Snapshots", Url: setting.AppSubUrl + "/dashboard/snapshots"}, Icon: "fa fa-fw fa-plus",
Url: setting.AppSubUrl + "/",
Children: []*dtos.NavLink{
{Text: "Dashboard", Icon: "icon-gf icon-gf-dashboard", Url: setting.AppSubUrl + "/dashboard/new"},
{Text: "Folder", Icon: "fa fa-fw fa-folder", Url: setting.AppSubUrl + "/dashboard/new"},
{Text: "Import", Icon: "fa fa-fw fa-download", Url: setting.AppSubUrl + "/dashboard/new/?editview=import"},
},
})
} }
if c.OrgRole == m.ROLE_ADMIN || c.OrgRole == m.ROLE_EDITOR { dashboardChildNavs := []*dtos.NavLink{
dashboardChildNavs = append(dashboardChildNavs, &dtos.NavLink{Divider: true}) {Text: "Home", Url: setting.AppSubUrl + "/", Icon: "fa fa-fw fa-home"},
dashboardChildNavs = append(dashboardChildNavs, &dtos.NavLink{Text: "New", Icon: "fa fa-plus", Url: setting.AppSubUrl + "/dashboard/new"}) {Text: "Playlists", Url: setting.AppSubUrl + "/playlists", Icon: "fa fa-fw fa-film"},
dashboardChildNavs = append(dashboardChildNavs, &dtos.NavLink{Text: "Import", Icon: "fa fa-download", Url: setting.AppSubUrl + "/dashboard/new/?editview=import"}) {Text: "Snapshots", Url: setting.AppSubUrl + "/dashboard/snapshots", Icon: "icon-gf icon-gf-snapshot"},
} }
data.MainNavLinks = append(data.MainNavLinks, &dtos.NavLink{ data.MainNavLinks = append(data.MainNavLinks, &dtos.NavLink{
...@@ -124,6 +131,7 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) { ...@@ -124,6 +131,7 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
Url: setting.AppSubUrl + "/datasources", Url: setting.AppSubUrl + "/datasources",
Children: []*dtos.NavLink{ Children: []*dtos.NavLink{
{Text: "List", Url: setting.AppSubUrl + "/datasources", Icon: "icon-gf icon-gf-datasources"}, {Text: "List", Url: setting.AppSubUrl + "/datasources", Icon: "icon-gf icon-gf-datasources"},
{Text: "New", Url: setting.AppSubUrl + "/datasources", Icon: "fa fa-fw fa-plus"},
}, },
}) })
data.MainNavLinks = append(data.MainNavLinks, &dtos.NavLink{ data.MainNavLinks = append(data.MainNavLinks, &dtos.NavLink{
...@@ -131,7 +139,9 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) { ...@@ -131,7 +139,9 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
Icon: "icon-gf icon-gf-apps", Icon: "icon-gf icon-gf-apps",
Url: setting.AppSubUrl + "/plugins", Url: setting.AppSubUrl + "/plugins",
Children: []*dtos.NavLink{ Children: []*dtos.NavLink{
{Text: "List", Url: setting.AppSubUrl + "/datasources", Icon: "icon-gf icon-gf-apps"}, {Text: "Panels", Url: setting.AppSubUrl + "/plugins?type=panel", Icon: "fa fa-fw fa-stop"},
{Text: "Data sources", Url: setting.AppSubUrl + "/plugins?type=datasource", Icon: "icon-gf icon-gf-datasources"},
{Text: "Apps", Url: setting.AppSubUrl + "/plugins?type=app", Icon: "icon-gf icon-gf-apps"},
}, },
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment