gitea源码

recent_commits.go 634B

123456789101112131415161718192021222324252627
  1. // Copyright 2023 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package repo
  4. import (
  5. "net/http"
  6. "code.gitea.io/gitea/modules/templates"
  7. "code.gitea.io/gitea/services/context"
  8. )
  9. const (
  10. tplRecentCommits templates.TplName = "repo/activity"
  11. )
  12. // RecentCommits renders the page to show recent commit frequency on repository
  13. func RecentCommits(ctx *context.Context) {
  14. ctx.Data["Title"] = ctx.Tr("repo.activity.navbar.recent_commits")
  15. ctx.Data["PageIsActivity"] = true
  16. ctx.Data["PageIsRecentCommits"] = true
  17. ctx.PageData["repoLink"] = ctx.Repo.RepoLink
  18. ctx.HTML(http.StatusOK, tplRecentCommits)
  19. }