gitea
Зеркало из https://github.com/go-gitea/gitea
1{{if and $.root.SignedUserID (not $.Repository.IsArchived)}}
2<form class="ui form {{if $.hidden}}tw-hidden comment-form{{end}}" action="{{$.root.Issue.Link}}/files/reviews/comments" method="post">
3{{$.root.CsrfTokenHtml}}
4<input type="hidden" name="origin" value="{{if $.root.PageIsPullFiles}}diff{{else}}timeline{{end}}">
5<input type="hidden" name="latest_commit_id" value="{{$.root.AfterCommitID}}">
6<input type="hidden" name="side" value="{{if $.Side}}{{$.Side}}{{end}}">
7<input type="hidden" name="line" value="{{if $.Line}}{{$.Line}}{{end}}">
8<input type="hidden" name="path" value="{{if $.File}}{{$.File}}{{end}}">
9<input type="hidden" name="diff_start_cid">
10<input type="hidden" name="diff_end_cid">
11<input type="hidden" name="diff_base_cid">
12
13{{template "shared/combomarkdowneditor" (dict
14"MarkdownPreviewUrl" (print $.root.Repository.Link "/markup")
15"MarkdownPreviewContext" $.root.RepoLink
16"TextareaName" "content"
17"TextareaPlaceholder" (ctx.Locale.Tr "repo.diff.comment.placeholder")
18"DropzoneParentContainer" "form"
19"DisableAutosize" "true"
20)}}
21
22{{if $.root.IsAttachmentEnabled}}
23<div class="field">
24{{template "repo/upload" $.root}}
25</div>
26{{end}}
27
28<div class="field footer tw-mx-2">
29<span class="markup-info">{{svg "octicon-markdown"}} {{ctx.Locale.Tr "repo.diff.comment.markdown_info"}}</span>
30<div class="tw-text-right">
31{{if $.reply}}
32<button class="ui submit primary tiny button btn-reply" type="submit">{{ctx.Locale.Tr "repo.diff.comment.reply"}}</button>
33<input type="hidden" name="reply" value="{{$.reply}}">
34<input type="hidden" name="single_review" value="true">
35{{else}}
36{{if $.root.CurrentReview}}
37<button name="pending_review" type="submit" class="ui submit primary tiny button btn-add-comment">{{ctx.Locale.Tr "repo.diff.comment.add_review_comment"}}</button>
38{{else}}
39<button name="pending_review" type="submit" class="ui submit primary tiny button btn-start-review">{{ctx.Locale.Tr "repo.diff.comment.start_review"}}</button>
40<button name="single_review" value="true" type="submit" class="ui submit tiny basic button btn-add-single">{{ctx.Locale.Tr "repo.diff.comment.add_single_comment"}}</button>
41{{end}}
42{{end}}
43{{if or (not $.HasComments) $.hidden}}
44<button type="button" class="ui submit tiny basic button btn-cancel cancel-code-comment">{{ctx.Locale.Tr "cancel"}}</button>
45{{end}}
46</div>
47</div>
48</form>
49{{end}}
50