diff options
Diffstat (limited to 'templates/user/profile.tmpl')
-rw-r--r-- | templates/user/profile.tmpl | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index d4a0f4a3ac..e0e05575fa 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -30,11 +30,29 @@ {{if .Owner.Location}} <li>{{svg "octicon-location"}} {{.Owner.Location}}</li> {{end}} - {{if .ShowUserEmail}} + {{if (eq .SignedUserName .Owner.Name)}} <li> {{svg "octicon-mail"}} <a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a> + <a href="{{AppSubUrl}}/user/settings#keep-email-private"> + {{if .ShowUserEmail}} + <i class="ui right" data-tooltip-content="{{.locale.Tr "user.email_visibility.limited"}}"> + {{svg "octicon-unlock"}} + </i> + {{else}} + <i class="ui right" data-tooltip-content="{{.locale.Tr "user.email_visibility.private"}}"> + {{svg "octicon-lock"}} + </i> + {{end}} + </a> </li> + {{else}} + {{if .ShowUserEmail}} + <li> + {{svg "octicon-mail"}} + <a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a> + </li> + {{end}} {{end}} {{if .Owner.Website}} <li> |