summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff/conversation.tmpl
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2021-05-08 17:28:25 +0200
committerGitHub <noreply@github.com>2021-05-08 18:28:25 +0300
commit2a9b8d173a286a7155306d7d1df6328d1eb98199 (patch)
treeb9ac31d0431d3e092d9b0b0beac723f0f9386cbe /templates/repo/diff/conversation.tmpl
parent24ad131221d8cb0becf726e0570f53838262edf1 (diff)
downloadgitea-2a9b8d173a286a7155306d7d1df6328d1eb98199.tar.gz
gitea-2a9b8d173a286a7155306d7d1df6328d1eb98199.zip
Code comments improvements (#15722)
- Right-align the Reply and Resolve buttons - Center Resolved text and add some padding - Add padding to inline comments - Indent the comment content to align with author name - Re-parent form to allow better button layout space. Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates/repo/diff/conversation.tmpl')
-rw-r--r--templates/repo/diff/conversation.tmpl26
1 files changed, 17 insertions, 9 deletions
diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl
index 7b447d01bf..ea268c5c17 100644
--- a/templates/repo/diff/conversation.tmpl
+++ b/templates/repo/diff/conversation.tmpl
@@ -5,6 +5,7 @@
{{if $resolved}}
<div class="ui attached header resolved-placeholder df ac sb">
<div class="ui grey text">
+ {{svg "octicon-check" 16 "icon mr-2"}}
<b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}
</div>
<div>
@@ -25,15 +26,22 @@
{{template "repo/diff/comments" dict "root" $ "comments" .comments}}
</ui>
</div>
+ <div class="df je ac fw mt-3">
+ {{if and $.CanMarkConversation $isNotPending}}
+ <button class="ui icon tiny basic button resolve-conversation" data-origin="diff" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{(index .comments 0).ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation">
+ {{if $resolved}}
+ {{$.i18n.Tr "repo.issues.review.un_resolve_conversation"}}
+ {{else}}
+ {{$.i18n.Tr "repo.issues.review.resolve_conversation"}}
+ {{end}}
+ </button>
+ {{end}}
+ {{if and $.SignedUserID (not $.Repository.IsArchived)}}
+ <button class="comment-form-reply ui green tiny labeled icon button ml-2 mr-0">
+ {{svg "octicon-reply" 16 "reply icon mr-2"}}{{$.i18n.Tr "repo.diff.comment.reply"}}
+ </button>
+ {{end}}
+ </div>
{{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index .comments 0).ReviewID "root" $ "comment" (index .comments 0)}}
- {{if and $.CanMarkConversation $isNotPending}}
- <button class="ui icon tiny button resolve-conversation" data-origin="diff" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{(index .comments 0).ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation" >
- {{if $resolved}}
- {{$.i18n.Tr "repo.issues.review.un_resolve_conversation"}}
- {{else}}
- {{$.i18n.Tr "repo.issues.review.resolve_conversation"}}
- {{end}}
- </button>
- {{end}}
</div>
</div>