diff --git a/cmd/web.go b/cmd/web.go index 91d675245..73cea7902 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -373,7 +373,6 @@ func runWeb(ctx *cli.Context) { m.Group("/:username/:reponame", func() { m.Get("/settings", repo.Settings) m.Post("/settings", bindIgnErr(auth.RepoSettingForm{}), repo.SettingsPost) - m.Post("/commit/comment/:action/:commitId", repo.CreateCommitComment) m.Group("/settings", func() { m.Route("/collaboration", "GET,POST", repo.SettingsCollaboration) m.Get("/hooks", repo.Webhooks) @@ -442,6 +441,7 @@ func runWeb(ctx *cli.Context) { m.Get("/commits/*", repo.RefCommits) m.Get("/commit/comment/*", repo.GetCommentForm) m.Get("/commit/*", repo.Diff) + m.Post("/commit/comment/:action/:commitId", repo.CreateCommitComment) }, middleware.RepoRef()) m.Get("/compare/:before([a-z0-9]+)...:after([a-z0-9]+)", repo.CompareDiff) diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 9d1f47e0b..35ae03b84 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -386,7 +386,6 @@ func CreateCommitComment(ctx *middleware.Context) { content := ctx.Query("content") line := ctx.Query("line") lineRe, err := regexp.Compile("[0-9]+L[0-9]+") - fmt.Println(ctx.Locale.Tr("repo.commits.comment.required_field")) if len(content) > 0 && lineRe.MatchString(line) { switch ctx.Params(":action") { case "new": diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl index 04044d317..100e67d4b 100644 --- a/templates/repo/diff.tmpl +++ b/templates/repo/diff.tmpl @@ -112,7 +112,7 @@ {{if $line.RightIdx}}{{$line.RightIdx}}{{end}} - {{if $.SignedUser}}{{if $k}}{{end}}{{end}} + {{if $.SignedUser}}{{if $k}}{{end}}{{end}}
{{$line.Content}}
@@ -128,7 +128,7 @@ alt="">
-

{{.Poster.Name}} +

{{.Poster.Name}} {{TimeSince .Created $.Lang}} {{if $.IsRepositoryOwner}}