2023-02-21 08:36:53 -05:00
|
|
|
<div id="review-box">
|
|
|
|
<button class="ui tiny green button gt-ml-2 gt-mr-0 js-btn-review">
|
2022-06-27 16:58:46 -04:00
|
|
|
{{.locale.Tr "repo.diff.review"}}
|
2022-05-07 01:35:12 -04:00
|
|
|
<span class="ui small label review-comments-counter" data-pending-comment-number="{{.PendingCodeCommentNumber}}">{{.PendingCodeCommentNumber}}</span>
|
2020-10-31 18:15:11 -04:00
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2023-02-21 08:36:53 -05:00
|
|
|
</button>
|
2023-03-17 13:24:00 -04:00
|
|
|
<div class="review-box-panel tippy-target">
|
2023-02-21 08:36:53 -05:00
|
|
|
<div class="ui segment">
|
2018-08-06 00:43:22 -04:00
|
|
|
<form class="ui form" action="{{.Link}}/reviews/submit" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
2023-03-27 12:05:51 -04:00
|
|
|
<input type="hidden" name="commit_id" value="{{.AfterCommitID}}">
|
2023-02-13 12:59:59 -05:00
|
|
|
<div class="header gt-df gt-ac gt-pb-3">
|
|
|
|
<div class="gt-f1">{{$.locale.Tr "repo.diff.review.header"}}</div>
|
|
|
|
<a class="muted close gt-px-3">{{svg "octicon-x" 16}}</a>
|
2018-08-06 00:43:22 -04:00
|
|
|
</div>
|
|
|
|
<div class="ui field">
|
2022-06-27 16:58:46 -04:00
|
|
|
<textarea name="content" tabindex="0" rows="2" placeholder="{{$.locale.Tr "repo.diff.review.placeholder"}}"></textarea>
|
2018-08-06 00:43:22 -04:00
|
|
|
</div>
|
2021-06-14 21:12:33 -04:00
|
|
|
{{if .IsAttachmentEnabled}}
|
|
|
|
<div class="field">
|
|
|
|
{{template "repo/upload" .}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2018-08-06 00:43:22 -04:00
|
|
|
<div class="ui divider"></div>
|
2023-03-20 17:54:23 -04:00
|
|
|
{{$showSelfTooltip := (and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID))}}
|
|
|
|
{{if $showSelfTooltip}}
|
2023-03-24 06:35:38 -04:00
|
|
|
<span class="gt-dib" data-tooltip-content="{{$.locale.Tr "repo.diff.review.self_approve"}}">
|
2023-03-20 17:54:23 -04:00
|
|
|
<button type="submit" name="type" value="approve" disabled class="ui submit green tiny button btn-submit">{{$.locale.Tr "repo.diff.review.approve"}}</button>
|
|
|
|
</span>
|
|
|
|
{{else}}
|
|
|
|
<button type="submit" name="type" value="approve" class="ui submit green tiny button btn-submit">{{$.locale.Tr "repo.diff.review.approve"}}</button>
|
|
|
|
{{end}}
|
2022-06-27 16:58:46 -04:00
|
|
|
<button type="submit" name="type" value="comment" class="ui submit tiny basic button btn-submit">{{$.locale.Tr "repo.diff.review.comment"}}</button>
|
2023-03-20 17:54:23 -04:00
|
|
|
{{if $showSelfTooltip}}
|
2023-03-24 06:35:38 -04:00
|
|
|
<span class="gt-dib" data-tooltip-content="{{$.locale.Tr "repo.diff.review.self_reject"}}">
|
2023-03-20 17:54:23 -04:00
|
|
|
<button type="submit" name="type" value="reject" disabled class="ui submit red tiny button btn-submit">{{$.locale.Tr "repo.diff.review.reject"}}</button>
|
|
|
|
</span>
|
|
|
|
{{else}}
|
|
|
|
<button type="submit" name="type" value="reject" class="ui submit red tiny button btn-submit">{{$.locale.Tr "repo.diff.review.reject"}}</button>
|
|
|
|
{{end}}
|
2018-08-06 00:43:22 -04:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|