mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 16:44:26 +00:00
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}}
|
||||
<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">
|
||||
{{if .Issue.OriginalAuthor}}
|
||||
{{if .Issue.OriginalAuthor}}
|
||||
<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}}>
|
||||
{{avatar $.Context .Issue.Poster}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<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="comment-header-left gt-df gt-ac">
|
||||
@ -97,6 +97,7 @@
|
||||
{{if and .Issue.IsPull (not $.Repository.IsArchived)}}
|
||||
{{template "repo/issue/view_content/pull".}}
|
||||
{{end}}
|
||||
|
||||
{{if .IsSigned}}
|
||||
{{if and (or .IsRepoAdmin .HasIssuesOrPullsWritePermission (not .Issue.IsLocked)) (not .Repository.IsArchived)}}
|
||||
<div class="timeline-item comment form">
|
||||
@ -142,61 +143,22 @@
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{if .Repository.IsArchived}}
|
||||
<div class="ui warning message">
|
||||
{{if .Issue.IsPull}}
|
||||
{{.locale.Tr "repo.archive.pull.nocomment"}}
|
||||
{{else}}
|
||||
{{.locale.Tr "repo.archive.issue.nocomment"}}
|
||||
{{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>
|
||||
{{else}} {{/* not .IsSigned */}}
|
||||
{{if .Repository.IsArchived}}
|
||||
<div class="ui warning message">
|
||||
{{if .Issue.IsPull}}
|
||||
{{.locale.Tr "repo.archive.pull.nocomment"}}
|
||||
{{else}}
|
||||
{{.locale.Tr "repo.archive.issue.nocomment"}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<div class="ui warning message">
|
||||
{{.locale.Tr "repo.issues.sign_in_require_desc" (.SignInLink|Escape) | Safe}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
</ui>
|
||||
{{end}}{{/* end if: .IsSigned */}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "repo/issue/view_content/sidebar" .}}
|
||||
|
Loading…
Reference in New Issue
Block a user