Remove id="comment-form"
dead code, fix tag (#23555)
The code has been dead code since #5073 . `#5073` duplicated the code in a new `if` block. The dead code blocks * #23290
This commit is contained in:
parent
ce9dee5a1e
commit
9b0190884d
|
@ -17,15 +17,15 @@
|
||||||
|
|
||||||
{{$createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale}}
|
{{$createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale}}
|
||||||
<div class="twelve wide column comment-list prevent-before-timeline">
|
<div class="twelve wide column comment-list prevent-before-timeline">
|
||||||
<ui class="ui timeline">
|
<div class="ui timeline">
|
||||||
<div id="{{.Issue.HashTag}}" class="timeline-item comment first">
|
<div id="{{.Issue.HashTag}}" class="timeline-item comment first">
|
||||||
{{if .Issue.OriginalAuthor}}
|
{{if .Issue.OriginalAuthor}}
|
||||||
<span class="timeline-avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
|
<span class="timeline-avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a class="timeline-avatar" {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
|
<a class="timeline-avatar" {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
|
||||||
{{avatar $.Context .Issue.Poster}}
|
{{avatar $.Context .Issue.Poster}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="content comment-container">
|
<div class="content comment-container">
|
||||||
<div class="ui top attached header comment-header gt-df gt-ac gt-sb" role="heading" aria-level="3">
|
<div class="ui top attached header comment-header gt-df gt-ac gt-sb" role="heading" aria-level="3">
|
||||||
<div class="comment-header-left gt-df gt-ac">
|
<div class="comment-header-left gt-df gt-ac">
|
||||||
|
@ -97,6 +97,7 @@
|
||||||
{{if and .Issue.IsPull (not $.Repository.IsArchived)}}
|
{{if and .Issue.IsPull (not $.Repository.IsArchived)}}
|
||||||
{{template "repo/issue/view_content/pull".}}
|
{{template "repo/issue/view_content/pull".}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if .IsSigned}}
|
{{if .IsSigned}}
|
||||||
{{if and (or .IsRepoAdmin .HasIssuesOrPullsWritePermission (not .Issue.IsLocked)) (not .Repository.IsArchived)}}
|
{{if and (or .IsRepoAdmin .HasIssuesOrPullsWritePermission (not .Issue.IsLocked)) (not .Repository.IsArchived)}}
|
||||||
<div class="timeline-item comment form">
|
<div class="timeline-item comment form">
|
||||||
|
@ -142,61 +143,22 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else}}
|
{{else}} {{/* not .IsSigned */}}
|
||||||
{{if .Repository.IsArchived}}
|
{{if .Repository.IsArchived}}
|
||||||
<div class="ui warning message">
|
<div class="ui warning message">
|
||||||
{{if .Issue.IsPull}}
|
{{if .Issue.IsPull}}
|
||||||
{{.locale.Tr "repo.archive.pull.nocomment"}}
|
{{.locale.Tr "repo.archive.pull.nocomment"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{.locale.Tr "repo.archive.issue.nocomment"}}
|
{{.locale.Tr "repo.archive.issue.nocomment"}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
{{if .IsSigned}}
|
|
||||||
{{if .Repository.IsArchived}}
|
|
||||||
<div class="timeline-item comment form">
|
|
||||||
<a class="timeline-avatar" href="{{.SignedUser.HomeLink}}">
|
|
||||||
{{avatar $.Context .SignedUser}}
|
|
||||||
</a>
|
|
||||||
<div class="content">
|
|
||||||
<form class="ui segment form" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
|
|
||||||
{{template "repo/issue/comment_tab" .}}
|
|
||||||
{{.CsrfTokenHtml}}
|
|
||||||
<input id="status" name="status" type="hidden">
|
|
||||||
<div class="field footer">
|
|
||||||
<div class="text right">
|
|
||||||
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}}
|
|
||||||
{{if .Issue.IsClosed}}
|
|
||||||
<button id="status-button" class="ui green basic button" tabindex="6" data-status="{{.locale.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{.locale.Tr "repo.issues.reopen_comment_issue"}}" data-status-val="reopen">
|
|
||||||
{{.locale.Tr "repo.issues.reopen_issue"}}
|
|
||||||
</button>
|
|
||||||
{{else}}
|
|
||||||
{{$closeTranslationKey := "repo.issues.close"}}
|
|
||||||
{{if .Issue.IsPull}}
|
|
||||||
{{$closeTranslationKey = "repo.pulls.close"}}
|
|
||||||
{{end}}
|
|
||||||
<button id="status-button" class="ui red basic button" tabindex="6" data-status="{{.locale.Tr $closeTranslationKey}}" data-status-and-comment="{{.locale.Tr "repo.issues.close_comment_issue"}}" data-status-val="close">
|
|
||||||
{{.locale.Tr $closeTranslationKey}}
|
|
||||||
</button>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
<button class="ui green button loading-button" tabindex="5">
|
|
||||||
{{.locale.Tr "repo.issues.create_comment"}}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="ui warning message">
|
<div class="ui warning message">
|
||||||
{{.locale.Tr "repo.issues.sign_in_require_desc" (.SignInLink|Escape) | Safe}}
|
{{.locale.Tr "repo.issues.sign_in_require_desc" (.SignInLink|Escape) | Safe}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}{{/* end if: .IsSigned */}}
|
||||||
{{end}}
|
</div>
|
||||||
</ui>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{template "repo/issue/view_content/sidebar" .}}
|
{{template "repo/issue/view_content/sidebar" .}}
|
||||||
|
|
Loading…
Reference in a new issue