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