{{ template "base/alert" }} {{range .Issue.Comments}} {{ $createdStr:= TimeSinceUnix .CreatedUnix $.Lang }} {{if eq .Type 0}}
{{if .OriginalAuthor }} {{else}} {{end}}
{{if .OriginalAuthor }} {{ .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}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}} {{end}} {{if not $.Repository.IsArchived}}
{{if gt .ShowTag 0}}
{{if eq .ShowTag 1}} {{$.i18n.Tr "repo.issues.poster"}} {{else if eq .ShowTag 2}} {{$.i18n.Tr "repo.issues.collaborator"}} {{else if eq .ShowTag 3}} {{$.i18n.Tr "repo.issues.owner"}} {{end}}
{{end}} {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) }} {{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "diff" false }}
{{end}}
{{if .RenderedContent}} {{.RenderedContent|Str2html}} {{else}} {{$.i18n.Tr "repo.issues.no_content"}} {{end}}
{{.Content}}
{{$reactions := .Reactions.GroupByType}} {{if $reactions}}
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions }}
{{end}} {{if .Attachments}}
{{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments}}
{{end}}
{{else if eq .Type 1}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}
{{else if eq .Type 2}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}
{{else if eq .Type 3 5 6}} {{ $refFrom:= "" }} {{if ne .RefRepoID .Issue.RepoID}} {{ $refFrom = $.i18n.Tr "repo.issues.ref_from" .RefRepo.FullName }} {{end}} {{ $refTr := "repo.issues.ref_issue_from" }} {{if .Issue.IsPull}} {{ $refTr = "repo.issues.ref_pull_from" }} {{else if eq .RefAction 1 }} {{ $refTr = "repo.issues.ref_closing_from" }} {{else if eq .RefAction 2 }} {{ $refTr = "repo.issues.ref_reopening_from" }} {{end}} {{ $createdStr:= TimeSinceUnix .CreatedUnix $.Lang }}
{{if eq .RefAction 3}}{{end}} {{.Poster.GetDisplayName}} {{$.i18n.Tr $refTr .EventTag $createdStr .RefCommentHTMLURL $refFrom | Safe}} {{if eq .RefAction 3}}{{end}}
{{.RefIssueTitle | Str2html}} {{.RefIssueIdent | Str2html}}
{{else if eq .Type 4}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}
{{.Content | Str2html}}
{{else if eq .Type 7}} {{if .Label}}
{{.Poster.GetDisplayName}} {{if .Content}}{{$.i18n.Tr "repo.issues.add_label_at" .Label.ForegroundColor .Label.Color (.Label.Name|Escape) $createdStr | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_label_at" .Label.ForegroundColor .Label.Color (.Label.Name|Escape) $createdStr | Safe}}{{end}}
{{end}} {{else if eq .Type 8}}
{{.Poster.GetDisplayName}} {{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}}
{{else if eq .Type 9}}
{{if gt .AssigneeID 0}} {{if .RemovedAssignee}} {{.Assignee.GetDisplayName}} {{ if eq .Poster.ID .Assignee.ID }} {{$.i18n.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}} {{ else }} {{$.i18n.Tr "repo.issues.remove_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}} {{ end }} {{else}} {{.Assignee.GetDisplayName}} {{if eq .Poster.ID .AssigneeID}} {{$.i18n.Tr "repo.issues.self_assign_at" $createdStr | Safe}} {{else}} {{$.i18n.Tr "repo.issues.add_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}} {{end}} {{end}} {{end}}
{{else if eq .Type 10}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.change_title_at" (.OldTitle|Escape) (.NewTitle|Escape) $createdStr | Safe}}
{{else if eq .Type 11}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.delete_branch_at" (.CommitSHA|Escape) $createdStr | Safe}}
{{else if eq .Type 12}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.start_tracking_history" $createdStr | Safe}}
{{else if eq .Type 13}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}}
{{.Content}}
{{else if eq .Type 14}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.add_time_history" $createdStr | Safe}}
{{.Content}}
{{else if eq .Type 15}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}}
{{else if eq .Type 16}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.due_date_added" .Content $createdStr | Safe}}
{{else if eq .Type 17}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.due_date_modified" (.Content | ParseDeadline) $createdStr | Safe}}
{{else if eq .Type 18}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.due_date_remove" .Content $createdStr | Safe}}
{{else if eq .Type 19}}
{{$.i18n.Tr "repo.issues.dependency.added_dependency" .Poster.HomeLink (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
#{{.DependentIssue.Index}} {{.DependentIssue.Title}}
{{else if eq .Type 20}}
{{$.i18n.Tr "repo.issues.dependency.removed_dependency" .Poster.HomeLink (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
#{{.DependentIssue.Index}} {{.DependentIssue.Title}}
{{else if eq .Type 22}}
{{.Poster.GetDisplayName}} {{if eq .Review.Type 1}} {{$.i18n.Tr "repo.issues.review.approve" $createdStr | Safe}} {{else if eq .Review.Type 2}} {{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}} {{else if eq .Review.Type 3}} {{$.i18n.Tr "repo.issues.review.reject" $createdStr | Safe}} {{else}} {{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}} {{end}} {{if .Content}}
{{.Content}}
{{end}} {{ range $filename, $lines := .Review.CodeComments}} {{range $line, $comms := $lines}}
{{$invalid := (index $comms 0).Invalidated}} {{if $invalid}} {{end}} {{$filename}}
{{$diff := (CommentMustAsDiff (index $comms 0))}} {{if $diff}} {{$file := (index $diff.Files 0)}}
{{template "repo/diff/section_unified" dict "file" $file "root" $}}
{{end}}
{{range $comms}} {{ $createdSubStr:= TimeSinceUnix .CreatedUnix $.Lang }}
{{.Poster.GetDisplayName}}
{{if .RenderedContent}} {{.RenderedContent|Str2html}} {{else}} {{$.i18n.Tr "repo.issues.no_content"}} {{end}}
{{.Content}}
{{end}}
{{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index $comms 0).ReviewID "root" $ "comment" (index $comms 0)}}
{{end}} {{end}}
{{else if eq .Type 23}}
{{ if .Content }} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}} {{ else }} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.lock_no_reason" $createdStr | Safe}} {{ end }}
{{else if eq .Type 24}}
{{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.unlock_comment" $createdStr | Safe}}
{{end}} {{end}}