diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-11-08 10:21:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-08 02:21:13 +0000 |
commit | 623a2d41cc866d31e6348c58cccf336b67a4b2c7 (patch) | |
tree | 0f0e064098dd40d63be2c20935f72de8d0e46c0e /routers | |
parent | 028e6120943107fdfb25bf8ada9e3fc2e14e37e0 (diff) | |
download | gitea-623a2d41cc866d31e6348c58cccf336b67a4b2c7.tar.gz gitea-623a2d41cc866d31e6348c58cccf336b67a4b2c7.zip |
Refactor issue page info (#32445)
Fix a longstanding TODO since 2021 (#14826) / 2018 (#2531)
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/issue.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 1ee6e98afb..c4fc535446 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -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) |