A fork of Gitea (see branch `mj`) adding Majority Judgment Polls 𐄷 over Issues and Merge Requests. https://git.mieuxvoter.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
2.7 KiB

  1. {{$resolved := (index .comments 0).IsResolved}}
  2. {{$resolveDoer := (index .comments 0).ResolveDoer}}
  3. {{$isNotPending := (not (eq (index .comments 0).Review.Type 0))}}
  4. <div class="conversation-holder" data-path="{{(index .comments 0).TreePath}}" data-side="{{if lt (index .comments 0).Line 0}}left{{else}}right{{end}}" data-idx="{{(index .comments 0).UnsignedLine}}">
  5. {{if $resolved}}
  6. <div class="ui attached header resolved-placeholder df ac sb">
  7. <div class="ui grey text">
  8. {{svg "octicon-check" 16 "icon mr-2"}}
  9. <b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}
  10. </div>
  11. <div>
  12. <button id="show-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="ui tiny right labeled button show-outdated df ac">
  13. {{svg "octicon-unfold" 16 "mr-3"}}
  14. {{$.i18n.Tr "repo.issues.review.show_resolved"}}
  15. </button>
  16. <button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated df ac">
  17. {{svg "octicon-fold" 16 "mr-3"}}
  18. {{$.i18n.Tr "repo.issues.review.hide_resolved"}}
  19. </button>
  20. </div>
  21. </div>
  22. {{end}}
  23. <div id="code-comments-{{(index .comments 0).ID}}" class="field comment-code-cloud {{if $resolved}}hide{{end}}">
  24. <div class="comment-list">
  25. <ui class="ui comments">
  26. {{template "repo/diff/comments" dict "root" $ "comments" .comments}}
  27. </ui>
  28. </div>
  29. <div class="df je ac fw mt-3">
  30. <div class="ui buttons mr-2">
  31. <button class="ui icon tiny basic button previous-conversation">
  32. {{svg "octicon-arrow-up" 12 "icon"}} {{$.i18n.Tr "repo.issues.previous"}}
  33. </button>
  34. <button class="ui icon tiny basic button next-conversation">
  35. {{svg "octicon-arrow-down" 12 "icon"}} {{$.i18n.Tr "repo.issues.next"}}
  36. </button>
  37. </div>
  38. {{if and $.CanMarkConversation $isNotPending}}
  39. <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">
  40. {{if $resolved}}
  41. {{$.i18n.Tr "repo.issues.review.un_resolve_conversation"}}
  42. {{else}}
  43. {{$.i18n.Tr "repo.issues.review.resolve_conversation"}}
  44. {{end}}
  45. </button>
  46. {{end}}
  47. {{if and $.SignedUserID (not $.Repository.IsArchived)}}
  48. <button class="comment-form-reply ui green tiny labeled icon button ml-2 mr-0">
  49. {{svg "octicon-reply" 16 "reply icon mr-2"}}{{$.i18n.Tr "repo.diff.comment.reply"}}
  50. </button>
  51. {{end}}
  52. </div>
  53. {{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index .comments 0).ReviewID "root" $ "comment" (index .comments 0)}}
  54. </div>
  55. </div>