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