aboutsummaryrefslogtreecommitdiff
path: root/routers/repo/issue.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-22 13:50:50 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-22 13:50:50 -0400
commit61e29226015fad6451281035948c3d8d1364880c (patch)
tree6ef97e9b24040d880913eb09d3e1b00ea4727e2e /routers/repo/issue.go
parente3f55ca0fb0c8aee84f2935b76353ef8ce66384f (diff)
Working on issues
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r--routers/repo/issue.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
new file mode 100644
index 00000000..c6af8ca0
--- /dev/null
+++ b/routers/repo/issue.go
@@ -0,0 +1,30 @@
+// Copyright 2014 The Gogs Authors. All rights reserved.
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file.
+
+package repo
+
+import (
+ "github.com/codegangsta/martini"
+
+ "github.com/gogits/gogs/models"
+ "github.com/gogits/gogs/modules/base"
+ "github.com/gogits/gogs/modules/middleware"
+)
+
+func Issues(ctx *middleware.Context, params martini.Params) {
+ ctx.Data["IsRepoToolbarIssues"] = true
+
+ milestoneId, _ := base.StrTo(params["milestone"]).Int()
+ page, _ := base.StrTo(params["page"]).Int()
+
+ var err error
+ ctx.Data["Issues"], err = models.GetIssues(0, ctx.Repo.Repository.Id, 0,
+ int64(milestoneId), page, params["state"] == "closed", false, params["labels"], params["sortType"])
+ if err != nil {
+ ctx.Handle(200, "issue.Issues: %v", err)
+ return
+ }
+
+ ctx.HTML(200, "repo/issues")
+}