22<!-- Fake comment that is based on the Issue's Title and Description -->
33<div id="{{.Issue.HashTag}}" class="timeline-item comment first">
44 {{$createdStr:= TimeSinceUnix .Issue.CreatedUnix ctx.Locale}}
5- {{if .Issue.OriginalAuthor}}
6- <span class="timeline-avatar">
7- {{ctx.AvatarUtils.Avatar nil 40}}
8- </span>
9- {{else}}
10- <a class="timeline-avatar" {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
11- {{ctx.AvatarUtils.Avatar .Issue.Poster 40}}
12- </a>
13- {{end}}
14- <div class="content comment-container">
15- <div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between" role="heading" aria-level="3">
16- <div class="comment-header-left tw-flex tw-items-center">
17- {{if .Issue.OriginalAuthor}}
18- <span class="text black tw-font-semibold">
19- {{svg (MigrationIcon .Repository.GetOriginalURLHostname)}}
20- {{.Issue.OriginalAuthor}}
21- </span>
22- <span class="text grey muted-links">
23- {{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}}
24- </span>
25- <span class="text migrate">
26- {{if .Repository.OriginalURL}} ({{ctx.Locale.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname}}){{end}}
27- </span>
28- {{else}}
29- <a class="inline-timeline-avatar" href="{{.Issue.Poster.HomeLink}}">
30- {{ctx.AvatarUtils.Avatar .Issue.Poster 24}}
31- </a>
32- <span class="text grey muted-links">
33- {{template "shared/user/authorlink" .Issue.Poster}}
34- {{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}}
35- </span>
36- {{end}}
37- </div>
38- <div class="comment-header-right actions tw-flex tw-items-center">
39- {{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true}}
40- {{if not $.Repository.IsArchived}}
41- {{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}}
42- {{end}}
43- {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" .Issue "delete" false "issue" true "diff" false "IsCommentPoster" $.IsIssuePoster}}
44- </div>
45- </div>
46- <div class="ui attached segment comment-body" role="article">
47- <div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission $.IsIssuePoster}}data-can-edit="true"{{end}}>
48- {{if .Issue.RenderedContent}}
49- {{.Issue.RenderedContent}}
50- {{else}}
51- <span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
52- {{end}}
53- </div>
54- <div id="issue-{{.Issue.ID}}-raw" class="raw-content tw-hidden">{{.Issue.Content}}</div>
55- <div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-content-version="{{.Issue.ContentVersion}}" data-context="{{.RepoLink}}" data-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/attachments" data-view-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/view-attachments"></div>
56- {{if .Issue.Attachments}}
57- {{template "repo/issue/view_content/attachments" dict "Attachments" .Issue.Attachments "RenderedContent" .Issue.RenderedContent}}
58- {{end}}
59- </div>
60- {{$reactions := .Issue.Reactions.GroupByType}}
61- {{if $reactions}}
62- {{template "repo/issue/view_content/reactions" dict "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}}
63- {{end}}
64- </div>
65- </div>
5+ {{if .Issue.OriginalAuthor}}
6+ <span class="timeline-avatar">
7+ {{ctx.AvatarUtils.Avatar nil 40}}
8+ </span>
9+ {{else}}
10+ <a class="timeline-avatar" {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
11+ {{ctx.AvatarUtils.Avatar .Issue.Poster 40}}
12+ </a>
13+ {{end}}
14+ <div class="content comment-container">
15+ <div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between" role="heading" aria-level="3">
16+ <div class="comment-header-left tw-flex tw-items-center">
17+ {{if .Issue.OriginalAuthor}}
18+ <span class="text black tw-font-semibold">
19+ {{svg (MigrationIcon .Repository.GetOriginalURLHostname)}}
20+ {{.Issue.OriginalAuthor}}
21+ </span>
22+ <span class="text grey muted-links">
23+ {{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}}
24+ </span>
25+ <span class="text migrate">
26+ {{if .Repository.OriginalURL}} ({{ctx.Locale.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname}}){{end}}
27+ </span>
28+ {{else}}
29+ <a class="inline-timeline-avatar" href="{{.Issue.Poster.HomeLink}}">
30+ {{ctx.AvatarUtils.Avatar .Issue.Poster 24}}
31+ </a>
32+ <span class="text grey muted-links">
33+ {{template "shared/user/authorlink" .Issue.Poster}}
34+ {{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}}
35+ </span>
36+ {{end}}
37+ </div>
38+ <div class="comment-header-right actions tw-flex tw-items-center">
39+ {{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true}}
40+ {{if not $.Repository.IsArchived}}
41+ {{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}}
42+ {{end}}
43+ {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" .Issue "delete" false "issue" true "diff" false "IsCommentPoster" $.IsIssuePoster}}
44+ </div>
45+ </div>
46+ <div class="ui attached segment comment-body" role="article">
47+ <div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission $.IsIssuePoster}}data-can-edit="true"{{end}}>
48+ {{if .Issue.RenderedContent}}
49+ {{.Issue.RenderedContent}}
50+ {{else}}
51+ <span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
52+ {{end}}
53+ </div>
54+ <div id="issue-{{.Issue.ID}}-raw" class="raw-content tw-hidden">{{.Issue.Content}}</div>
55+ <div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-content-version="{{.Issue.ContentVersion}}" data-context="{{.RepoLink}}" data-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/attachments" data-view-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/view-attachments"></div>
56+ {{if .Issue.Attachments}}
57+ {{template "repo/issue/view_content/attachments" dict "Attachments" .Issue.Attachments "RenderedContent" .Issue.RenderedContent}}
58+ {{end}}
59+ </div>
60+ {{$reactions := .Issue.Reactions.GroupByType}}
61+ {{if $reactions}}
62+ {{template "repo/issue/view_content/reactions" dict "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}}
63+ {{end}}
64+ </div>
65+ </div>
0 commit comments