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