summaryrefslogtreecommitdiffstats
path: root/templates/user/profile.tmpl
diff options
context:
space:
mode:
authorRémy Boulanouar <rboulanouar@gmail.com>2019-02-18 17:00:27 +0100
committerLauris BH <lauris@nix.lv>2019-02-18 18:00:27 +0200
commit64ce159a6eacc81962d07a8f5ef7f69c17365363 (patch)
treed6b94d035de14df8b1a773d97ab35937cce1d00a /templates/user/profile.tmpl
parentae3a913122d3430ccf14da22f09daf6f636a00f8 (diff)
downloadgitea-64ce159a6eacc81962d07a8f5ef7f69c17365363.tar.gz
gitea-64ce159a6eacc81962d07a8f5ef7f69c17365363.zip
Allow to set organization visibility (public, internal, private) (#1763)
Diffstat (limited to 'templates/user/profile.tmpl')
-rw-r--r--templates/user/profile.tmpl6
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index 5e6fbf4bb8..b3a500e9f6 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -61,10 +61,12 @@
</a>
</li>
*/}}
- {{if .Orgs}}
+ {{if and .Orgs .HasOrgsVisible}}
<li>
{{range .Orgs}}
- <a href="{{.HomeLink}}"><img class="ui mini image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
+ {{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.IsUserPartOfOrg $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}}
+ <a href="{{.HomeLink}}"><img class="ui mini image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
+ {{end}}
{{end}}
</li>
{{end}}