{{if .Flash}}
{{template "base/alert" .}}
{{end}} {{if not .Issue.IsPull}} {{template "repo/issue/view_title" .}} {{end}} {{ $createdStr:= TimeSinceUnix .Issue.CreatedUnix $.Lang }}
{{if .Issue.OriginalAuthor }} {{else}} {{end}}
{{if .Issue.OriginalAuthor }} {{ .Issue.OriginalAuthor }} {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} {{if .Repository.OriginalURL}} ({{$.i18n.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname | Safe }}){{end}} {{else}} {{.Issue.Poster.GetDisplayName}} {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} {{end}} {{if not $.Repository.IsArchived}}
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) }} {{if or .IsIssueWriter .IsIssuePoster}}
{{end}}
{{end}}
{{if .Issue.RenderedContent}} {{.Issue.RenderedContent|Str2html}} {{else}} {{.i18n.Tr "repo.issues.no_content"}} {{end}}
{{.Issue.Content}}
{{$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}} {{if .Issue.Attachments}}
{{range .Issue.Attachments}} {{if FilenameIsImage .Name}} {{else}} {{end}} {{end}}
{{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 .IsRepoIssuesWriter (or (not .Issue.IsLocked))) (not .Repository.IsArchived) }}
{{template "repo/issue/comment_tab" .}} {{.CsrfTokenHtml}}
{{if and (or .IsIssueWriter .IsIssuePoster) (not .DisableStatusChange)}} {{if .Issue.IsClosed}}
{{.i18n.Tr "repo.issues.reopen_issue"}}
{{else}}
{{.i18n.Tr "repo.issues.close_issue"}}
{{end}} {{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}}
{{template "repo/issue/comment_tab" .}} {{.CsrfTokenHtml}}
{{if and (or .IsIssueWriter .IsIssuePoster) (not .DisableStatusChange)}} {{if .Issue.IsClosed}}
{{.i18n.Tr "repo.issues.reopen_issue"}}
{{else}}
{{.i18n.Tr "repo.issues.close_issue"}}
{{end}} {{end}}
{{end}} {{else}}
{{.i18n.Tr "repo.issues.sign_in_require_desc" .SignInLink | Safe}}
{{end}} {{end}} {{end}}
{{ template "repo/issue/view_content/sidebar" . }}
{{$.i18n.Tr "loading"}}
{{.i18n.Tr "repo.issues.cancel"}}
{{.i18n.Tr "repo.issues.save"}}
{{.i18n.Tr "repo.issues.no_content"}}