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) {
}
for _, page := range plugin.Pages {
pageLink.Children = append(pageLink.Children, &dtos.NavLink{
Url: setting.AppSubUrl + "/plugins/" + plugin.Id + "/page/" + page.Slug,
Text: page.Name,
})
if !page.SuppressNav {
pageLink.Children = append(pageLink.Children, &dtos.NavLink{
Url: setting.AppSubUrl + "/plugins/" + plugin.Id + "/page/" + page.Slug,
Text: page.Name,
})
}
}
data.MainNavLinks = append(data.MainNavLinks, pageLink)
......
......@@ -9,10 +9,11 @@ import (
)
type AppPluginPage struct {
Name string `json:"name"`
Slug string `json:"slug"`
Component string `json:"component"`
Role models.RoleType `json:"role"`
Name string `json:"name"`
Slug string `json:"slug"`
Component string `json:"component"`
Role models.RoleType `json:"role"`
SuppressNav bool `json:"suppressNav"`
}
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