| @@ -578,6 +578,7 @@ func safeURL(address string) string { | |||||
| type ContributorInfo struct { | type ContributorInfo struct { | ||||
| UserInfo *models.User // nil for contributor who is not a registered user | UserInfo *models.User // nil for contributor who is not a registered user | ||||
| RelAvatarLink string `json:"rel_avatar_link"` | |||||
| UserName string `json:"user_name"` | UserName string `json:"user_name"` | ||||
| Email string `json:"email"` | Email string `json:"email"` | ||||
| CommitCnt int `json:"commit_cnt"` | CommitCnt int `json:"commit_cnt"` | ||||
| @@ -626,7 +627,7 @@ func Home(ctx *context.Context) { | |||||
| } else { | } else { | ||||
| // new committer info | // new committer info | ||||
| var newContributor = &ContributorInfo{ | var newContributor = &ContributorInfo{ | ||||
| user, user.Name, user.Email, c.CommitCnt, | |||||
| user, user.RelAvatarLink(), user.Name, user.Email, c.CommitCnt, | |||||
| } | } | ||||
| count++ | count++ | ||||
| contributorInfos = append(contributorInfos, newContributor) | contributorInfos = append(contributorInfos, newContributor) | ||||
| @@ -639,7 +640,7 @@ func Home(ctx *context.Context) { | |||||
| existedContributorInfo.CommitCnt += c.CommitCnt | existedContributorInfo.CommitCnt += c.CommitCnt | ||||
| } else { | } else { | ||||
| var newContributor = &ContributorInfo{ | var newContributor = &ContributorInfo{ | ||||
| user, "", c.Email, c.CommitCnt, | |||||
| user, "", "",c.Email, c.CommitCnt, | |||||
| } | } | ||||
| count++ | count++ | ||||
| contributorInfos = append(contributorInfos, newContributor) | contributorInfos = append(contributorInfos, newContributor) | ||||
| @@ -942,7 +943,7 @@ func ContributorsAPI(ctx *context.Context) { | |||||
| } else { | } else { | ||||
| // new committer info | // new committer info | ||||
| var newContributor = &ContributorInfo{ | var newContributor = &ContributorInfo{ | ||||
| user, user.Name, user.Email, c.CommitCnt, | |||||
| user, user.RelAvatarLink(),user.Name, user.Email,c.CommitCnt, | |||||
| } | } | ||||
| count++ | count++ | ||||
| contributorInfos = append(contributorInfos, newContributor) | contributorInfos = append(contributorInfos, newContributor) | ||||
| @@ -955,7 +956,7 @@ func ContributorsAPI(ctx *context.Context) { | |||||
| existedContributorInfo.CommitCnt += c.CommitCnt | existedContributorInfo.CommitCnt += c.CommitCnt | ||||
| } else { | } else { | ||||
| var newContributor = &ContributorInfo{ | var newContributor = &ContributorInfo{ | ||||
| user, "", c.Email, c.CommitCnt, | |||||
| user, "", "",c.Email,c.CommitCnt, | |||||
| } | } | ||||
| count++ | count++ | ||||
| contributorInfos = append(contributorInfos, newContributor) | contributorInfos = append(contributorInfos, newContributor) | ||||