diff options
author | Jonas Franz <info@jonasfranz.software> | 2018-10-22 22:13:35 +0200 |
---|---|---|
committer | techknowlogick <hello@techknowlogick.com> | 2018-10-22 16:13:35 -0400 |
commit | f38fce916ec92cb9ac9fe78fb5284bc8b55a726f (patch) | |
tree | 6516aead70b3ea1a95d9ff1aa42669c07a4d24dd /templates/repo | |
parent | 9458880c068c985692a49caf608f0057c73790bf (diff) | |
download | gitea-f38fce916ec92cb9ac9fe78fb5284bc8b55a726f.tar.gz gitea-f38fce916ec92cb9ac9fe78fb5284bc8b55a726f.zip |
Add comment replies (#5104)
* Add comment replies
* Replace reviewID with review.ID
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/diff/box.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/diff/comment_form.tmpl | 10 | ||||
-rw-r--r-- | templates/repo/diff/section_unified.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/view_content/comments.tmpl | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index b5bc3ee073..729e37c8b9 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -151,7 +151,7 @@ {{ template "repo/diff/comments" dict "root" $ "comments" $line.Comments}} </ui> </div> - {{template "repo/diff/comment_form_datahandler" dict "hidden" true "root" $ "comment" (index $line.Comments 0)}} + {{template "repo/diff/comment_form_datahandler" dict "reply" (index $line.Comments 0).ReviewID "hidden" true "root" $ "comment" (index $line.Comments 0)}} </div> {{end}} </td> @@ -164,7 +164,7 @@ {{ template "repo/diff/comments" dict "root" $ "comments" $line.Comments}} </ui> </div> - {{template "repo/diff/comment_form_datahandler" dict "hidden" true "root" $ "comment" (index $line.Comments 0)}} + {{template "repo/diff/comment_form_datahandler" dict "reply" (index $line.Comments 0).ReviewID "hidden" true "root" $ "comment" (index $line.Comments 0)}} </div> {{end}} </td> diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl index 9683c3e401..9eb557d86b 100644 --- a/templates/repo/diff/comment_form.tmpl +++ b/templates/repo/diff/comment_form.tmpl @@ -25,19 +25,19 @@ <div class="footer"> <span class="markdown-info"><i class="octicon octicon-markdown"></i> {{$.root.i18n.Tr "repo.diff.comment.markdown_info"}}</span> <div class="ui right floated"> - {{if not $.reply}} + {{if $.reply}} + <button name="reply" value="{{$.reply}}" class="ui submit green tiny button btn-reply">{{$.root.i18n.Tr "repo.diff.comment.reply"}}</button> + {{else}} {{if $.root.CurrentReview}} <button name="is_review" value="true" type="submit" class="ui submit green tiny button btn-add-comment">{{$.root.i18n.Tr "repo.diff.comment.add_review_comment"}}</button> {{else}} <button name="is_review" value="true" type="submit" class="ui submit green tiny button btn-start-review">{{$.root.i18n.Tr "repo.diff.comment.start_review"}}</button> + <button type="submit" + class="ui submit tiny basic button btn-add-single">{{$.root.i18n.Tr "repo.diff.comment.add_single_comment"}}</button> {{end}} {{end}} - {{if not $.root.CurrentReview}} - <button type="submit" - class="ui submit tiny basic button btn-add-single">{{$.root.i18n.Tr "repo.diff.comment.add_single_comment"}}</button> - {{end}} {{if or (not $.HasComments) $.hidden}} <button type="button" class="ui submit tiny basic button btn-cancel" onclick="cancelCodeComment(this);">{{$.root.i18n.Tr "cancel"}}</button> {{end}} diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl index c65b8bdf3e..53ccaedbc2 100644 --- a/templates/repo/diff/section_unified.tmpl +++ b/templates/repo/diff/section_unified.tmpl @@ -32,7 +32,7 @@ {{ template "repo/diff/comments" dict "root" $.root "comments" $line.Comments}} </ui> </div> - {{template "repo/diff/comment_form_datahandler" dict "hidden" true "root" $.root "comment" (index $line.Comments 0)}} + {{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index $line.Comments 0).ReviewID "root" $.root "comment" (index $line.Comments 0)}} </div> </td> </tr> diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index ee10ff56f0..4e79fd866c 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -342,7 +342,7 @@ </div> {{end}} </div> - {{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" true "root" $ "comment" (index $comms 0)}} + {{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index $comms 0).ReviewID "root" $ "comment" (index $comms 0)}} </div> </div> {{end}} |