Browse Source

move comment buttons

pull/946/head
Evgeny Malyshev 10 years ago
parent
commit
0ad45ca9d6
  1. 40
      templates/repo/comment_form.tmpl

40
templates/repo/comment_form.tmpl

@ -10,29 +10,31 @@
{{.i18n.Tr "repo.release.content_with_md" "https://help.github.com/articles/markdown-basics" | Str2html}} {{.i18n.Tr "repo.release.content_with_md" "https://help.github.com/articles/markdown-basics" | Str2html}}
</div> </div>
<ul class="menu menu-line add-nav"> <ul class="menu menu-line add-nav">
<li class="js-tab-nav js-tab-nav-show" data-tab-target="#commit-add-comment-form"><a href="#">{{$.i18n.Tr "repo.release.write"}}</a></li> <li class="js-tab-nav js-tab-nav-show" data-tab-target="#commit-add-comment-edit"><a href="#">{{$.i18n.Tr "repo.release.write"}}</a></li>
<li class="js-tab-nav" data-tab-target="#commit-add-comment-preview"><a href="#" id="pull-commit-preview">{{$.i18n.Tr "repo.release.preview"}}</a></li> <li class="js-tab-nav" data-tab-target="#commit-add-comment-preview"><a href="#" id="pull-commit-preview">{{$.i18n.Tr "repo.release.preview"}}</a></li>
</ul> </ul>
</div> </div>
<div class="panel-content content"> <form id="commit-add-comment-form" action="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Repository.Name}}/commit/comment/{{if .CommentId}}edit{{else}}new{{end}}/{{.Repo.CommitId}}" method="post">
<div id="submit-error" class="text-danger"></div> <div class="panel-content content">
<form id="commit-add-comment-form" action="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Repository.Name}}/commit/comment/{{if .CommentId}}edit{{else}}new{{end}}/{{.Repo.CommitId}}" method="post"> <div id="submit-error" class="text-danger"></div>
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
{{if .CommentId}} {{if .CommentId}}
<input type="hidden" name="id" value="{{.CommentId}}" > <input type="hidden" name="id" value="{{.CommentId}}" >
{{else}} {{else}}
<input type="hidden" name="line" value="{{.Line}}" > <input type="hidden" name="line" value="{{.Line}}" >
{{end}} {{end}}
<textarea class="ipt ipt-radius js-preview-input" name="content" id="commit-add-content"></textarea> <div id="commit-add-comment-edit">
<p class="submit text-right"> <textarea class="ipt ipt-radius js-preview-input" name="content" id="commit-add-content"></textarea>
<button class="btn btn-gray btn-radius text-bold" id="cancel-{{if .CommentId}}edit-{{end}}commit-conversation" name="submit" value="close">{{$.i18n.Tr "cancel"}}</button>&nbsp;&nbsp; </div>
<button class="btn btn-green btn-radius text-bold" name="submit" value="comment">{{$.i18n.Tr "repo.commits.comment.add"}}</button> <div id="commit-add-comment-preview" class="js-preview-container markdown">
</p> preview
</form> </div>
<div id="commit-add-comment-preview" class="js-preview-container markdown"> <p class="submit text-right">
preview <button class="btn btn-gray btn-radius text-bold" id="cancel-{{if .CommentId}}edit-{{end}}commit-conversation" name="submit" value="close">{{$.i18n.Tr "cancel"}}</button>&nbsp;&nbsp;
<button class="btn btn-green btn-radius text-bold" name="submit" value="comment">{{$.i18n.Tr "repo.commits.comment.add"}}</button>
</p>
</div> </div>
</div> </form>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save