2023-02-21 06:36:53 -07:00
|
|
|
<div id="review-box">
|
2023-06-20 17:22:48 -06:00
|
|
|
<button class="ui tiny green button gt-pr-2 gt-df js-btn-review">
|
2022-06-27 14:58:46 -06:00
|
|
|
{{.locale.Tr "repo.diff.review"}}
|
2022-05-06 23:35:12 -06:00
|
|
|
<span class="ui small label review-comments-counter" data-pending-comment-number="{{.PendingCodeCommentNumber}}">{{.PendingCodeCommentNumber}}</span>
|
2020-10-31 16:15:11 -06:00
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2023-02-21 06:36:53 -07:00
|
|
|
</button>
|
2023-03-17 11:24:00 -06:00
|
|
|
<div class="review-box-panel tippy-target">
|
2023-02-21 06:36:53 -07:00
|
|
|
<div class="ui segment">
|
2023-06-14 02:01:37 -06:00
|
|
|
<form class="ui form form-fetch-action" action="{{.Link}}/reviews/submit" method="post">
|
2023-04-03 04:06:57 -06:00
|
|
|
{{.CsrfTokenHtml}}
|
2023-03-27 10:05:51 -06:00
|
|
|
<input type="hidden" name="commit_id" value="{{.AfterCommitID}}">
|
2023-05-12 04:53:41 -06:00
|
|
|
<div class="field gt-df gt-ac">
|
2023-02-13 10:59:59 -07:00
|
|
|
<div class="gt-f1">{{$.locale.Tr "repo.diff.review.header"}}</div>
|
2023-05-12 04:53:41 -06:00
|
|
|
<a class="muted close">{{svg "octicon-x" 16}}</a>
|
2018-08-05 22:43:22 -06:00
|
|
|
</div>
|
2023-05-12 04:53:41 -06:00
|
|
|
<div class="field">
|
2023-04-03 04:06:57 -06:00
|
|
|
{{template "shared/combomarkdowneditor" (dict
|
|
|
|
"locale" $.locale
|
2023-05-12 04:53:41 -06:00
|
|
|
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
|
|
|
"MarkdownPreviewContext" .RepoLink
|
2023-04-03 04:06:57 -06:00
|
|
|
"TextareaName" "content"
|
|
|
|
"TextareaPlaceholder" ($.locale.Tr "repo.diff.review.placeholder")
|
|
|
|
"DropzoneParentContainer" "form"
|
|
|
|
)}}
|
2018-08-05 22:43:22 -06:00
|
|
|
</div>
|
2021-06-14 19:12:33 -06:00
|
|
|
{{if .IsAttachmentEnabled}}
|
|
|
|
<div class="field">
|
|
|
|
{{template "repo/upload" .}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2018-08-05 22:43:22 -06:00
|
|
|
<div class="ui divider"></div>
|
2023-03-20 15:54:23 -06:00
|
|
|
{{$showSelfTooltip := (and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID))}}
|
|
|
|
{{if $showSelfTooltip}}
|
2023-03-24 04:35:38 -06:00
|
|
|
<span class="gt-dib" data-tooltip-content="{{$.locale.Tr "repo.diff.review.self_approve"}}">
|
2023-03-20 15:54:23 -06: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 14:58:46 -06: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 15:54:23 -06:00
|
|
|
{{if $showSelfTooltip}}
|
2023-03-24 04:35:38 -06:00
|
|
|
<span class="gt-dib" data-tooltip-content="{{$.locale.Tr "repo.diff.review.self_reject"}}">
|
2023-03-20 15:54:23 -06: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-05 22:43:22 -06:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|