aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user/dashboard
diff options
context:
space:
mode:
authorJimmy Praet <jimmy.praet@telenet.be>2020-12-27 20:58:03 +0100
committerGitHub <noreply@github.com>2020-12-27 21:58:03 +0200
commit40274b4a935fff50e223751ce3653c2549352b10 (patch)
treea526f098018a04bbb12bccbebc6122ca209fa732 /templates/user/dashboard
parent25f8970b2cc5d2c9fd357ef2c60a54886154f6c9 (diff)
downloadgitea-40274b4a935fff50e223751ce3653c2549352b10.tar.gz
gitea-40274b4a935fff50e223751ce3653c2549352b10.zip
Team dashboards (#14159)
Diffstat (limited to 'templates/user/dashboard')
-rw-r--r--templates/user/dashboard/navbar.tmpl38
-rw-r--r--templates/user/dashboard/repolist.tmpl3
2 files changed, 37 insertions, 4 deletions
diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl
index 890b192f9a..70eb7cce7f 100644
--- a/templates/user/dashboard/navbar.tmpl
+++ b/templates/user/dashboard/navbar.tmpl
@@ -44,21 +44,51 @@
{{if .ContextUser.IsOrganization}}
<div class="right stackable menu">
- <a class="{{if .PageIsNews}}active{{end}} item" style="margin-left: auto" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/dashboard">
+ <div class="item">
+ <div class="ui floating dropdown link jump">
+ <span class="text">
+ {{svg "octicon-people" 18}}
+ {{if .Team}}
+ {{.Team.Name}}
+ {{else}}
+ {{.i18n.Tr "org.teams"}}
+ {{end}}
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </span>
+ <div class="context user overflow menu" tabindex="-1">
+ <div class="ui header">
+ {{.i18n.Tr "home.filter_by_team_repositories"}}
+ </div>
+ <div class="scrolling menu items">
+ <a class="{{if not $.Team}}active selected{{end}} item" title="{{.i18n.Tr "all"}}" href="{{AppSubUrl}}/org/{{$.Org.Name}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
+ {{.i18n.Tr "all"}}
+ </a>
+ {{range .Org.Teams}}
+ {{if not .IncludesAllRepositories}}
+ <a class="{{if $.Team}}{{if eq $.Team.ID .ID}}active selected{{end}}{{end}} item" title="{{.Name}}" href="{{AppSubUrl}}/org/{{$.Org.Name}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}/{{.Name}}">
+ {{.Name}}
+ </a>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+ </div>
+ </div>
+ <a class="{{if .PageIsNews}}active{{end}} item" style="margin-left: auto" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/dashboard{{if .Team}}/{{.Team.Name}}{{end}}">
{{svg "octicon-rss"}}&nbsp;{{.i18n.Tr "activities"}}
</a>
{{if not .UnitIssuesGlobalDisabled}}
- <a class="{{if .PageIsIssues}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/issues">
+ <a class="{{if .PageIsIssues}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/issues{{if .Team}}/{{.Team.Name}}{{end}}">
{{svg "octicon-issue-opened"}}&nbsp;{{.i18n.Tr "issues"}}
</a>
{{end}}
{{if not .UnitPullsGlobalDisabled}}
- <a class="{{if .PageIsPulls}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/pulls">
+ <a class="{{if .PageIsPulls}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/pulls{{if .Team}}/{{.Team.Name}}{{end}}">
{{svg "octicon-git-pull-request"}}&nbsp;{{.i18n.Tr "pull_requests"}}
</a>
{{end}}
{{if and .ShowMilestonesDashboardPage (not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled))}}
- <a class="{{if .PageIsMilestonesDashboard}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/milestones">
+ <a class="{{if .PageIsMilestonesDashboard}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/milestones{{if .Team}}/{{.Team.Name}}{{end}}">
{{svg "octicon-milestone"}}&nbsp;{{.i18n.Tr "milestones"}}
</a>
{{end}}
diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl
index 005e8756ff..9115c62ecd 100644
--- a/templates/user/dashboard/repolist.tmpl
+++ b/templates/user/dashboard/repolist.tmpl
@@ -3,6 +3,9 @@
:search-limit="searchLimit"
:suburl="suburl"
:uid="uid"
+ {{if .Team}}
+ :team-id="{{.Team.ID}}"
+ {{end}}
:more-repos-link="'{{.ContextUser.HomeLink}}'"
{{if not .ContextUser.IsOrganization}}
:organizations="[