mirror of
https://github.com/go-gitea/gitea.git
synced 2025-02-27 21:45:24 +08:00
Fix comment form orphan tag issue with lint
This commit is contained in:
parent
5ba8ae10fc
commit
fddda21ea2
@ -11,34 +11,13 @@
|
|||||||
<div class="ui segment">
|
<div class="ui segment">
|
||||||
{{if .IsIssue}}
|
{{if .IsIssue}}
|
||||||
<form class="ui form form-fetch-action" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
|
<form class="ui form form-fetch-action" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
|
||||||
|
{{template "repo/conversation/comment_form_content" .}}
|
||||||
|
</form>
|
||||||
{{else}}
|
{{else}}
|
||||||
<form class="ui form form-fetch-action" id="comment-form" action="{{$.RepoLink}}/conversations/{{.Conversation.Index}}/comments" method="post">
|
<form class="ui form form-fetch-action" id="comment-form" action="{{$.RepoLink}}/conversations/{{.Conversation.Index}}/comments" method="post">
|
||||||
|
{{template "repo/conversation/comment_form_content" .}}
|
||||||
|
</form>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "repo/conversation/comment_tab" .}}
|
|
||||||
{{.CsrfTokenHtml}}
|
|
||||||
<div class="field footer">
|
|
||||||
<div class="text right">
|
|
||||||
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}}
|
|
||||||
{{if and .IsIssue .Issue.IsClosed}}
|
|
||||||
<button id="status-button" class="ui primary basic button" data-status="{{ctx.Locale.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.reopen_comment_issue"}}" name="status" value="reopen">
|
|
||||||
{{ctx.Locale.Tr "repo.issues.reopen_issue"}}
|
|
||||||
</button>
|
|
||||||
{{else}}
|
|
||||||
{{$closeTranslationKey := "repo.issues.close"}}
|
|
||||||
{{if and .IsIssue .Issue.IsPull}}
|
|
||||||
{{$closeTranslationKey = "repo.pulls.close"}}
|
|
||||||
{{end}}
|
|
||||||
<button id="status-button" class="ui red basic button" data-status="{{ctx.Locale.Tr $closeTranslationKey}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.close_comment_issue"}}" name="status" value="close">
|
|
||||||
{{ctx.Locale.Tr $closeTranslationKey}}
|
|
||||||
</button>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
<button id="comment-button" class="ui primary button">
|
|
||||||
{{ctx.Locale.Tr "repo.issues.create_comment"}}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
24
templates/repo/conversation/comment_form_content.tmpl
Normal file
24
templates/repo/conversation/comment_form_content.tmpl
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{{template "repo/conversation/comment_tab" .}}
|
||||||
|
{{.CsrfTokenHtml}}
|
||||||
|
<div class="field footer">
|
||||||
|
<div class="text right">
|
||||||
|
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}}
|
||||||
|
{{if and .IsIssue .Issue.IsClosed}}
|
||||||
|
<button id="status-button" class="ui primary basic button" data-status="{{ctx.Locale.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.reopen_comment_issue"}}" name="status" value="reopen">
|
||||||
|
{{ctx.Locale.Tr "repo.issues.reopen_issue"}}
|
||||||
|
</button>
|
||||||
|
{{else}}
|
||||||
|
{{$closeTranslationKey := "repo.issues.close"}}
|
||||||
|
{{if and .IsIssue .Issue.IsPull}}
|
||||||
|
{{$closeTranslationKey = "repo.pulls.close"}}
|
||||||
|
{{end}}
|
||||||
|
<button id="status-button" class="ui red basic button" data-status="{{ctx.Locale.Tr $closeTranslationKey}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.close_comment_issue"}}" name="status" value="close">
|
||||||
|
{{ctx.Locale.Tr $closeTranslationKey}}
|
||||||
|
</button>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
<button id="comment-button" class="ui primary button">
|
||||||
|
{{ctx.Locale.Tr "repo.issues.create_comment"}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
x
Reference in New Issue
Block a user