gitea
Зеркало из https://github.com/go-gitea/gitea
1<div id="review-box">
2<button class="ui tiny primary button tw-pr-1 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}}>
3{{ctx.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{{if $.IsShowingAllCommits}}
8<div class="review-box-panel tippy-target">
9<div class="ui segment">
10<form class="ui form form-fetch-action" action="{{.Link}}/reviews/submit" method="post">
11{{.CsrfTokenHtml}}
12<input type="hidden" name="commit_id" value="{{.AfterCommitID}}">
13<div class="field tw-flex tw-items-center">
14<div class="tw-flex-1">{{ctx.Locale.Tr "repo.diff.review.header"}}</div>
15<a class="muted close">{{svg "octicon-x" 16}}</a>
16</div>
17<div class="field">
18{{template "shared/combomarkdowneditor" (dict
19"MarkdownPreviewUrl" (print .Repository.Link "/markup")
20"MarkdownPreviewContext" .RepoLink
21"TextareaName" "content"
22"TextareaPlaceholder" (ctx.Locale.Tr "repo.diff.review.placeholder")
23"DropzoneParentContainer" "form"
24)}}
25</div>
26{{if .IsAttachmentEnabled}}
27<div class="field">
28{{template "repo/upload" .}}
29</div>
30{{end}}
31<div class="divider"></div>
32{{$showSelfTooltip := (and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID))}}
33{{if not $.Issue.IsClosed}}
34{{if $showSelfTooltip}}
35<span class="tw-inline-block" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.review.self_approve"}}">
36<button type="submit" name="type" value="approve" disabled class="ui submit primary tiny button btn-submit">{{ctx.Locale.Tr "repo.diff.review.approve"}}</button>
37</span>
38{{else}}
39<button type="submit" name="type" value="approve" class="ui submit primary tiny button btn-submit">{{ctx.Locale.Tr "repo.diff.review.approve"}}</button>
40{{end}}
41{{end}}
42<button type="submit" name="type" value="comment" class="ui submit tiny basic button btn-submit">{{ctx.Locale.Tr "repo.diff.review.comment"}}</button>
43{{if not $.Issue.IsClosed}}
44{{if $showSelfTooltip}}
45<span class="tw-inline-block" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.review.self_reject"}}">
46<button type="submit" name="type" value="reject" disabled class="ui submit red tiny button btn-submit">{{ctx.Locale.Tr "repo.diff.review.reject"}}</button>
47</span>
48{{else}}
49<button type="submit" name="type" value="reject" class="ui submit red tiny button btn-submit">{{ctx.Locale.Tr "repo.diff.review.reject"}}</button>
50{{end}}
51{{end}}
52</form>
53</div>
54</div>
55{{end}}
56</div>
57