mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-18 03:18:25 -07:00
86fdba177a
* Add octicon SVG sprite Signed-off-by: jolheiser <john.olheiser@gmail.com> * Static prefix Signed-off-by: jolheiser <john.olheiser@gmail.com> * SVG for all repo icons Signed-off-by: jolheiser <john.olheiser@gmail.com> * make vendor Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swap out octicons Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move octicons to top of less imports Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix JS Signed-off-by: jolheiser <john.olheiser@gmail.com> * Definitely not a search/replace Signed-off-by: jolheiser <john.olheiser@gmail.com> * Missed regex Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move to more generic calls and webpack Signed-off-by: jolheiser <john.olheiser@gmail.com> * make svg -> make webpack Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove svg-sprite Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Missed a test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove svg from makefile Signed-off-by: jolheiser <john.olheiser@gmail.com> * Suggestions Signed-off-by: jolheiser <john.olheiser@gmail.com> * Attempt to fix test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert timetracking test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swap .octicon for .svg in less Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add aria-hidden Signed-off-by: jolheiser <john.olheiser@gmail.com> * Replace mega-octicon Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix webpack globbing on Windows Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert Co-Authored-By: silverwind <me@silverwind.io> * Fix octions from upstream Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix Vue and missed JS function Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add JS helper and PWA Signed-off-by: jolheiser <john.olheiser@gmail.com> * Preload SVG Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <matti@mdranta.net>
49 lines
2.7 KiB
Cheetah
49 lines
2.7 KiB
Cheetah
{{if and $.root.SignedUserID (not $.Repository.IsArchived)}}
|
|
{{if $.hidden}}
|
|
<button class="comment-form-reply ui green labeled icon tiny button"><i class="reply icon"></i> {{$.root.i18n.Tr "repo.diff.comment.reply"}}</button>
|
|
{{end}}
|
|
<form class="ui form {{if $.hidden}}hide comment-form comment-form-reply{{end}}" action="{{$.root.Issue.HTMLURL}}/files/reviews/comments" method="post">
|
|
{{$.root.CsrfTokenHtml}}
|
|
<input type="hidden" name="latest_commit_id" value="{{$.root.AfterCommitID}}"/>
|
|
<input type="hidden" name="side" value="{{if $.Side}}{{$.Side}}{{end}}">
|
|
<input type="hidden" name="line" value="{{if $.Line}}{{$.Line}}{{end}}">
|
|
<input type="hidden" name="path" value="{{if $.File}}{{$.File}}{{end}}">
|
|
<input type="hidden" name="diff_start_cid">
|
|
<input type="hidden" name="diff_end_cid">
|
|
<input type="hidden" name="diff_base_cid">
|
|
<div class="ui top attached tabular menu" {{if not $.hidden}}onload="assingMenuAttributes(this)" {{end}}data-write="write" data-preview="preview">
|
|
<a class="active item" data-tab="write">{{$.root.i18n.Tr "write"}}</a>
|
|
<a class="item" data-tab="preview" data-url="{{$.root.Repository.APIURL}}/markdown" data-context="{{$.root.RepoLink}}">{{$.root.i18n.Tr "preview"}}</a>
|
|
</div>
|
|
<div class="ui bottom attached active tab segment" data-tab="write">
|
|
<div class="field">
|
|
<textarea name="content" placeholder="{{$.root.i18n.Tr "repo.diff.comment.placeholder"}}"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="ui bottom attached tab segment markdown" data-tab="preview">
|
|
{{.i18n.Tr "loading"}}
|
|
</div>
|
|
<div class="footer">
|
|
<span class="markdown-info">{{svg "octicon-markdown" 16}} {{$.root.i18n.Tr "repo.diff.comment.markdown_info"}}</span>
|
|
<div class="ui right floated">
|
|
{{if $.reply}}
|
|
<button name="reply" value="{{$.reply}}" class="ui submit green tiny button btn-reply">{{$.root.i18n.Tr "repo.diff.comment.reply"}}</button>
|
|
{{else}}
|
|
{{if $.root.CurrentReview}}
|
|
<button name="is_review" value="true" type="submit"
|
|
class="ui submit green tiny button btn-add-comment">{{$.root.i18n.Tr "repo.diff.comment.add_review_comment"}}</button>
|
|
{{else}}
|
|
<button name="is_review" value="true" type="submit"
|
|
class="ui submit green tiny button btn-start-review">{{$.root.i18n.Tr "repo.diff.comment.start_review"}}</button>
|
|
<button type="submit"
|
|
class="ui submit tiny basic button btn-add-single">{{$.root.i18n.Tr "repo.diff.comment.add_single_comment"}}</button>
|
|
{{end}}
|
|
{{end}}
|
|
{{if or (not $.HasComments) $.hidden}}
|
|
<button type="button" class="ui submit tiny basic button btn-cancel" onclick="window.cancelCodeComment(this);">{{$.root.i18n.Tr "cancel"}}</button>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{{end}}
|