code.gitea.io/gitea@v1.22.3/templates/user/dashboard/navbar.tmpl (about) 1 <div class="secondary-nav tw-border-b tw-border-b-secondary"> 2 <div class="ui secondary stackable menu"> 3 <div class="item"> 4 <div class="ui floating dropdown jump"> 5 <span class="text truncated-item-container"> 6 {{ctx.AvatarUtils.Avatar .ContextUser 24 "tw-mr-1"}} 7 <span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span> 8 <span class="org-visibility"> 9 {{if .ContextUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} 10 {{if .ContextUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} 11 </span> 12 {{svg "octicon-triangle-down" 14 "dropdown icon tw-ml-1"}} 13 </span> 14 <div class="context user overflow menu"> 15 <div class="ui header"> 16 {{ctx.Locale.Tr "home.switch_dashboard_context"}} 17 </div> 18 <div class="scrolling menu items"> 19 <a class="{{if eq .ContextUser.ID .SignedUser.ID}}active selected{{end}} item truncated-item-container" href="{{AppSubUrl}}/{{if .PageIsIssues}}issues{{else if .PageIsPulls}}pulls{{else if .PageIsMilestonesDashboard}}milestones{{end}}"> 20 {{ctx.AvatarUtils.Avatar .SignedUser}} 21 <span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span> 22 <span class="org-visibility"> 23 {{if .SignedUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} 24 {{if .SignedUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} 25 </span> 26 </a> 27 {{range .Orgs}} 28 <a class="{{if eq $.ContextUser.ID .ID}}active selected{{end}} item truncated-item-container" title="{{.Name}}" href="{{.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}"> 29 {{ctx.AvatarUtils.Avatar .}} 30 <span class="truncated-item-name">{{.ShortName 40}}</span> 31 <span class="org-visibility"> 32 {{if .Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} 33 {{if .Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} 34 </span> 35 </a> 36 {{end}} 37 </div> 38 {{if .SignedUser.CanCreateOrganization}} 39 <a class="item" href="{{AppSubUrl}}/org/create"> 40 {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_org"}} 41 </a> 42 {{end}} 43 </div> 44 </div> 45 </div> 46 {{if .ContextUser.IsOrganization}} 47 <div class="item"> 48 <div class="ui floating dropdown jump"> 49 <span class="text"> 50 {{svg "octicon-people" 18}} 51 {{if .Team}} 52 {{.Team.Name}} 53 {{else}} 54 {{ctx.Locale.Tr "org.teams"}} 55 {{end}} 56 </span> 57 {{svg "octicon-triangle-down" 14 "dropdown icon"}} 58 <div class="context user overflow menu"> 59 <div class="ui header"> 60 {{ctx.Locale.Tr "home.filter_by_team_repositories"}} 61 </div> 62 <div class="scrolling menu items"> 63 <a class="{{if not $.Team}}active selected{{end}} item" title="{{ctx.Locale.Tr "all"}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}"> 64 {{ctx.Locale.Tr "all"}} 65 </a> 66 {{range .Teams}} 67 {{if not .IncludesAllRepositories}} 68 <a class="{{if $.Team}}{{if eq $.Team.ID .ID}}active selected{{end}}{{end}} item" title="{{.Name}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}/{{.Name}}"> 69 {{.Name}} 70 </a> 71 {{end}} 72 {{end}} 73 </div> 74 </div> 75 </div> 76 </div> 77 {{end}} 78 79 {{if .ContextUser.IsOrganization}} 80 <div class="right menu"> 81 <a class="{{if .PageIsNews}}active {{end}}item tw-ml-auto" href="{{.ContextUser.DashboardLink}}{{if .Team}}/{{PathEscape .Team.Name}}{{end}}"> 82 {{svg "octicon-rss"}} {{ctx.Locale.Tr "activities"}} 83 </a> 84 {{if not .UnitIssuesGlobalDisabled}} 85 <a class="{{if .PageIsIssues}}active {{end}}item" href="{{.ContextUser.OrganisationLink}}/issues{{if .Team}}/{{PathEscape .Team.Name}}{{end}}"> 86 {{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "issues"}} 87 </a> 88 {{end}} 89 {{if not .UnitPullsGlobalDisabled}} 90 <a class="{{if .PageIsPulls}}active {{end}}item" href="{{.ContextUser.OrganisationLink}}/pulls{{if .Team}}/{{PathEscape .Team.Name}}{{end}}"> 91 {{svg "octicon-git-pull-request"}} {{ctx.Locale.Tr "pull_requests"}} 92 </a> 93 {{end}} 94 {{if and .ShowMilestonesDashboardPage (not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled))}} 95 <a class="{{if .PageIsMilestonesDashboard}}active {{end}}item" href="{{.ContextUser.OrganisationLink}}/milestones{{if .Team}}/{{PathEscape .Team.Name}}{{end}}"> 96 {{svg "octicon-milestone"}} {{ctx.Locale.Tr "milestones"}} 97 </a> 98 {{end}} 99 <div class="item"> 100 <a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title="{{ctx.Locale.Tr "home.view_home" .ContextUser.Name}}"> 101 {{ctx.Locale.Tr "home.view_home" (.ContextUser.ShortName 40)}} 102 </a> 103 </div> 104 </div> 105 {{end}} 106 </div> 107 </div>