{{if .Flash}}
{{template "base/alert" .}}
{{end}} {{if not .Issue.IsPull}} {{template "repo/issue/view_title" .}} {{end}} {{$createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale}}
{{if .Issue.OriginalAuthor}} {{else}} {{avatar $.Context .Issue.Poster}} {{end}}
{{if .Issue.OriginalAuthor}} {{svg (MigrationIcon .Repository.GetOriginalURLHostname)}} {{.Issue.OriginalAuthor}} {{.locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr | Safe}} {{if .Repository.OriginalURL}} ({{$.locale.Tr "repo.migrated_from" (.Repository.OriginalURL|Escape) (.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}} {{else}} {{avatar $.Context .Issue.Poster}} {{template "shared/user/authorlink" .Issue.Poster}} {{.locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr | Safe}} {{end}}
{{if gt .Issue.ShowRole 0}} {{if (.Issue.ShowRole.HasRole "Writer")}}
{{$.locale.Tr "repo.issues.collaborator"}}
{{end}} {{if (.Issue.ShowRole.HasRole "Owner")}}
{{$.locale.Tr "repo.issues.owner"}}
{{end}} {{end}} {{if not $.Repository.IsArchived}} {{template "repo/issue/view_content/add_reaction" Dict "ctxData" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}} {{template "repo/issue/view_content/context_menu" Dict "ctxData" $ "item" .Issue "delete" false "issue" true "diff" false "IsCommentPoster" $.IsIssuePoster}} {{end}}
{{if .Issue.RenderedContent}} {{.Issue.RenderedContent|Str2html}} {{else}} {{.locale.Tr "repo.issues.no_content"}} {{end}}
{{.Issue.Content}}
{{if .Issue.Attachments}} {{template "repo/issue/view_content/attachments" Dict "ctxData" $ "Attachments" .Issue.Attachments "Content" .Issue.RenderedContent}} {{end}}
{{$reactions := .Issue.Reactions.GroupByType}} {{if $reactions}}
{{template "repo/issue/view_content/reactions" Dict "ctxData" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}}
{{end}}
{{template "repo/issue/view_content/comments" .}} {{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)}}
{{avatar $.Context .SignedUser}}
{{template "repo/issue/comment_tab" .}} {{.CsrfTokenHtml}}
{{else if .Repository.IsArchived}}
{{if .Issue.IsPull}} {{.locale.Tr "repo.archive.pull.nocomment"}} {{else}} {{.locale.Tr "repo.archive.issue.nocomment"}} {{end}}
{{end}} {{else}} {{if .Repository.IsArchived}}
{{if .Issue.IsPull}} {{.locale.Tr "repo.archive.pull.nocomment"}} {{else}} {{.locale.Tr "repo.archive.issue.nocomment"}} {{end}}
{{else}} {{if .IsSigned}} {{if .Repository.IsArchived}}
{{avatar $.Context .SignedUser}}
{{template "repo/issue/comment_tab" .}} {{.CsrfTokenHtml}}
{{end}} {{else}}
{{.locale.Tr "repo.issues.sign_in_require_desc" (.SignInLink|Escape) | Safe}}
{{end}} {{end}} {{end}}
{{template "repo/issue/view_content/sidebar" .}}
{{$.locale.Tr "loading"}}
{{if .IsAttachmentEnabled}}
{{template "repo/upload" .}}
{{end}}
{{template "repo/issue/view_content/reference_issue_dialog" .}}
{{.locale.Tr "repo.issues.no_content"}}