1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-30 07:05:50 +00:00

Merge pull request #1464 from jamesa/hide-gravatar-tooltip

Hide avatar tooltips unless you're looking at your own profile
This commit is contained in:
无闻 2015-08-10 23:55:43 +08:00
commit 9c0c16bb5a
2 changed files with 7 additions and 5 deletions

View File

@ -194,7 +194,7 @@ func (u *User) UploadAvatar(data []byte) error {
if err != nil { if err != nil {
return err return err
} }
m := resize.Resize(200, 200, img, resize.NearestNeighbor) m := resize.Resize(234, 234, img, resize.NearestNeighbor)
sess := x.NewSession() sess := x.NewSession()
defer sess.Close() defer sess.Close()

View File

@ -4,12 +4,14 @@
<div id="user-profile-page" class="container clear"> <div id="user-profile-page" class="container clear">
<div class="grid-1-5 left"> <div class="grid-1-5 left">
<div> <div>
{{if .Owner.UseCustomAvatar}} {{if and (.Owner.UseCustomAvatar) (eq .SignedUser.Id .Owner.Id)}}
<a href="{{AppSubUrl}}/user/settings" id="profile-avatar" original-title="{{.i18n.Tr "user.change_custom_avatar"}}"> <a href="{{AppSubUrl}}/user/settings" id="profile-avatar" original-title="{{.i18n.Tr "user.change_custom_avatar"}}">
{{else}} {{else if eq .SignedUser.Id .Owner.Id}}
<a href="http://gravatar.com/emails/" id="profile-avatar" original-title="{{.i18n.Tr "user.change_avatar"}}"> <a href="http://gravatar.com/emails/" id="profile-avatar" original-title="{{.i18n.Tr "user.change_avatar"}}">
{{else}}
<a href="{{.Owner.AvatarLink}}?s=234" id="profile-avatar">
{{end}} {{end}}
<img class="profile-avatar" src="{{.Owner.AvatarLink}}?s=200"title="{{.Owner.Name}}"/> <img class="profile-avatar" src="{{.Owner.AvatarLink}}?s=234" title="{{.Owner.Name}}"/>
</a> </a>
<div class="text-center" id="profile-name"> <div class="text-center" id="profile-name">
{{if .Owner.FullName}}<span id="profile-fullname" class="center-block">{{.Owner.FullName}}</span><br>{{end}} {{if .Owner.FullName}}<span id="profile-fullname" class="center-block">{{.Owner.FullName}}</span><br>{{end}}