diff options
author | Panagiotis "Ivory" Vasilopoulos <git@n0toose.net> | 2023-07-31 08:44:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-31 08:44:45 +0000 |
commit | d58c5425799335ea57f27461f99ddd1078e9b2de (patch) | |
tree | 917fac7672c6204e9b928385f856a5156e9dbec2 /templates/shared/user | |
parent | 72363be7caa3c253e08daf058e5aebd6e795f0ef (diff) | |
download | gitea-d58c5425799335ea57f27461f99ddd1078e9b2de.tar.gz gitea-d58c5425799335ea57f27461f99ddd1078e9b2de.zip |
Add 'Show on a map' button to Location in profile, fix layout (#26214)
Not too important, but I think that it'd be a pretty neat touch.
Also fixes some layout bugs introduced by a previous PR.
---------
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Caesar Schinas <caesar@caesarschinas.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/shared/user')
-rw-r--r-- | templates/shared/user/profile_big_avatar.tmpl | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/templates/shared/user/profile_big_avatar.tmpl b/templates/shared/user/profile_big_avatar.tmpl index 62b317cdd4..97afbb6580 100644 --- a/templates/shared/user/profile_big_avatar.tmpl +++ b/templates/shared/user/profile_big_avatar.tmpl @@ -24,19 +24,28 @@ <div class="extra content gt-word-break"> <ul> {{if .ContextUser.Location}} - <li>{{svg "octicon-location"}} {{.ContextUser.Location}}</li> + <li> + {{svg "octicon-location"}} + <span class="gt-f1">{{.ContextUser.Location}}</span> + {{if .UserLocationMapURL}} + {{/* We presume that the UserLocationMapURL is safe, as it is provided by the site administrator. */}} + <a href="{{.UserLocationMapURL | Safe}}{{.ContextUser.Location | QueryEscape}}" rel="nofollow noreferrer" data-tooltip-content="{{.locale.Tr "user.show_on_map"}}"> + {{svg "octicon-link-external"}} + </a> + {{end}} + </li> {{end}} {{if (eq .SignedUserID .ContextUser.ID)}} <li> {{svg "octicon-mail"}} - <a href="mailto:{{.ContextUser.Email}}" rel="nofollow">{{.ContextUser.Email}}</a> + <a class="gt-f1" href="mailto:{{.ContextUser.Email}}" rel="nofollow">{{.ContextUser.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"}}"> + <i 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"}}"> + <i data-tooltip-content="{{.locale.Tr "user.email_visibility.private"}}"> {{svg "octicon-lock"}} </i> {{end}} @@ -69,7 +78,7 @@ </li> {{end}} {{end}} - <li>{{svg "octicon-calendar"}} {{.locale.Tr "user.joined_on" (DateTime "short" .ContextUser.CreatedUnix) | Safe}}</li> + <li>{{svg "octicon-calendar"}} <span>{{.locale.Tr "user.joined_on" (DateTime "short" .ContextUser.CreatedUnix) | Safe}}</span></li> {{if and .Orgs .HasOrgsVisible}} <li> <ul class="user-orgs"> |