diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-27 16:31:32 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-27 16:31:32 -0400 |
commit | 34f4af9ebf179dbb24a7da6091b4259d66a3c426 (patch) | |
tree | 41be4b8840f28b03dd12551d6403cd459b9ced10 /routers/repo/issue.go | |
parent | f76eb8a6662dd705f4c59fd59e583a315a1900d2 (diff) | |
download | gitea-34f4af9ebf179dbb24a7da6091b4259d66a3c426.tar.gz gitea-34f4af9ebf179dbb24a7da6091b4259d66a3c426.zip |
Working on issue and install page
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r-- | routers/repo/issue.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index effb1fab37..23571e759b 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -21,13 +21,21 @@ func Issues(ctx *middleware.Context) { ctx.Data["Title"] = "Issues" ctx.Data["IsRepoToolbarIssues"] = true ctx.Data["IsRepoToolbarIssuesList"] = true + ctx.Data["ViewType"] = "all" milestoneId, _ := base.StrTo(ctx.Query("milestone")).Int() page, _ := base.StrTo(ctx.Query("page")).Int() + var posterId int64 = 0 + if ctx.Query("type") == "created_by" { + posterId = ctx.User.Id + ctx.Data["ViewType"] = "created_by" + } + ctx.Data["IssueCreatedCount"] = models.GetUserIssueCount(ctx.User.Id, ctx.Repo.Repository.Id) + // Get issues. - issues, err := models.GetIssues(0, ctx.Repo.Repository.Id, 0, - int64(milestoneId), page, ctx.Query("state") == "closed", false, ctx.Query("labels"), ctx.Query("sortType")) + issues, err := models.GetIssues(0, ctx.Repo.Repository.Id, posterId, int64(milestoneId), page, + ctx.Query("state") == "closed", false, ctx.Query("labels"), ctx.Query("sortType")) if err != nil { ctx.Handle(200, "issue.Issues: %v", err) return |