From bcb7f352215be12368de937fc0faa91cdb3d639a Mon Sep 17 00:00:00 2001 From: Jimmy Praet Date: Fri, 8 Jan 2021 22:49:55 +0100 Subject: Do not reload page after adding comments in Pull Request reviews (#13877) Fixed #8861 * use ajax on PR review page * handle review comments * extract duplicate code FetchCodeCommentsByLine was initially more or less copied from fetchCodeCommentsByReview. Now they both use a common findCodeComments function instead * use the Engine that was passed into the method Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao Co-authored-by: Lauris BH --- templates/repo/diff/box.tmpl | 37 +++++++++++++++----------------- templates/repo/diff/comment_form.tmpl | 3 ++- templates/repo/diff/conversation.tmpl | 4 ++-- templates/repo/diff/new_comment.tmpl | 6 ++++-- templates/repo/diff/section_split.tmpl | 8 +++---- templates/repo/diff/section_unified.tmpl | 6 +++--- 6 files changed, 32 insertions(+), 32 deletions(-) (limited to 'templates/repo/diff') diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index ef152fa58b..8533f9b910 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -144,28 +144,25 @@ {{end}} {{if not $.Repository.IsArchived}} -
- {{template "repo/diff/new_comment" dict "root" .}} +
+
+ -
-
- -
- -
-
- {{$.i18n.Tr "loading"}} -
-
-
{{.i18n.Tr "repo.issues.cancel"}}
-
{{.i18n.Tr "repo.issues.save"}}
-
-
+
+ +
+
+ {{$.i18n.Tr "loading"}} +
+
+
{{.i18n.Tr "repo.issues.cancel"}}
+
{{.i18n.Tr "repo.issues.save"}}
- {{end}} +
+
+ {{end}} {{if .IsSplitStyle}}