diff --git a/routers/web/repo/contributors.go b/routers/web/repo/contributors.go index 5fda17469e9..762fbf93795 100644 --- a/routers/web/repo/contributors.go +++ b/routers/web/repo/contributors.go @@ -19,14 +19,8 @@ const ( // Contributors render the page to show repository contributors graph func Contributors(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repo.activity.navbar.contributors") - ctx.Data["PageIsActivity"] = true ctx.Data["PageIsContributors"] = true - - ctx.PageData["contributionType"] = "commits" - - ctx.PageData["repoLink"] = ctx.Repo.RepoLink - ctx.HTML(http.StatusOK, tplContributors) } diff --git a/templates/repo/contributors.tmpl b/templates/repo/contributors.tmpl index 54e3e426a23..6b8a63fe996 100644 --- a/templates/repo/contributors.tmpl +++ b/templates/repo/contributors.tmpl @@ -1,5 +1,6 @@ {{if .Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
{ @@ -59,14 +57,17 @@ export default { type: Object, required: true, }, + repoLink: { + type: String, + required: true, + }, }, data: () => ({ isLoading: false, errorText: '', totalStats: {}, sortedContributors: {}, - repoLink: pageData.repoLink || [], - type: pageData.contributionType, + type: 'commits', contributorsStats: [], xAxisStart: null, xAxisEnd: null, @@ -333,19 +334,17 @@ export default {