1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Refactor issue page info (#32445)

Fix a longstanding TODO since 2021 (#14826) / 2018 (#2531)
This commit is contained in:
wxiaoguang
2024-11-08 10:21:13 +08:00
committed by GitHub
parent 028e612094
commit 623a2d41cc
8 changed files with 36 additions and 27 deletions

View File

@ -1443,11 +1443,11 @@ func ViewIssue(ctx *context.Context) {
}
if issue.IsPull && !ctx.Repo.CanRead(unit.TypeIssues) {
ctx.Data["IssueType"] = "pulls"
ctx.Data["IssueDependencySearchType"] = "pulls"
} else if !issue.IsPull && !ctx.Repo.CanRead(unit.TypePullRequests) {
ctx.Data["IssueType"] = "issues"
ctx.Data["IssueDependencySearchType"] = "issues"
} else {
ctx.Data["IssueType"] = "all"
ctx.Data["IssueDependencySearchType"] = "all"
}
ctx.Data["IsProjectsEnabled"] = ctx.Repo.CanRead(unit.TypeProjects)