aboutsummaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2024-12-06 23:29:04 +0900
committerGitHub <noreply@github.com>2024-12-06 14:29:04 +0000
commitfaf5705d29bcfc08e6d7d75cd9694ee859ee7e58 (patch)
treeab8cb642bf8c77ad21eb9defc6757a711743f4cf /services
parent3c4a06273f776df340459c3775d90eb8d20b71e5 (diff)
downloadgitea-faf5705d29bcfc08e6d7d75cd9694ee859ee7e58.tar.gz
gitea-faf5705d29bcfc08e6d7d75cd9694ee859ee7e58.zip
GitHub like repo home page (#32213)
Move some components (description, license, release, language stats) to sidebar --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'services')
-rw-r--r--services/context/repo.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/services/context/repo.go b/services/context/repo.go
index 1eafb7ca48..cf328ca97b 100644
--- a/services/context/repo.go
+++ b/services/context/repo.go
@@ -396,13 +396,6 @@ func repoAssignment(ctx *Context, repo *repo_model.Repository) {
ctx.Repo.Repository = repo
ctx.Data["RepoName"] = ctx.Repo.Repository.Name
ctx.Data["IsEmptyRepo"] = ctx.Repo.Repository.IsEmpty
-
- repoLicenses, err := repo_model.GetRepoLicenses(ctx, ctx.Repo.Repository)
- if err != nil {
- ctx.ServerError("GetRepoLicenses", err)
- return
- }
- ctx.Data["DetectedRepoLicenses"] = repoLicenses.StringList()
}
// RepoAssignment returns a middleware to handle repository assignment
@@ -1036,7 +1029,7 @@ func RepoRefByType(detectRefType RepoRefType, opts ...RepoRefByTypeOptions) func
ctx.Data["IsViewBranch"] = ctx.Repo.IsViewBranch
ctx.Data["IsViewTag"] = ctx.Repo.IsViewTag
ctx.Data["IsViewCommit"] = ctx.Repo.IsViewCommit
- ctx.Data["CanCreateBranch"] = ctx.Repo.CanCreateBranch()
+ ctx.Data["CanCreateBranch"] = ctx.Repo.CanCreateBranch() // only used by the branch selector dropdown: AllowCreateNewRef
ctx.Repo.CommitsCount, err = ctx.Repo.GetCommitsCount()
if err != nil {