Commit 91ca5b6f by Anthony Woods

Merge pull request #4208 from raintank/suppressNav

add supressNav property to plugin pages.
parents 00dc0783 a8c10dbc
...@@ -90,10 +90,12 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) { ...@@ -90,10 +90,12 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
} }
for _, page := range plugin.Pages { for _, page := range plugin.Pages {
pageLink.Children = append(pageLink.Children, &dtos.NavLink{ if !page.SuppressNav {
Url: setting.AppSubUrl + "/plugins/" + plugin.Id + "/page/" + page.Slug, pageLink.Children = append(pageLink.Children, &dtos.NavLink{
Text: page.Name, Url: setting.AppSubUrl + "/plugins/" + plugin.Id + "/page/" + page.Slug,
}) Text: page.Name,
})
}
} }
data.MainNavLinks = append(data.MainNavLinks, pageLink) data.MainNavLinks = append(data.MainNavLinks, pageLink)
......
...@@ -9,10 +9,11 @@ import ( ...@@ -9,10 +9,11 @@ import (
) )
type AppPluginPage struct { type AppPluginPage struct {
Name string `json:"name"` Name string `json:"name"`
Slug string `json:"slug"` Slug string `json:"slug"`
Component string `json:"component"` Component string `json:"component"`
Role models.RoleType `json:"role"` Role models.RoleType `json:"role"`
SuppressNav bool `json:"suppressNav"`
} }
type AppPluginCss struct { type AppPluginCss struct {
......
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