2024-02-24 13:22:51 +03:00
|
|
|
// Copyright 2023 The Gitea Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
package repo
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
2025-03-27 19:40:14 +00:00
|
|
|
"forgejo.org/modules/base"
|
|
|
|
"forgejo.org/services/context"
|
2024-02-24 13:22:51 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
tplRecentCommits base.TplName = "repo/activity"
|
|
|
|
)
|
|
|
|
|
|
|
|
// RecentCommits renders the page to show recent commit frequency on repository
|
|
|
|
func RecentCommits(ctx *context.Context) {
|
|
|
|
ctx.Data["Title"] = ctx.Tr("repo.activity.navbar.recent_commits")
|
|
|
|
|
|
|
|
ctx.Data["PageIsActivity"] = true
|
|
|
|
ctx.Data["PageIsRecentCommits"] = true
|
|
|
|
ctx.PageData["repoLink"] = ctx.Repo.RepoLink
|
|
|
|
|
|
|
|
ctx.HTML(http.StatusOK, tplRecentCommits)
|
|
|
|
}
|