Do not assume avatar needs be changed from gravatar.com (#3209)

Always send user to settings screen to change avatar.
Drops "change_custom_avatar" localized message, keeps "change_avatar"
for the generic one.

NOTE: only changes the en-US locale, as per
https://github.com/gogits/gogs/wiki/Contributing-Code#those-we-do-not-accept

NOTE: requires rebuild of bindata.go to fully see effects
This commit is contained in:
Sandro Santilli 2016-06-26 19:51:09 +02:00 committed by 无闻
parent 24caccccdd
commit 76a0e43e88
2 changed files with 3 additions and 8 deletions

View file

@ -220,8 +220,7 @@ org_still_own_repo = This organization still has ownership of repositories, you
target_branch_not_exist = Target branch does not exist. target_branch_not_exist = Target branch does not exist.
[user] [user]
change_avatar = Change your avatar at gravatar.com change_avatar = Change your avatar
change_custom_avatar = Change your avatar in settings
join_on = Joined on join_on = Joined on
repositories = Repositories repositories = Repositories
activity = Public Activity activity = Public Activity

View file

@ -4,12 +4,8 @@
<div class="ui grid"> <div class="ui grid">
<div class="ui five wide column"> <div class="ui five wide column">
<div class="ui card"> <div class="ui card">
{{if and (or .Owner.UseCustomAvatar DisableGravatar) (eq .SignedUserName .Owner.Name)}} {{if eq .SignedUserName .Owner.Name}}
<a class="image poping up" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_custom_avatar"}}" data-variation="inverted tiny" data-position="bottom center"> <a class="image poping up" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
<img src="{{.Owner.AvatarLink}}?s=290" title="{{.Owner.Name}}"/>
</a>
{{else if eq .SignedUserName .Owner.Name}}
<a class="image poping up" href="http://gravatar.com/emails/" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
<img src="{{.Owner.AvatarLink}}?s=290" title="{{.Owner.Name}}"/> <img src="{{.Owner.AvatarLink}}?s=290" title="{{.Owner.Name}}"/>
</a> </a>
{{else}} {{else}}