2022-08-31 17:58:54 +02:00
|
|
|
{{template "base/alert"}}
|
2026-02-05 05:57:08 +00:00
|
|
|
{{range $comment := .Issue.Comments}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if call $.ShouldShowCommentType .Type}}
|
2024-11-04 19:30:00 +08:00
|
|
|
{{$createdStr:= DateUtils.TimeSince .CreatedUnix}}
|
2017-03-17 06:57:43 +01:00
|
|
|
|
2022-01-21 18:59:26 +01:00
|
|
|
<!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF,
|
2023-11-07 18:45:06 +00:00
|
|
|
5 = COMMENT_REF, 6 = PULL_REF, 7 = COMMENT_LABEL, 8 = MILESTONE_CHANGE,
|
|
|
|
|
9 = ASSIGNEES_CHANGE, 10 = TITLE_CHANGE, 11 = DELETE_BRANCH, 12 = START_TRACKING,
|
2022-01-21 18:59:26 +01:00
|
|
|
13 = STOP_TRACKING, 14 = ADD_TIME_MANUAL, 16 = ADDED_DEADLINE, 17 = MODIFIED_DEADLINE,
|
|
|
|
|
18 = REMOVED_DEADLINE, 19 = ADD_DEPENDENCY, 20 = REMOVE_DEPENDENCY, 21 = CODE,
|
|
|
|
|
22 = REVIEW, 23 = ISSUE_LOCKED, 24 = ISSUE_UNLOCKED, 25 = TARGET_BRANCH_CHANGED,
|
|
|
|
|
26 = DELETE_TIME_MANUAL, 27 = REVIEW_REQUEST, 28 = MERGE_PULL_REQUEST,
|
|
|
|
|
29 = PULL_PUSH_EVENT, 30 = PROJECT_CHANGED, 31 = PROJECT_BOARD_CHANGED
|
2022-05-07 19:05:52 +02:00
|
|
|
32 = DISMISSED_REVIEW, 33 = COMMENT_TYPE_CHANGE_ISSUE_REF, 34 = PR_SCHEDULE_TO_AUTO_MERGE,
|
2024-12-05 15:07:53 +02:00
|
|
|
35 = CANCEL_SCHEDULED_AUTO_MERGE_PR, 36 = PIN_ISSUE, 37 = UNPIN_ISSUE,
|
|
|
|
|
38 = COMMENT_TYPE_CHANGE_TIME_ESTIMATE -->
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if eq .Type 0}}
|
|
|
|
|
<div class="timeline-item comment" id="{{.HashTag}}">
|
2022-08-31 17:58:54 +02:00
|
|
|
{{if .OriginalAuthor}}
|
2023-05-14 16:15:59 +02:00
|
|
|
<span class="timeline-avatar">
|
2024-02-02 19:01:11 +09:00
|
|
|
{{ctx.AvatarUtils.Avatar nil 40}}
|
2023-05-14 16:15:59 +02:00
|
|
|
</span>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else}}
|
2022-09-03 10:33:34 +01:00
|
|
|
<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{ctx.AvatarUtils.Avatar .Poster 40}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</a>
|
|
|
|
|
{{end}}
|
|
|
|
|
<div class="content comment-container">
|
2025-07-13 22:52:35 +08:00
|
|
|
<div class="comment-header avatar-content-left-arrow" role="heading" aria-level="3">
|
2025-07-10 00:46:51 +08:00
|
|
|
<div class="comment-header-left">
|
2022-08-31 17:58:54 +02:00
|
|
|
{{if .OriginalAuthor}}
|
2026-02-22 23:56:33 +01:00
|
|
|
<span class="tw-text-text tw-font-semibold tw-mr-1">
|
2022-01-21 18:59:26 +01:00
|
|
|
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
|
2022-08-31 17:58:54 +02:00
|
|
|
{{.OriginalAuthor}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2024-02-25 22:02:20 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} {{if $.Repository.OriginalURL}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
<span class="text migrate">
|
2024-02-25 22:02:20 +08:00
|
|
|
({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}){{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
{{else}}
|
2022-05-01 16:11:21 +00:00
|
|
|
{{if gt .Poster.ID 0}}
|
|
|
|
|
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
|
2023-08-10 11:19:39 +08:00
|
|
|
{{ctx.AvatarUtils.Avatar .Poster 24}}
|
2022-05-01 16:11:21 +00:00
|
|
|
</a>
|
|
|
|
|
{{end}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-11-19 05:02:30 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-25 22:02:20 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
{{end}}
|
|
|
|
|
</div>
|
2025-07-10 00:46:51 +08:00
|
|
|
<div class="comment-header-right">
|
2023-08-22 14:30:33 +09:00
|
|
|
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if not $.Repository.IsArchived}}
|
2024-04-14 12:44:11 +02:00
|
|
|
{{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
2024-11-07 11:57:07 +08:00
|
|
|
{{template "repo/issue/view_content/context_menu" dict "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
2020-10-31 14:17:52 +01:00
|
|
|
</div>
|
2023-02-23 03:24:24 +01:00
|
|
|
<div class="ui attached segment comment-body" role="article">
|
2022-01-21 18:59:26 +01:00
|
|
|
<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission (and $.IsSigned (eq $.SignedUserID .PosterID))}}data-can-edit="true"{{end}}>
|
|
|
|
|
{{if .RenderedContent}}
|
2024-03-01 15:11:51 +08:00
|
|
|
{{.RenderedContent}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
|
|
|
|
</div>
|
2026-03-01 14:41:25 +05:30
|
|
|
<div id="{{.HashTag}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
2024-05-27 18:34:18 +03:00
|
|
|
<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-content-version="{{.ContentVersion}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if .Attachments}}
|
2024-03-05 12:59:16 +08:00
|
|
|
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
2017-03-17 06:57:43 +01:00
|
|
|
{{end}}
|
|
|
|
|
</div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{$reactions := .Reactions.GroupByType}}
|
|
|
|
|
{{if $reactions}}
|
2024-04-14 12:44:11 +02:00
|
|
|
{{template "repo/issue/view_content/reactions" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
|
2021-04-11 05:46:37 +02:00
|
|
|
{{end}}
|
2017-03-17 06:57:43 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else if eq .Type 1}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
2024-03-08 22:02:05 +01:00
|
|
|
<span class="badge tw-bg-green tw-text-white">{{svg "octicon-dot-fill"}}</span>
|
2024-02-26 04:08:21 +00:00
|
|
|
{{if not .OriginalAuthor}}
|
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
|
|
|
|
{{end}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2024-02-26 04:08:21 +00:00
|
|
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
2022-08-31 17:58:54 +02:00
|
|
|
{{if .Issue.IsPull}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.reopened_at" .EventTag $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
|
|
|
|
</span>
|
2019-09-20 02:45:38 -03:00
|
|
|
</div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else if eq .Type 2}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
2025-12-12 19:12:35 +01:00
|
|
|
<span class="badge tw-bg-red tw-text-white">{{svg "octicon-issue-closed"}}</span>
|
2024-02-26 04:08:21 +00:00
|
|
|
{{if not .OriginalAuthor}}
|
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
|
|
|
|
{{end}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2024-02-26 04:08:21 +00:00
|
|
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
2022-08-31 17:58:54 +02:00
|
|
|
{{if .Issue.IsPull}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.pulls.closed_at" .EventTag $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.closed_at" .EventTag $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
|
|
|
|
</span>
|
2017-03-17 06:57:43 +01:00
|
|
|
</div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else if eq .Type 28}}
|
2020-04-11 00:01:41 +02:00
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
2024-03-08 22:02:05 +01:00
|
|
|
<span class="badge tw-bg-purple tw-text-white">{{svg "octicon-git-merge"}}</span>
|
2024-02-26 04:08:21 +00:00
|
|
|
{{if not .OriginalAuthor}}
|
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
|
|
|
|
{{end}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2024-02-26 04:08:21 +00:00
|
|
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
2023-02-07 02:09:18 +08:00
|
|
|
{{$link := printf "%s/commit/%s" $.Repository.Link ($.Issue.PullRequest.MergedCommitID|PathEscape)}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if eq $.Issue.PullRequest.Status 3}}
|
2024-02-25 18:45:56 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.comment_manually_pull_merged_at" (HTMLFormat `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` $link (ShortSha $.Issue.PullRequest.MergedCommitID)) (HTMLFormat "<b>%[1]s</b>" $.BaseTarget) $createdStr}}
|
2020-10-25 21:49:48 +00:00
|
|
|
{{else}}
|
2024-02-25 18:45:56 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.comment_pull_merged_at" (HTMLFormat `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` $link (ShortSha $.Issue.PullRequest.MergedCommitID)) (HTMLFormat "<b>%[1]s</b>" $.BaseTarget) $createdStr}}
|
2020-10-25 21:49:48 +00:00
|
|
|
{{end}}
|
2020-04-19 02:15:07 +02:00
|
|
|
</span>
|
2017-03-17 06:57:43 +01:00
|
|
|
</div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else if eq .Type 3 5 6}}
|
2022-08-31 17:58:54 +02:00
|
|
|
{{$refFrom:= ""}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if ne .RefRepoID .Issue.RepoID}}
|
2024-02-25 22:02:20 +08:00
|
|
|
{{$refFrom = ctx.Locale.Tr "repo.issues.ref_from" .RefRepo.FullName}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
2022-08-31 17:58:54 +02:00
|
|
|
{{$refTr := "repo.issues.ref_issue_from"}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if .Issue.IsPull}}
|
2022-08-31 17:58:54 +02:00
|
|
|
{{$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"}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
2024-11-04 19:30:00 +08:00
|
|
|
{{$createdStr:= DateUtils.TimeSince .CreatedUnix}}
|
2022-01-21 18:59:26 +01:00
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-bookmark"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2026-03-12 09:25:09 +01:00
|
|
|
{{if eq .RefAction 3}}<del>{{end}}
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-25 22:02:20 +08:00
|
|
|
{{ctx.Locale.Tr $refTr .EventTag $createdStr (.RefCommentLink ctx) $refFrom}}
|
2026-03-12 09:25:09 +01:00
|
|
|
{{if eq .RefAction 3}}</del>{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
|
2024-03-15 04:01:16 +09:00
|
|
|
<div class="detail flex-text-block">
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line"><a href="{{.RefIssueLink ctx}}"><b>{{.RefIssueTitle ctx}}</b> {{.RefIssueIdent ctx}}</a></span>
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 4}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-bookmark"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
2024-03-15 04:01:16 +09:00
|
|
|
<div class="detail flex-text-block">
|
2022-01-21 18:59:26 +01:00
|
|
|
{{svg "octicon-git-commit"}}
|
2025-06-24 01:27:35 +08:00
|
|
|
{{/* the content is a link like <a href="{RepoLink}/commit/{CommitID}">message title</a> (from CreateRefComment) */}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">{{.Content | SanitizeHTML}}</span>
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 7}}
|
|
|
|
|
{{if or .AddedLabels .RemovedLabels}}
|
2025-06-27 17:12:25 +02:00
|
|
|
<div class="timeline-item event with-labels-list-inline" id="{{.HashTag}}">
|
2022-01-21 18:59:26 +01:00
|
|
|
<span class="badge">{{svg "octicon-tag"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if and .AddedLabels (not .RemovedLabels)}}
|
2024-11-05 14:04:26 +08:00
|
|
|
{{ctx.Locale.TrN (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels" (ctx.RenderUtils.RenderLabels .AddedLabels $.RepoLink .Issue) $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else if and (not .AddedLabels) .RemovedLabels}}
|
2024-11-05 14:04:26 +08:00
|
|
|
{{ctx.Locale.TrN (len .RemovedLabels) "repo.issues.remove_label" "repo.issues.remove_labels" (ctx.RenderUtils.RenderLabels .RemovedLabels $.RepoLink .Issue) $createdStr}}
|
2018-05-09 18:29:04 +02:00
|
|
|
{{else}}
|
2024-11-05 14:04:26 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.add_remove_labels" (ctx.RenderUtils.RenderLabels .AddedLabels $.RepoLink .Issue) (ctx.RenderUtils.RenderLabels .RemovedLabels $.RepoLink .Issue) $createdStr}}
|
2018-05-09 18:29:04 +02:00
|
|
|
{{end}}
|
|
|
|
|
</span>
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
2018-05-09 18:29:04 +02:00
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else if eq .Type 8}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-milestone"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-25 22:02:20 +08:00
|
|
|
{{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.change_milestone_at" .OldMilestone.Name .Milestone.Name $createdStr}}{{else}}{{ctx.Locale.Tr "repo.issues.remove_milestone_at" .OldMilestone.Name $createdStr}}{{end}}{{else if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.add_milestone_at" .Milestone.Name $createdStr}}{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
2017-09-12 08:48:13 +02:00
|
|
|
</div>
|
2023-11-07 18:45:06 +00:00
|
|
|
{{else if and (eq .Type 9) (gt .AssigneeID 0)}}
|
2022-01-21 18:59:26 +01:00
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-person"}}</span>
|
2023-11-07 18:45:06 +00:00
|
|
|
{{if .RemovedAssignee}}
|
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Assignee}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2023-11-07 18:45:06 +00:00
|
|
|
{{template "shared/user/authorlink" .Assignee}}
|
|
|
|
|
{{if eq .Poster.ID .Assignee.ID}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.remove_self_assignment" $createdStr}}
|
2023-11-07 18:45:06 +00:00
|
|
|
{{else}}
|
2024-02-25 22:02:20 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.remove_assignee_at" .Poster.GetDisplayName $createdStr}}
|
2023-11-07 18:45:06 +00:00
|
|
|
{{end}}
|
|
|
|
|
</span>
|
|
|
|
|
{{else}}
|
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Assignee}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2023-11-07 18:45:06 +00:00
|
|
|
{{template "shared/user/authorlink" .Assignee}}
|
|
|
|
|
{{if eq .Poster.ID .AssigneeID}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.self_assign_at" $createdStr}}
|
2023-11-07 18:45:06 +00:00
|
|
|
{{else}}
|
2024-02-25 22:02:20 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.add_assignee_at" .Poster.GetDisplayName $createdStr}}
|
2023-11-07 18:45:06 +00:00
|
|
|
{{end}}
|
|
|
|
|
</span>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
|
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 10}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
2026-02-05 05:57:08 +00:00
|
|
|
<span class="badge">{{ctx.RenderUtils.RenderTimelineEventBadge $comment}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2026-02-05 05:57:08 +00:00
|
|
|
{{ctx.RenderUtils.RenderTimelineEventComment $comment $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 11}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-git-branch"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-11-21 09:04:18 -08:00
|
|
|
{{$oldRef := HTMLFormat `<span class="tw-line-through">%s</span>` .OldRef}}
|
|
|
|
|
{{ctx.Locale.Tr "repo.issues.delete_branch_at" $oldRef $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 12}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.start_tracking_history" $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 13}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-12-05 15:07:53 +02:00
|
|
|
{{$timeStr := .RenderedContent}} {{/* compatibility with time comments made before v1.21 */}}
|
2025-02-02 18:51:12 +01:00
|
|
|
{{if not $timeStr}}{{$timeStr = .Content|Sec2Hour}}{{end}}
|
2024-12-05 15:07:53 +02:00
|
|
|
{{ctx.Locale.Tr "repo.issues.stop_tracking_history" $timeStr $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
2023-04-07 22:39:08 +08:00
|
|
|
{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 14}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-12-05 15:07:53 +02:00
|
|
|
{{$timeStr := .RenderedContent}} {{/* compatibility with time comments made before v1.21 */}}
|
2025-02-02 18:51:12 +01:00
|
|
|
{{if not $timeStr}}{{$timeStr = .Content|Sec2Hour}}{{end}}
|
2024-12-05 15:07:53 +02:00
|
|
|
{{ctx.Locale.Tr "repo.issues.add_time_history" $timeStr $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
2023-04-07 22:39:08 +08:00
|
|
|
{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 15}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.cancel_tracking_history" $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 16}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-11-04 19:30:00 +08:00
|
|
|
{{$dueDate := DateUtils.AbsoluteLong (.Content|DateUtils.ParseLegacy)}}
|
2024-11-03 05:04:53 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.due_date_added" $dueDate $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 17}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2023-04-29 20:02:29 +08:00
|
|
|
{{$parsedDeadline := StringUtils.Split .Content "|"}}
|
|
|
|
|
{{if eq (len $parsedDeadline) 2}}
|
2024-11-04 19:30:00 +08:00
|
|
|
{{$to := DateUtils.AbsoluteLong ((index $parsedDeadline 0)|DateUtils.ParseLegacy)}}
|
|
|
|
|
{{$from := DateUtils.AbsoluteLong ((index $parsedDeadline 1)|DateUtils.ParseLegacy)}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.due_date_modified" $to $from $createdStr}}
|
2023-04-29 20:02:29 +08:00
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 18}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-11-04 19:30:00 +08:00
|
|
|
{{$dueDate := DateUtils.AbsoluteLong (.Content|DateUtils.ParseLegacy)}}
|
2024-11-03 05:04:53 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.due_date_remove" $dueDate $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 19}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-package-dependents"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.dependency.added_dependency" $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
{{if .DependentIssue}}
|
2024-03-15 04:01:16 +09:00
|
|
|
<div class="detail flex-text-block">
|
2022-01-21 18:59:26 +01:00
|
|
|
{{svg "octicon-plus"}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2023-02-07 02:09:18 +08:00
|
|
|
<a href="{{.DependentIssue.Link}}">
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if eq .DependentIssue.RepoID .Issue.RepoID}}
|
|
|
|
|
#{{.DependentIssue.Index}} {{.DependentIssue.Title}}
|
|
|
|
|
{{else}}
|
|
|
|
|
{{.DependentIssue.Repo.FullName}}#{{.DependentIssue.Index}} - {{.DependentIssue.Title}}
|
|
|
|
|
{{end}}
|
|
|
|
|
</a>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2020-01-24 01:28:15 +08:00
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 20}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-package-dependents"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.dependency.removed_dependency" $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
{{if .DependentIssue}}
|
2024-03-15 04:01:16 +09:00
|
|
|
<div class="detail flex-text-block">
|
|
|
|
|
{{svg "octicon-trash"}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2023-02-07 02:09:18 +08:00
|
|
|
<a href="{{.DependentIssue.Link}}">
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if eq .DependentIssue.RepoID .Issue.RepoID}}
|
|
|
|
|
#{{.DependentIssue.Index}} {{.DependentIssue.Title}}
|
|
|
|
|
{{else}}
|
|
|
|
|
{{.DependentIssue.Repo.FullName}}#{{.DependentIssue.Index}} - {{.DependentIssue.Title}}
|
|
|
|
|
{{end}}
|
|
|
|
|
</a>
|
2021-09-18 18:22:51 +02:00
|
|
|
</span>
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 22}}
|
2023-10-14 23:13:59 +02:00
|
|
|
<div class="timeline-item-group" id="{{.HashTag}}">
|
2022-01-21 18:59:26 +01:00
|
|
|
<div class="timeline-item event">
|
2024-03-19 12:19:48 +08:00
|
|
|
{{$reviewType := -1}}
|
|
|
|
|
{{if .Review}}{{$reviewType = .Review.Type}}{{end}}
|
2024-02-24 07:49:16 +00:00
|
|
|
{{if not .OriginalAuthor}}
|
2024-03-20 22:05:34 +08:00
|
|
|
{{/* Some timeline avatars need a offset to correctly align with their speech bubble.
|
2024-12-29 22:04:13 +11:00
|
|
|
The condition depends on whether the comment has contents/attachments,
|
|
|
|
|
review's comment is also controlled/rendered by issue comment's Content field */}}
|
|
|
|
|
<a class="timeline-avatar{{if or .Content .Attachments}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{ctx.AvatarUtils.Avatar .Poster 40}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</a>
|
2020-04-11 00:01:41 +02:00
|
|
|
{{end}}
|
2024-09-06 01:40:02 -05:00
|
|
|
<span class="badge tw-text-white{{if eq $reviewType 1}}{{if .Review.Official}} tw-bg-green {{else}} tw-bg-grey{{end}}{{else if eq $reviewType 3}} tw-bg-red{{end}}">
|
2024-03-19 12:19:48 +08:00
|
|
|
{{if .Review}}{{svg (printf "octicon-%s" .Review.Type.Icon)}}{{end}}
|
|
|
|
|
</span>
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2024-02-26 04:08:21 +00:00
|
|
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
2024-03-19 12:19:48 +08:00
|
|
|
{{if eq $reviewType 1}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.review.approve" $createdStr}}
|
2024-03-19 12:19:48 +08:00
|
|
|
{{else if eq $reviewType 2}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.review.comment" $createdStr}}
|
2024-03-19 12:19:48 +08:00
|
|
|
{{else if eq $reviewType 3}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.review.reject" $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.review.comment" $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
2024-03-19 12:19:48 +08:00
|
|
|
{{if and .Review .Review.Dismissed}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<div class="ui small label">{{ctx.Locale.Tr "repo.issues.review.dismissed_label"}}</div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2023-02-22 00:08:20 +08:00
|
|
|
{{if or .Content .Attachments}}
|
2023-10-14 23:13:59 +02:00
|
|
|
<div class="timeline-item comment">
|
2022-01-21 18:59:26 +01:00
|
|
|
<div class="content comment-container">
|
2025-07-13 22:52:35 +08:00
|
|
|
<div class="comment-header avatar-content-left-arrow">
|
2025-07-10 00:46:51 +08:00
|
|
|
<div class="comment-header-left">
|
2023-05-10 11:16:44 +02:00
|
|
|
{{if gt .Poster.ID 0}}
|
|
|
|
|
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
|
2023-08-10 11:19:39 +08:00
|
|
|
{{ctx.AvatarUtils.Avatar .Poster 24}}
|
2023-05-10 11:16:44 +02:00
|
|
|
</a>
|
|
|
|
|
{{end}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-08-31 17:58:54 +02:00
|
|
|
{{if .OriginalAuthor}}
|
2026-02-22 23:56:33 +01:00
|
|
|
<span class="tw-text-text tw-font-semibold">
|
2022-01-21 18:59:26 +01:00
|
|
|
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
|
2022-08-31 17:58:54 +02:00
|
|
|
{{.OriginalAuthor}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line"> {{if $.Repository.OriginalURL}}</span>
|
2024-02-25 22:02:20 +08:00
|
|
|
<span class="text migrate">({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}){{end}}</span>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else}}
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
2020-04-11 00:01:41 +02:00
|
|
|
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.review.left_comment"}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
</div>
|
2025-07-10 00:46:51 +08:00
|
|
|
<div class="comment-header-right">
|
2023-08-22 14:30:33 +09:00
|
|
|
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
|
|
|
|
|
{{if not $.Repository.IsArchived}}
|
2024-04-14 12:44:11 +02:00
|
|
|
{{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
|
2024-11-07 11:57:07 +08:00
|
|
|
{{template "repo/issue/view_content/context_menu" dict "item" . "delete" false "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
|
2023-08-22 14:30:33 +09:00
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
2022-01-19 01:28:38 +08:00
|
|
|
</div>
|
2022-01-21 18:59:26 +01:00
|
|
|
<div class="ui attached segment comment-body">
|
2022-07-26 16:11:39 +03:00
|
|
|
<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission (and $.IsSigned (eq $.SignedUserID .PosterID))}}data-can-edit="true"{{end}}>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if .RenderedContent}}
|
2024-03-01 15:11:51 +08:00
|
|
|
{{.RenderedContent}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
2022-01-19 01:28:38 +08:00
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
2026-03-01 14:41:25 +05:30
|
|
|
<div id="{{.HashTag}}-raw" class="raw-content tw-hidden">{{.Content}}</div>
|
2024-05-27 18:34:18 +03:00
|
|
|
<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-content-version="{{.ContentVersion}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if .Attachments}}
|
2024-03-05 12:59:16 +08:00
|
|
|
{{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}}
|
2020-04-28 14:05:39 -04:00
|
|
|
{{end}}
|
2020-04-11 00:01:41 +02:00
|
|
|
</div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{$reactions := .Reactions.GroupByType}}
|
|
|
|
|
{{if $reactions}}
|
2024-04-14 12:44:11 +02:00
|
|
|
{{template "repo/issue/view_content/reactions" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
|
2021-06-15 03:12:33 +02:00
|
|
|
{{end}}
|
2020-04-11 00:01:41 +02:00
|
|
|
</div>
|
2019-07-07 00:03:00 +02:00
|
|
|
</div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
2020-04-18 21:50:25 +08:00
|
|
|
|
2024-03-19 12:19:48 +08:00
|
|
|
{{if and .Review .Review.CodeComments}}
|
2026-03-12 09:25:09 +01:00
|
|
|
<div class="timeline-item event code-comments-list">
|
2022-08-31 17:58:54 +02:00
|
|
|
{{range $filename, $lines := .Review.CodeComments}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{range $line, $comms := $lines}}
|
2024-01-24 04:26:28 +01:00
|
|
|
{{template "repo/issue/view_content/conversation" dict "." $ "comments" $comms}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
2020-04-11 00:01:41 +02:00
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
2018-08-06 07:43:22 +03:00
|
|
|
{{end}}
|
2020-04-11 00:01:41 +02:00
|
|
|
</div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else if eq .Type 23}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-lock"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2022-08-31 17:58:54 +02:00
|
|
|
{{if .Content}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.lock_with_reason" .Content $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
2022-08-31 17:58:54 +02:00
|
|
|
{{else}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.lock_no_reason" $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
2022-08-31 17:58:54 +02:00
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 24}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-key"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.unlock_comment" $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 25}}
|
|
|
|
|
<div class="timeline-item event">
|
|
|
|
|
<span class="badge">{{svg "octicon-git-branch"}}</span>
|
2024-02-24 07:49:16 +00:00
|
|
|
{{if not .OriginalAuthor}}
|
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
|
|
|
|
{{end}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2024-02-26 04:08:21 +00:00
|
|
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
2024-02-25 22:02:20 +08:00
|
|
|
{{ctx.Locale.Tr "repo.pulls.change_target_branch_at" .OldRef .NewRef $createdStr}}
|
2019-07-07 00:03:00 +02:00
|
|
|
</span>
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 26}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
|
|
|
|
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.del_time_history" $createdStr}}
|
2019-07-07 00:03:00 +02:00
|
|
|
</span>
|
2024-03-15 04:01:16 +09:00
|
|
|
<div class="detail flex-text-block">
|
2022-01-21 18:59:26 +01:00
|
|
|
{{svg "octicon-clock"}}
|
2023-06-23 14:12:39 +02:00
|
|
|
{{if .RenderedContent}}
|
|
|
|
|
{{/* compatibility with time comments made before v1.21 */}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">{{.RenderedContent}}</span>
|
2023-06-23 14:12:39 +02:00
|
|
|
{{else}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">- {{.Content|Sec2Hour}}</span>
|
2023-06-23 14:12:39 +02:00
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
2019-12-27 21:30:58 +01:00
|
|
|
</div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else if eq .Type 27}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-eye"}}</span>
|
2026-01-16 21:52:57 +07:00
|
|
|
{{$specialDoerHtml := .MetaSpecialDoerTr ctx.Locale}}
|
|
|
|
|
{{$timelineRequestedReviewHtml := .TimelineRequestedReviewTr ctx.Locale $createdStr}}
|
|
|
|
|
{{if $specialDoerHtml}}
|
|
|
|
|
<span class="comment-text-line">
|
|
|
|
|
{{$specialDoerHtml}}
|
|
|
|
|
{{$timelineRequestedReviewHtml}}
|
|
|
|
|
</span>
|
|
|
|
|
{{else}}
|
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
|
|
|
|
<span class="comment-text-line">
|
|
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
|
|
|
|
{{$timelineRequestedReviewHtml}}
|
|
|
|
|
</span>
|
|
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
|
|
|
|
{{else if and (eq .Type 29) (or (gt .CommitsNum 0) .IsForcePush)}}
|
2023-03-03 21:16:58 +08:00
|
|
|
<!-- If PR is closed, the comments whose type is CommentTypePullRequestPush(29) after latestCloseCommentID won't be rendered. //-->
|
|
|
|
|
{{if and .Issue.IsClosed (gt .ID $.LatestCloseCommentID)}}
|
|
|
|
|
{{continue}}
|
2023-03-04 05:48:05 +01:00
|
|
|
{{end}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
2022-01-21 18:59:26 +01:00
|
|
|
<span class="badge">{{svg "octicon-repo-push"}}</span>
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2022-08-31 17:58:54 +02:00
|
|
|
{{if .IsForcePush}}
|
2024-02-25 22:02:20 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.force_push_codes" $.Issue.PullRequest.HeadBranch (ShortSha .OldCommit) ($.Issue.Repo.CommitLink .OldCommit) (ShortSha .NewCommit) ($.Issue.Repo.CommitLink .NewCommit) $createdStr}}
|
2020-08-17 04:07:38 +01:00
|
|
|
{{else}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.TrN (len .Commits) "repo.issues.push_commit_1" "repo.issues.push_commits_n" (len .Commits) $createdStr}}
|
2020-08-17 04:07:38 +01:00
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
2023-03-01 20:19:47 +01:00
|
|
|
{{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}}
|
2026-03-12 09:25:09 +01:00
|
|
|
<a class="ui label comment-text-label tw-ml-auto" href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow">{{ctx.Locale.Tr "repo.issues.force_push_compare"}}</a>
|
2023-03-01 20:19:47 +01:00
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
|
|
|
|
{{if not .IsForcePush}}
|
|
|
|
|
{{template "repo/commits_list_small" dict "comment" . "root" $}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{else if eq .Type 30}}
|
2021-02-12 01:32:25 +08:00
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
2022-01-21 18:59:26 +01:00
|
|
|
<span class="badge">{{svg "octicon-project"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2023-04-22 06:15:17 +09:00
|
|
|
{{$oldProjectDisplayHtml := "Unknown Project"}}
|
|
|
|
|
{{if .OldProject}}
|
2024-07-30 13:37:43 +09:00
|
|
|
{{$tooltip := ctx.Locale.Tr "projects.deleted.display_name"}}
|
|
|
|
|
{{if not .OldProject.IsGhost}}
|
|
|
|
|
{{$tooltip = ctx.Locale.Tr (printf "projects.type-%d.display_name" .OldProject.Type)}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{$oldProjectDisplayHtml = HTMLFormat `<span data-tooltip-content="%s">%s</span>` $tooltip .OldProject.Title}}
|
2023-04-22 06:15:17 +09:00
|
|
|
{{end}}
|
|
|
|
|
{{$newProjectDisplayHtml := "Unknown Project"}}
|
|
|
|
|
{{if .Project}}
|
2024-07-30 13:37:43 +09:00
|
|
|
{{$tooltip := ctx.Locale.Tr "projects.deleted.display_name"}}
|
|
|
|
|
{{if not .Project.IsGhost}}
|
|
|
|
|
{{$tooltip = ctx.Locale.Tr (printf "projects.type-%d.display_name" .Project.Type)}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{$newProjectDisplayHtml = HTMLFormat `<span data-tooltip-content="%s">%s</span>` $tooltip .Project.Title}}
|
2023-04-22 06:15:17 +09:00
|
|
|
{{end}}
|
|
|
|
|
{{if and (gt .OldProjectID 0) (gt .ProjectID 0)}}
|
2024-02-25 18:45:56 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.change_project_at" $oldProjectDisplayHtml $newProjectDisplayHtml $createdStr}}
|
2023-04-22 06:15:17 +09:00
|
|
|
{{else if gt .OldProjectID 0}}
|
2024-02-25 18:45:56 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.remove_project_at" $oldProjectDisplayHtml $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else if gt .ProjectID 0}}
|
2024-02-25 18:45:56 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.add_project_at" $newProjectDisplayHtml $createdStr}}
|
2021-02-12 01:32:25 +08:00
|
|
|
{{end}}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2024-08-09 09:29:02 +08:00
|
|
|
{{else if eq .Type 31}}
|
|
|
|
|
{{if not $.UnitProjectsGlobalDisabled}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-project"}}</span>
|
|
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2024-08-09 09:29:02 +08:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
|
|
|
|
{{$newProjectDisplay := .CommentMetaData.ProjectTitle}}
|
|
|
|
|
{{if .Project}}
|
|
|
|
|
{{$trKey := printf "projects.type-%d.display_name" .Project.Type}}
|
|
|
|
|
{{$newProjectDisplay = HTMLFormat `%s <a href="%s"><span data-tooltip-content="%s">%s</span></a>` (svg .Project.IconName) (.Project.Link ctx) (ctx.Locale.Tr $trKey) .Project.Title}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{ctx.Locale.Tr "repo.issues.move_to_column_of_project" .CommentMetaData.ProjectColumnTitle $newProjectDisplay $createdStr}}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else if eq .Type 32}}
|
|
|
|
|
<div class="timeline-item-group">
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
|
2025-07-13 22:52:35 +08:00
|
|
|
{{ctx.AvatarUtils.Avatar .Poster 40}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</a>
|
|
|
|
|
<span class="badge grey">{{svg "octicon-x" 16}}</span>
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{$reviewerName := ""}}
|
2024-03-19 12:19:48 +08:00
|
|
|
{{if .Review}}
|
|
|
|
|
{{if eq .Review.OriginalAuthor ""}}
|
|
|
|
|
{{$reviewerName = .Review.Reviewer.Name}}
|
|
|
|
|
{{else}}
|
|
|
|
|
{{$reviewerName = .Review.OriginalAuthor}}
|
|
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.review.dismissed" $reviewerName $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
{{if .Content}}
|
|
|
|
|
<div class="timeline-item comment">
|
2025-01-25 01:09:57 +08:00
|
|
|
<div class="content comment-container">
|
2025-07-13 22:52:35 +08:00
|
|
|
<div class="comment-header avatar-content-left-arrow arrow-top">
|
2023-05-10 11:16:44 +02:00
|
|
|
{{if gt .Poster.ID 0}}
|
|
|
|
|
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
|
2023-08-10 11:19:39 +08:00
|
|
|
{{ctx.AvatarUtils.Avatar .Poster 24}}
|
2023-05-10 11:16:44 +02:00
|
|
|
</a>
|
|
|
|
|
{{end}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2023-09-25 10:56:50 +02:00
|
|
|
{{ctx.Locale.Tr "action.review_dismissed_reason"}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</span>
|
|
|
|
|
</div>
|
2025-01-25 01:09:57 +08:00
|
|
|
<div class="ui attached segment comment-body">
|
2022-01-21 18:59:26 +01:00
|
|
|
<div class="render-content markup">
|
|
|
|
|
{{if .RenderedContent}}
|
2024-03-01 15:11:51 +08:00
|
|
|
{{.RenderedContent}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
|
|
|
|
</div>
|
2021-02-12 01:32:25 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-11-19 09:54:31 +00:00
|
|
|
{{end}}
|
2022-01-21 18:59:26 +01:00
|
|
|
</div>
|
|
|
|
|
{{else if eq .Type 33}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-git-branch"}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2022-09-03 10:33:34 +01:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{if and .OldRef .NewRef}}
|
2024-02-25 22:02:20 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.change_ref_at" .OldRef .NewRef $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else if .OldRef}}
|
2024-02-25 22:02:20 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.remove_ref_at" .OldRef $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{else}}
|
2024-02-25 22:02:20 +08:00
|
|
|
{{ctx.Locale.Tr "repo.issues.add_ref_at" .NewRef $createdStr}}
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2022-05-07 19:05:52 +02:00
|
|
|
{{else if or (eq .Type 34) (eq .Type 35)}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-git-merge" 16}}</span>
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2024-02-26 04:08:21 +00:00
|
|
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{if eq .Type 34}}{{ctx.Locale.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr}}
|
|
|
|
|
{{else}}{{ctx.Locale.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr}}{{end}}
|
2022-05-07 19:05:52 +02:00
|
|
|
</span>
|
|
|
|
|
</div>
|
2023-05-25 15:17:19 +02:00
|
|
|
{{else if or (eq .Type 36) (eq .Type 37)}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-pin" 16}}</span>
|
2023-08-10 11:19:39 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2023-05-25 15:17:19 +02:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
2024-02-23 01:02:33 +08:00
|
|
|
{{if eq .Type 36}}{{ctx.Locale.Tr "repo.issues.pin_comment" $createdStr}}
|
|
|
|
|
{{else}}{{ctx.Locale.Tr "repo.issues.unpin_comment" $createdStr}}{{end}}
|
2023-05-25 15:17:19 +02:00
|
|
|
</span>
|
|
|
|
|
</div>
|
2024-12-05 15:07:53 +02:00
|
|
|
{{else if eq .Type 38}}
|
|
|
|
|
<div class="timeline-item event" id="{{.HashTag}}">
|
|
|
|
|
<span class="badge">{{svg "octicon-clock"}}</span>
|
2024-12-23 11:21:11 +08:00
|
|
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="comment-text-line">
|
2024-12-05 15:07:53 +02:00
|
|
|
{{template "shared/user/authorlink" .Poster}}
|
|
|
|
|
{{$timeStr := .Content|TimeEstimateString}}
|
|
|
|
|
{{if $timeStr}}
|
|
|
|
|
{{ctx.Locale.Tr "repo.issues.change_time_estimate_at" $timeStr $createdStr}}
|
|
|
|
|
{{else}}
|
|
|
|
|
{{ctx.Locale.Tr "repo.issues.remove_time_estimate_at" $createdStr}}
|
|
|
|
|
{{end}}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2022-01-21 18:59:26 +01:00
|
|
|
{{end}}
|
2018-08-06 07:43:22 +03:00
|
|
|
{{end}}
|
2017-03-17 06:57:43 +01:00
|
|
|
{{end}}
|