diff --git a/templates/group/dashboard/menu.tmpl b/templates/group/dashboard/menu.tmpl new file mode 100644 index 0000000000..d3dd86394f --- /dev/null +++ b/templates/group/dashboard/menu.tmpl @@ -0,0 +1,18 @@ + diff --git a/templates/group/dashboard/menu_item.tmpl b/templates/group/dashboard/menu_item.tmpl new file mode 100644 index 0000000000..8bc0c744d0 --- /dev/null +++ b/templates/group/dashboard/menu_item.tmpl @@ -0,0 +1,19 @@ + + + {{.Item.Title}} + + +{{$d := .Depth}} +{{$one := 1}} +{{$d1 := Eval $d "+" $one}} +{{template "group/dashboard/submenu" dict "." . "Items" (.Item.Children .SignedUser) "Depth" $d1}} diff --git a/templates/group/dashboard/submenu.tmpl b/templates/group/dashboard/submenu.tmpl new file mode 100644 index 0000000000..9f4ac6a640 --- /dev/null +++ b/templates/group/dashboard/submenu.tmpl @@ -0,0 +1,6 @@ +{{ range.Items}} +{{if .IsGroup}} + +{{ template "group/dashboard/menu_item" dict "." $ "Item" . "Depth" $.Depth}} +{{ end }} +{{ end }} diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl index 7eb845833f..53ae80ffbc 100644 --- a/templates/user/dashboard/navbar.tmpl +++ b/templates/user/dashboard/navbar.tmpl @@ -74,25 +74,34 @@ +
+ {{template "group/dashboard/menu" .}} +
{{end}} {{if .ContextUser.IsOrganization}} + {{$suffix := ""}} + {{if .Team}} + {{$suffix = PathEscape .Team.Name}} + {{else if .Group}} + {{$suffix = URLJoin "group" (StringUtils.ToString .Group.ID)}} + {{end}}