mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-26 17:34:11 -05:00
b5c26fa825
Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/2909352c-b2ab-4d77-b410-9f08c2f5a154) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/9448fa75-e29b-4f95-a30f-03c73c083a83) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
51 lines
2.4 KiB
Handlebars
51 lines
2.4 KiB
Handlebars
<div id="review-box">
|
|
<button class="ui tiny green button gt-ml-2 gt-mr-0 js-btn-review">
|
|
{{.locale.Tr "repo.diff.review"}}
|
|
<span class="ui small label review-comments-counter" data-pending-comment-number="{{.PendingCodeCommentNumber}}">{{.PendingCodeCommentNumber}}</span>
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
</button>
|
|
<div class="review-box-panel tippy-target">
|
|
<div class="ui segment">
|
|
<form class="ui form" action="{{.Link}}/reviews/submit" method="post">
|
|
{{.CsrfTokenHtml}}
|
|
<input type="hidden" name="commit_id" value="{{.AfterCommitID}}">
|
|
<div class="field gt-df gt-ac">
|
|
<div class="gt-f1">{{$.locale.Tr "repo.diff.review.header"}}</div>
|
|
<a class="muted close">{{svg "octicon-x" 16}}</a>
|
|
</div>
|
|
<div class="field">
|
|
{{template "shared/combomarkdowneditor" (dict
|
|
"locale" $.locale
|
|
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
|
"MarkdownPreviewContext" .RepoLink
|
|
"TextareaName" "content"
|
|
"TextareaPlaceholder" ($.locale.Tr "repo.diff.review.placeholder")
|
|
"DropzoneParentContainer" "form"
|
|
)}}
|
|
</div>
|
|
{{if .IsAttachmentEnabled}}
|
|
<div class="field">
|
|
{{template "repo/upload" .}}
|
|
</div>
|
|
{{end}}
|
|
<div class="ui divider"></div>
|
|
{{$showSelfTooltip := (and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID))}}
|
|
{{if $showSelfTooltip}}
|
|
<span class="gt-dib" data-tooltip-content="{{$.locale.Tr "repo.diff.review.self_approve"}}">
|
|
<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}}
|
|
<button type="submit" name="type" value="comment" class="ui submit tiny basic button btn-submit">{{$.locale.Tr "repo.diff.review.comment"}}</button>
|
|
{{if $showSelfTooltip}}
|
|
<span class="gt-dib" data-tooltip-content="{{$.locale.Tr "repo.diff.review.self_reject"}}">
|
|
<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}}
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|