mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-17 11:59:30 +00:00
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>
This commit is contained in:
parent
72363be7ca
commit
d58c542579
9 changed files with 54 additions and 11 deletions
|
@ -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">
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
</div>
|
||||
<div class="field">
|
||||
<label for="location">{{.locale.Tr "settings.location"}}</label>
|
||||
<input id="location" name="location" value="{{.SignedUser.Location}}" maxlength="50">
|
||||
<input id="location" name="location" placeholder="{{.locale.Tr "settings.location_placeholder"}}" value="{{.SignedUser.Location}}" maxlength="50">
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue