diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-05-11 14:12:45 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-05-11 14:12:45 +0800 |
commit | 55019bfbc5c2b7db7a1f861a90d97e6760433e4d (patch) | |
tree | 07a3ecf9e82b942b3428f0eaa7cce947dce743e8 /routers/repo/issue.go | |
parent | 4d6de6c7b9715a6ccce3f09249b47b984b9a1295 (diff) | |
parent | 7d84cc96e8da9f7389f855be4f86864039843e6c (diff) |
merge all login methods
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r-- | routers/repo/issue.go | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index fc6ee9eb..7aa74735 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -254,10 +254,12 @@ func ViewIssue(ctx *middleware.Context, params martini.Params) { } } - // Update issue-user. - if err = models.UpdateIssueUserPairByRead(ctx.User.Id, issue.Id); err != nil { - ctx.Handle(500, "issue.ViewIssue(UpdateIssueUserPairByRead): %v", err) - return + if ctx.IsSigned { + // Update issue-user. + if err = models.UpdateIssueUserPairByRead(ctx.User.Id, issue.Id); err != nil { + ctx.Handle(500, "issue.ViewIssue(UpdateIssueUserPairByRead): %v", err) + return + } } // Get poster and Assignee. @@ -458,3 +460,11 @@ func Milestones(ctx *middleware.Context) { ctx.HTML(200, "issue/milestone") } + +func NewMilestones(ctx *middleware.Context) { + ctx.Data["Title"] = "New Milestones" + ctx.Data["IsRepoToolbarIssues"] = true + ctx.Data["IsRepoToolbarIssuesList"] = true + + ctx.HTML(200, "issue/milestone_new") +} |