diff options
author | Spencer Taylor <smtaylorslc@gmail.com> | 2020-10-06 01:25:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-06 02:25:43 -0400 |
commit | 6eea301829eaddba8f64a821374996b2b41317fc (patch) | |
tree | 492858c49a365a0f41b9a7a49fb9f9b0d1a42c0a /templates/user/dashboard/navbar.tmpl | |
parent | df4bbcd235cec8708cd0cbdd9bcbdd00f5db4fd5 (diff) | |
download | gitea-6eea301829eaddba8f64a821374996b2b41317fc.tar.gz gitea-6eea301829eaddba8f64a821374996b2b41317fc.zip |
Adding visual cue for "Limited" & "Private" organizations. (#13040)
* Adding visual cue for "Limited" & "Private" organizations.
* Moving org visibility CSS styles to .less files.
Co-authored-by: Gitea <gitea@fake.local>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/user/dashboard/navbar.tmpl')
-rw-r--r-- | templates/user/dashboard/navbar.tmpl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl index c94dfa5e8f..a911d1c4e1 100644 --- a/templates/user/dashboard/navbar.tmpl +++ b/templates/user/dashboard/navbar.tmpl @@ -5,6 +5,12 @@ <span class="text"> <img class="ui avatar image" src="{{.ContextUser.RelAvatarLink}}" title="{{.ContextUser.Name}}" width="28" height="28"> {{.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}} <i class="dropdown icon"></i> </span> <div class="context user overflow menu" tabindex="-1"> @@ -20,6 +26,10 @@ <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}}"> <img class="ui avatar image" src="{{.RelAvatarLink}}" width="28" height="28"> {{.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> |