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.

new_review.tmpl 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <div id="review-box">
  2. <button class="ui tiny green button gt-ml-2 gt-mr-0 js-btn-review">
  3. {{.locale.Tr "repo.diff.review"}}
  4. <span class="ui small label review-comments-counter" data-pending-comment-number="{{.PendingCodeCommentNumber}}">{{.PendingCodeCommentNumber}}</span>
  5. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  6. </button>
  7. <div class="review-box-panel tippy-target">
  8. <div class="ui segment">
  9. <form class="ui form" action="{{.Link}}/reviews/submit" method="post">
  10. {{.CsrfTokenHtml}}
  11. <input type="hidden" name="commit_id" value="{{.AfterCommitID}}">
  12. <div class="header gt-df gt-ac gt-pb-3">
  13. <div class="gt-f1">{{$.locale.Tr "repo.diff.review.header"}}</div>
  14. <a class="muted close gt-px-3">{{svg "octicon-x" 16}}</a>
  15. </div>
  16. <div class="ui field">
  17. <textarea name="content" tabindex="0" rows="2" placeholder="{{$.locale.Tr "repo.diff.review.placeholder"}}"></textarea>
  18. </div>
  19. {{if .IsAttachmentEnabled}}
  20. <div class="field">
  21. {{template "repo/upload" .}}
  22. </div>
  23. {{end}}
  24. <div class="ui divider"></div>
  25. {{$showSelfTooltip := (and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID))}}
  26. {{if $showSelfTooltip}}
  27. <span class="gt-dib" data-tooltip-content="{{$.locale.Tr "repo.diff.review.self_approve"}}">
  28. <button type="submit" name="type" value="approve" disabled class="ui submit green tiny button btn-submit">{{$.locale.Tr "repo.diff.review.approve"}}</button>
  29. </span>
  30. {{else}}
  31. <button type="submit" name="type" value="approve" class="ui submit green tiny button btn-submit">{{$.locale.Tr "repo.diff.review.approve"}}</button>
  32. {{end}}
  33. <button type="submit" name="type" value="comment" class="ui submit tiny basic button btn-submit">{{$.locale.Tr "repo.diff.review.comment"}}</button>
  34. {{if $showSelfTooltip}}
  35. <span class="gt-dib" data-tooltip-content="{{$.locale.Tr "repo.diff.review.self_reject"}}">
  36. <button type="submit" name="type" value="reject" disabled class="ui submit red tiny button btn-submit">{{$.locale.Tr "repo.diff.review.reject"}}</button>
  37. </span>
  38. {{else}}
  39. <button type="submit" name="type" value="reject" class="ui submit red tiny button btn-submit">{{$.locale.Tr "repo.diff.review.reject"}}</button>
  40. {{end}}
  41. </form>
  42. </div>
  43. </div>
  44. </div>