Add support for single comments

Showing buttons in context

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz
2018-05-11 13:40:17 +02:00
parent 3e5f3c349e
commit 61cc13499a
3 changed files with 16 additions and 7 deletions

View File

@@ -477,7 +477,11 @@ func ViewPullFiles(ctx *context.Context) {
return
}
ctx.Data["CodeComments"] = pathToLineToComment
ctx.Data["CurrentReview"], err = models.GetCurrentReview(ctx.User, issue)
if err != nil && !models.IsErrReviewNotExist(err) {
ctx.ServerError("GetCurrentReview", err)
return
}
ctx.HTML(200, tplPullFiles)
}