diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/issue.go | 4 | ||||
-rw-r--r-- | routers/user/home.go | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 6a713f9061..afe64c731f 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -286,6 +286,9 @@ func issues(ctx *context.Context, milestoneID int64, isPullOption util.OptionalB assigneeID = 0 // Reset ID to prevent unexpected selection of assignee. } + ctx.Data["IssueRefEndNames"], ctx.Data["IssueRefURLs"] = + issue_service.GetRefEndNamesAndURLs(issues, ctx.Repo.RepoLink) + ctx.Data["ApprovalCounts"] = func(issueID int64, typ string) int64 { counts, ok := approvalCounts[issueID] if !ok || len(counts) == 0 { @@ -1127,6 +1130,7 @@ func ViewIssue(ctx *context.Context) { ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) ctx.Data["IsRepoAdmin"] = ctx.IsSigned && (ctx.Repo.IsAdmin() || ctx.User.IsAdmin) ctx.Data["LockReasons"] = setting.Repository.Issue.LockReasons + ctx.Data["RefEndName"] = git.RefEndName(issue.Ref) ctx.HTML(200, tplIssueView) } diff --git a/routers/user/home.go b/routers/user/home.go index 199694f236..2fc0c60aad 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -22,6 +22,7 @@ import ( "code.gitea.io/gitea/modules/markup/markdown" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" + issue_service "code.gitea.io/gitea/services/issue" pull_service "code.gitea.io/gitea/services/pull" "github.com/keybase/go-crypto/openpgp" @@ -624,6 +625,9 @@ func Issues(ctx *context.Context) { totalIssues = int(allIssueStats.ClosedCount) } + ctx.Data["IssueRefEndNames"], ctx.Data["IssueRefURLs"] = + issue_service.GetRefEndNamesAndURLs(issues, ctx.Query("RepoLink")) + ctx.Data["Issues"] = issues ctx.Data["ApprovalCounts"] = func(issueID int64, typ string) int64 { counts, ok := approvalCounts[issueID] |