gitea/templates/user/dashboard/navbar.tmpl

74 lines
3.4 KiB
Handlebars
Raw Normal View History

<div class="dashboard-navbar">
<div class="ui secondary stackable menu">
<div class="item">
<div class="ui floating dropdown link jump">
<span class="text">
{{avatar .ContextUser}}
{{.ContextUser.ShortName 20}}
{{if .ContextUser.IsOrganization}}
<span class="org-visibility">
{{if .ContextUser.Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
{{if .ContextUser.Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
</span>
{{end}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
</span>
<div class="context user overflow menu" tabindex="-1">
<div class="ui header">
{{.i18n.Tr "home.switch_dashboard_context"}}
</div>
<div class="scrolling menu items">
<a class="{{if eq .ContextUser.ID .SignedUser.ID}}active selected{{end}} item" href="{{AppSubUrl}}/{{if .PageIsIssues}}issues{{else if .PageIsPulls}}pulls{{else if .PageIsMilestonesDashboard}}milestones{{end}}">
{{avatar .SignedUser}}
</a>
{{range .Orgs}}
<a class="{{if eq $.ContextUser.ID .ID}}active selected{{end}} item" title="{{.Name}}" href="{{AppSubUrl}}/org/{{.Name}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
{{avatar .}}
{{.ShortName 20}}
<span class="org-visibility">
{{if .Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{$.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
{{if .Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{$.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
</span>
</a>
{{end}}
</div>
{{if .SignedUser.CanCreateOrganization}}
<a class="item" href="{{AppSubUrl}}/org/create">
{{svg "octicon-plus"}}&nbsp;&nbsp;&nbsp;{{.i18n.Tr "new_org"}}
</a>
{{end}}
</div>
</div>
</div>
2015-08-25 18:01:06 +02:00
{{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">
{{svg "octicon-rss"}}&nbsp;{{.i18n.Tr "activities"}}
</a>
{{if not .UnitIssuesGlobalDisabled}}
<a class="{{if .PageIsIssues}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/issues">
{{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">
{{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">
{{svg "octicon-milestone"}}&nbsp;{{.i18n.Tr "milestones"}}
</a>
{{end}}
<div class="item">
<a class="ui blue basic button" href="{{.ContextUser.HomeLink}}" title='{{.i18n.Tr "home.view_home" .ContextUser.Name}}'>
{{.i18n.Tr "home.view_home" (.ContextUser.ShortName 20)}}
</a>
</div>
</div>
{{end}}
</div>
2015-08-25 16:58:34 +02:00
</div>
<div class="ui divider"></div>