From 50422f1fc226d71fe2f5f701c7ebdd1a5f2d143e Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 5 Aug 2016 12:12:54 -0700 Subject: #3348 always use relative avatar link in the template --- .github/ISSUE_TEMPLATE.md | 7 ++++--- README.md | 2 +- conf/locale/TRANSLATORS | 1 + gogs.go | 2 +- models/action.go | 2 +- models/user.go | 4 ++-- routers/user/home.go | 2 +- templates/.VERSION | 2 +- templates/base/head.tmpl | 2 +- templates/explore/users.tmpl | 2 +- templates/org/header.tmpl | 2 +- templates/org/home.tmpl | 4 ++-- templates/org/member/members.tmpl | 2 +- templates/org/team/members.tmpl | 2 +- templates/org/team/teams.tmpl | 2 +- templates/repo/commits_table.tmpl | 2 +- templates/repo/create.tmpl | 6 +++--- templates/repo/diff.tmpl | 2 +- templates/repo/forks.tmpl | 2 +- templates/repo/issue/list.tmpl | 4 ++-- templates/repo/issue/new_form.tmpl | 6 +++--- templates/repo/issue/view_content.tmpl | 18 +++++++++--------- templates/repo/migrate.tmpl | 6 +++--- templates/repo/pulls/fork.tmpl | 6 +++--- templates/repo/release/list.tmpl | 2 +- templates/repo/settings/collaboration.tmpl | 2 +- templates/repo/user_cards.tmpl | 2 +- templates/repo/view_list.tmpl | 2 +- templates/user/dashboard/issues.tmpl | 2 +- templates/user/dashboard/navbar.tmpl | 6 +++--- templates/user/meta/header.tmpl | 3 +-- templates/user/profile.tmpl | 6 +++--- 32 files changed, 58 insertions(+), 57 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index a99857436f..da434e203c 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,8 +1,9 @@ The issue will be closed without any reasons if it does not satisfy any of following requirements: -1. Please do NOT post questions or config/deploy problems on GitHub, please use our forum: https://discuss.gogs.io -2. Please take a moment to search that an issue doesn't already exist. -3. Please give all relevant information below for bug reports; incomplete details considered invalid report. +1. Please speak English, we have forum in [Chinese](https://discuss.gogs.io/c/getting-help/getting-help-chinese). +2. Please post questions or config/deploy problems on our forum: https://discuss.gogs.io, here are bugs and feature requests only. +3. Please take a moment to search that an issue doesn't already exist. +4. Please give all relevant information below for bug reports; incomplete details considered invalid report. **You MUST delete above content including this line before posting; too lazy to take this action considered invalid report.** diff --git a/README.md b/README.md index ce80c414de..fe7d0bb352 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra ![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true) -##### Current tip version: 0.9.61 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions) +##### Current tip version: 0.9.62 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions) | Web | UI | Preview | |:-------------:|:-------:|:-------:| diff --git a/conf/locale/TRANSLATORS b/conf/locale/TRANSLATORS index fc1bc20d88..d353897135 100644 --- a/conf/locale/TRANSLATORS +++ b/conf/locale/TRANSLATORS @@ -31,6 +31,7 @@ ilko Ilya Makarov Jamie Mansfield Jean THOMAS +Joubert RedRat Juraj Bubniak Lafriks Lauri Ojansivu diff --git a/gogs.go b/gogs.go index 6a6328db23..dcb92ad2a7 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.9.61.0804" +const APP_VER = "0.9.62.0805" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/models/action.go b/models/action.go index 6e2234fda5..081f96bb2a 100644 --- a/models/action.go +++ b/models/action.go @@ -288,7 +288,7 @@ func (push *PushCommits) AvatarLink(email string) string { log.Error(4, "GetUserByEmail: %v", err) } } else { - push.avatars[email] = u.AvatarLink() + push.avatars[email] = u.RelAvatarLink() } } diff --git a/models/user.go b/models/user.go index 5e9b60addb..ac3d2e819b 100644 --- a/models/user.go +++ b/models/user.go @@ -254,11 +254,11 @@ func (u *User) RelAvatarLink() string { return setting.GravatarSource + u.Avatar } -// AvatarLink returns user avatar link. +// AvatarLink returns user avatar absolute link. func (u *User) AvatarLink() string { link := u.RelAvatarLink() if link[0] == '/' && link[1] != '/' { - return strings.TrimSuffix(setting.AppUrl, "/") + link + return setting.AppUrl + link[1:] } return link } diff --git a/routers/user/home.go b/routers/user/home.go index dab30eb5d2..95d0b582b5 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -77,7 +77,7 @@ func retrieveFeeds(ctx *context.Context, ctxUser *models.User, userID, offset in ctx.Handle(500, "GetUserByName", err) return } - unameAvatars[act.ActUserName] = u.AvatarLink() + unameAvatars[act.ActUserName] = u.RelAvatarLink() } act.ActAvatar = unameAvatars[act.ActUserName] diff --git a/templates/.VERSION b/templates/.VERSION index f60bbf6177..ef9982da04 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.9.61.0804 \ No newline at end of file +0.9.62.0805 \ No newline at end of file diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 1fb91e9aa2..5357bc2a77 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -90,7 +90,7 @@