2019-02-05 11:38:11 +00:00
|
|
|
{{ template "base/alert" }}
|
2017-03-17 05:57:43 +00:00
|
|
|
{{range .Issue.Comments}}
|
2017-12-11 04:37:04 +00:00
|
|
|
{{ $createdStr:= TimeSinceUnix .CreatedUnix $.Lang }}
|
2017-03-17 05:57:43 +00:00
|
|
|
|
2019-02-18 20:55:04 +00:00
|
|
|
<!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF,
|
|
|
|
5 = COMMENT_REF, 6 = PULL_REF, 7 = COMMENT_LABEL, 12 = START_TRACKING,
|
|
|
|
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 -->
|
2017-03-17 05:57:43 +00:00
|
|
|
{{if eq .Type 0}}
|
|
|
|
<div class="comment" id="{{.HashTag}}">
|
2019-07-08 02:14:12 +00:00
|
|
|
{{if .OriginalAuthor }}
|
|
|
|
<span class="avatar"><img src="/img/avatar_default.png"></span>
|
|
|
|
{{else}}
|
2017-03-17 05:57:43 +00:00
|
|
|
<a class="avatar" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-07-08 02:14:12 +00:00
|
|
|
{{end}}
|
2017-03-17 05:57:43 +00:00
|
|
|
<div class="content">
|
|
|
|
<div class="ui top attached header">
|
2019-07-08 02:14:12 +00:00
|
|
|
{{if .OriginalAuthor }}
|
|
|
|
<span class="text black"><i class="fa {{MigrationIcon $.Repository.GetOriginalURLHostname}}" aria-hidden="true"></i> {{ .OriginalAuthor }}</span><span class="text grey"> {{$.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} {{if $.Repository.OriginalURL}}</span><span class="text migrate">({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}}</span>
|
|
|
|
{{else}}
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
|
2019-07-08 02:14:12 +00:00
|
|
|
{{end}}
|
2019-01-23 18:58:38 +00:00
|
|
|
{{if not $.Repository.IsArchived}}
|
|
|
|
<div class="ui right actions">
|
|
|
|
{{if gt .ShowTag 0}}
|
|
|
|
<div class="item tag">
|
|
|
|
{{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}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) }}
|
|
|
|
{{if or $.Permission.IsAdmin (eq .Poster.ID $.SignedUserID)}}
|
|
|
|
<div class="item action">
|
|
|
|
<a class="edit-content" href="#"><i class="octicon octicon-pencil"></i></a>
|
|
|
|
<a class="delete-comment" href="#" data-comment-id={{.HashTag}} data-url="{{$.RepoLink}}/comments/{{.ID}}/delete" data-locale="{{$.i18n.Tr "repo.issues.delete_comment_confirm"}}"><i class="octicon octicon-x"></i></a>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2017-03-17 05:57:43 +00:00
|
|
|
</div>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<div class="render-content markdown has-emoji">
|
|
|
|
{{if .RenderedContent}}
|
|
|
|
{{.RenderedContent|Str2html}}
|
|
|
|
{{else}}
|
|
|
|
<span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<div class="raw-content hide">{{.Content}}</div>
|
2019-10-15 12:19:32 +00:00
|
|
|
<div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
2017-03-17 05:57:43 +00:00
|
|
|
</div>
|
2017-12-03 23:14:26 +00:00
|
|
|
{{$reactions := .Reactions.GroupByType}}
|
|
|
|
{{if $reactions}}
|
|
|
|
<div class="ui attached segment reactions">
|
|
|
|
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions }}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2017-03-17 05:57:43 +00:00
|
|
|
{{if .Attachments}}
|
|
|
|
<div class="ui bottom attached segment">
|
|
|
|
<div class="ui small images">
|
2019-10-15 12:19:32 +00:00
|
|
|
{{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments}}
|
2017-03-17 05:57:43 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 1}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}</span>
|
2017-03-17 05:57:43 +00:00
|
|
|
</div>
|
|
|
|
{{else if eq .Type 2}}
|
|
|
|
<div class="event">
|
2019-07-06 22:03:00 +00:00
|
|
|
<span class="octicon octicon-circle-slash issue-symbol"></span>
|
2017-03-17 05:57:43 +00:00
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}</span>
|
2017-03-17 05:57:43 +00:00
|
|
|
</div>
|
2019-09-20 05:45:38 +00:00
|
|
|
{{else if or (eq .Type 3) (eq .Type 5) (eq .Type 6)}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-bookmark"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
|
|
|
{{if eq .RefAction 3}}<del>{{end}}
|
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
|
|
|
{{if (eq .RefRepoID .Issue.RepoID)}}
|
|
|
|
{{if .Issue.IsPull}}
|
|
|
|
<a href="{{.RefCommentHTMLURL}}">{{$.i18n.Tr "repo.issues.ref_pull_at" $createdStr | Safe}}</a>
|
|
|
|
{{else}}
|
|
|
|
<a href="{{.RefCommentHTMLURL}}">{{$.i18n.Tr "repo.issues.ref_issue_at" $createdStr | Safe}}</a>
|
|
|
|
{{end}}
|
|
|
|
{{else}}
|
|
|
|
{{if .Issue.IsPull}}
|
|
|
|
<a href="{{.RefCommentHTMLURL}}">{{$.i18n.Tr "repo.issues.ref_pull_ext_at" .RefRepo.FullName $createdStr | Safe}}</a>
|
|
|
|
{{else}}
|
|
|
|
<a href="{{.RefCommentHTMLURL}}">{{$.i18n.Tr "repo.issues.ref_issue_ext_at" .RefRepo.FullName $createdStr | Safe}}</a>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</span>
|
|
|
|
{{if eq .RefAction 3}}</del>{{end}}
|
|
|
|
|
|
|
|
<div class="detail">
|
|
|
|
<span class="text grey"><a href="{{.RefIssueHTMLURL}}"><b>{{.RefIssueTitle | Str2html}}</b> {{.RefIssueIdent | Str2html}}</a></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-17 05:57:43 +00:00
|
|
|
{{else if eq .Type 4}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-bookmark"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}</span>
|
2017-03-17 05:57:43 +00:00
|
|
|
|
|
|
|
<div class="detail">
|
|
|
|
<span class="octicon octicon-git-commit"></span>
|
|
|
|
<span class="text grey">{{.Content | Str2html}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 7}}
|
|
|
|
{{if .Label}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
2018-02-18 20:06:37 +00:00
|
|
|
{{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}}</span>
|
2017-03-17 05:57:43 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{else if eq .Type 8}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
2018-02-18 20:06:37 +00:00
|
|
|
{{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}}</span>
|
2017-03-17 05:57:43 +00:00
|
|
|
</div>
|
|
|
|
{{else if eq .Type 9}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
2018-05-09 16:29:04 +00:00
|
|
|
{{if gt .AssigneeID 0}}
|
|
|
|
{{if .RemovedAssignee}}
|
|
|
|
<a class="ui avatar image" href="{{.Assignee.HomeLink}}">
|
|
|
|
<img src="{{.Assignee.RelAvatarLink}}">
|
|
|
|
</a>
|
|
|
|
<span class="text grey">
|
2019-05-08 08:41:35 +00:00
|
|
|
<a href="{{.Assignee.HomeLink}}">{{.Assignee.GetDisplayName}}</a>
|
2019-01-19 19:16:46 +00:00
|
|
|
{{ if eq .Poster.ID .Assignee.ID }}
|
|
|
|
{{$.i18n.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}}
|
|
|
|
{{ else }}
|
2019-05-08 08:41:35 +00:00
|
|
|
{{$.i18n.Tr "repo.issues.remove_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
|
2019-01-19 19:16:46 +00:00
|
|
|
{{ end }}
|
2018-05-09 16:29:04 +00:00
|
|
|
</span>
|
|
|
|
{{else}}
|
|
|
|
<a class="ui avatar image" href="{{.Assignee.HomeLink}}">
|
|
|
|
<img src="{{.Assignee.RelAvatarLink}}">
|
|
|
|
</a>
|
|
|
|
<span class="text grey">
|
2019-05-08 08:41:35 +00:00
|
|
|
<a href="{{.Assignee.HomeLink}}">{{.Assignee.GetDisplayName}}</a>
|
2018-05-09 16:29:04 +00:00
|
|
|
{{if eq .Poster.ID .AssigneeID}}
|
|
|
|
{{$.i18n.Tr "repo.issues.self_assign_at" $createdStr | Safe}}
|
|
|
|
{{else}}
|
2019-05-08 08:41:35 +00:00
|
|
|
{{$.i18n.Tr "repo.issues.add_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
|
2018-05-09 16:29:04 +00:00
|
|
|
{{end}}
|
|
|
|
</span>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2017-03-17 05:57:43 +00:00
|
|
|
</div>
|
|
|
|
{{else if eq .Type 10}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
2018-02-18 20:06:37 +00:00
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
2018-02-18 20:06:37 +00:00
|
|
|
{{$.i18n.Tr "repo.issues.change_title_at" (.OldTitle|Escape) (.NewTitle|Escape) $createdStr | Safe}}
|
|
|
|
</span>
|
2017-03-17 05:57:43 +00:00
|
|
|
</div>
|
|
|
|
{{else if eq .Type 11}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
2018-02-18 20:06:37 +00:00
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
2018-04-10 03:43:37 +00:00
|
|
|
{{$.i18n.Tr "repo.issues.delete_branch_at" (.CommitSHA|Escape) $createdStr | Safe}}
|
2018-02-18 20:06:37 +00:00
|
|
|
</span>
|
2017-03-17 05:57:43 +00:00
|
|
|
</div>
|
2019-07-06 22:03:00 +00:00
|
|
|
{{else if eq .Type 12}}
|
2017-09-12 06:48:13 +00:00
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.start_tracking_history" $createdStr | Safe}}</span>
|
2017-09-12 06:48:13 +00:00
|
|
|
</div>
|
|
|
|
{{else if eq .Type 13}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}}</span>
|
2017-09-12 06:48:13 +00:00
|
|
|
|
|
|
|
<div class="detail">
|
|
|
|
<span class="octicon octicon-clock"></span>
|
|
|
|
<span class="text grey">{{.Content}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 14}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.add_time_history" $createdStr | Safe}}</span>
|
2017-09-12 06:48:13 +00:00
|
|
|
<div class="detail">
|
|
|
|
<span class="octicon octicon-clock"></span>
|
|
|
|
<span class="text grey">{{.Content}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 15}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}}</span>
|
2017-09-12 06:48:13 +00:00
|
|
|
</div>
|
2018-05-01 19:05:28 +00:00
|
|
|
{{else if eq .Type 16}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
2018-05-01 19:05:28 +00:00
|
|
|
{{$.i18n.Tr "repo.issues.due_date_added" .Content $createdStr | Safe}}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 17}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
2018-05-01 19:05:28 +00:00
|
|
|
{{$.i18n.Tr "repo.issues.due_date_modified" (.Content | ParseDeadline) $createdStr | Safe}}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 18}}
|
|
|
|
<div class="event">
|
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
2019-05-08 08:41:35 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
2018-05-01 19:05:28 +00:00
|
|
|
{{$.i18n.Tr "repo.issues.due_date_remove" .Content $createdStr | Safe}}
|
|
|
|
</span>
|
|
|
|
</div>
|
2018-07-17 21:23:58 +00:00
|
|
|
{{else if eq .Type 19}}
|
|
|
|
<div class="event">
|
2019-07-06 22:03:00 +00:00
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
2018-07-17 21:23:58 +00:00
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
2019-07-06 22:03:00 +00:00
|
|
|
</a>
|
|
|
|
<span class="text grey">
|
|
|
|
{{$.i18n.Tr "repo.issues.dependency.added_dependency" .Poster.HomeLink (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
|
|
|
|
</span>
|
|
|
|
<div class="detail">
|
|
|
|
<span class="octicon octicon-plus"></span>
|
2018-07-17 21:23:58 +00:00
|
|
|
<span class="text grey"><a href="{{$.RepoLink}}/issues/{{.DependentIssue.Index}}">#{{.DependentIssue.Index}} {{.DependentIssue.Title}}</a></span>
|
|
|
|
</div>
|
2019-07-06 22:03:00 +00:00
|
|
|
</div>
|
2018-07-17 21:23:58 +00:00
|
|
|
{{else if eq .Type 20}}
|
|
|
|
<div class="event">
|
2019-07-06 22:03:00 +00:00
|
|
|
<span class="octicon octicon-primitive-dot"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
|
|
|
<span class="text grey">
|
|
|
|
{{$.i18n.Tr "repo.issues.dependency.removed_dependency" .Poster.HomeLink (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
|
|
|
|
</span>
|
|
|
|
<div class="detail">
|
|
|
|
<span class="text grey octicon octicon-trashcan"></span>
|
2018-07-17 21:23:58 +00:00
|
|
|
<span class="text grey"><a href="{{$.RepoLink}}/issues/{{.DependentIssue.Index}}">#{{.DependentIssue.Index}} {{.DependentIssue.Title}}</a></span>
|
2019-07-06 22:03:00 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-06 04:43:22 +00:00
|
|
|
{{else if eq .Type 22}}
|
2019-07-06 22:03:00 +00:00
|
|
|
<div class="event" id="{{.HashTag}}">
|
|
|
|
<span class="octicon octicon-{{.Review.Type.Icon}} issue-symbol"></span>
|
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
|
|
|
{{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}}
|
|
|
|
</span>
|
|
|
|
{{if .Content}}
|
|
|
|
<div class="detail">
|
2018-08-06 04:43:22 +00:00
|
|
|
<span class="octicon octicon-quote"></span>
|
2019-07-06 22:03:00 +00:00
|
|
|
<span class="text grey">{{.Content}}</span>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2018-08-06 04:43:22 +00:00
|
|
|
{{ range $filename, $lines := .Review.CodeComments}}
|
|
|
|
{{range $line, $comms := $lines}}
|
|
|
|
<div class="ui segments">
|
|
|
|
<div class="ui segment">
|
|
|
|
{{$invalid := (index $comms 0).Invalidated}}
|
|
|
|
{{if $invalid}}
|
|
|
|
<button id="show-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="ui compact right labeled button show-outdated">
|
|
|
|
<i class="octicon octicon-fold"></i>
|
|
|
|
{{$.i18n.Tr "repo.issues.review.show_outdated"}}
|
|
|
|
</button>
|
|
|
|
<button id="hide-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="hide ui compact right labeled button hide-outdated">
|
|
|
|
<i class="octicon octicon-fold"></i>
|
|
|
|
{{$.i18n.Tr "repo.issues.review.hide_outdated"}}
|
|
|
|
</button>
|
|
|
|
{{end}}
|
|
|
|
<a href="{{(index $comms 0).CodeCommentURL}}" class="file-comment">{{$filename}}</a>
|
|
|
|
</div>
|
2019-09-06 02:20:09 +00:00
|
|
|
{{$diff := (CommentMustAsDiff (index $comms 0))}}
|
2018-08-06 04:43:22 +00:00
|
|
|
{{if $diff}}
|
|
|
|
{{$file := (index $diff.Files 0)}}
|
|
|
|
<div id="code-preview-{{(index $comms 0).ID}}" class="ui table segment{{if $invalid}} hide{{end}}">
|
|
|
|
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}}">
|
|
|
|
<div class="file-body file-code code-view code-diff code-diff-unified">
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
{{template "repo/diff/section_unified" dict "file" $file "root" $}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
<div id="code-comments-{{(index $comms 0).ID}}" class="ui segment{{if $invalid}} hide{{end}}">
|
|
|
|
<div class="ui comments">
|
|
|
|
{{range $comms}}
|
|
|
|
{{ $createdSubStr:= TimeSinceUnix .CreatedUnix $.Lang }}
|
|
|
|
<div class="comment" id="{{.HashTag}}">
|
|
|
|
<a class="avatar">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
|
|
|
<div class="content">
|
2019-05-08 08:41:35 +00:00
|
|
|
<a class="author" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
|
2018-08-06 04:43:22 +00:00
|
|
|
<div class="metadata">
|
|
|
|
<span class="date">{{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdSubStr | Safe}}</span>
|
|
|
|
</div>
|
|
|
|
<div class="text">
|
|
|
|
<div class="render-content markdown has-emoji">
|
|
|
|
{{if .RenderedContent}}
|
|
|
|
{{.RenderedContent|Str2html}}
|
|
|
|
{{else}}
|
|
|
|
<span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<div class="raw-content hide">{{.Content}}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2018-10-22 20:13:35 +00:00
|
|
|
{{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index $comms 0).ReviewID "root" $ "comment" (index $comms 0)}}
|
2018-08-06 04:43:22 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2019-07-06 22:03:00 +00:00
|
|
|
</div>
|
2019-02-18 20:55:04 +00:00
|
|
|
{{else if eq .Type 23}}
|
|
|
|
<div class="event">
|
2019-07-06 22:03:00 +00:00
|
|
|
<span class="octicon octicon-lock issue-symbol"></span>
|
2019-02-18 20:55:04 +00:00
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
|
|
|
|
|
|
|
{{ if .Content }}
|
2019-07-06 22:03:00 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
2019-02-18 20:55:04 +00:00
|
|
|
{{$.i18n.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}}
|
2019-07-06 22:03:00 +00:00
|
|
|
</span>
|
2019-02-18 20:55:04 +00:00
|
|
|
{{ else }}
|
2019-07-06 22:03:00 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
2019-02-18 20:55:04 +00:00
|
|
|
{{$.i18n.Tr "repo.issues.lock_no_reason" $createdStr | Safe}}
|
2019-07-06 22:03:00 +00:00
|
|
|
</span>
|
2019-02-18 20:55:04 +00:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{else if eq .Type 24}}
|
|
|
|
<div class="event">
|
2019-07-06 22:03:00 +00:00
|
|
|
<span class="octicon octicon-key issue-symbol"></span>
|
2019-02-18 20:55:04 +00:00
|
|
|
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
|
|
|
<img src="{{.Poster.RelAvatarLink}}">
|
|
|
|
</a>
|
|
|
|
|
2019-07-06 22:03:00 +00:00
|
|
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
|
|
|
{{$.i18n.Tr "repo.issues.unlock_comment" $createdStr | Safe}}
|
|
|
|
</span>
|
2019-02-18 20:55:04 +00:00
|
|
|
</div>
|
2018-08-06 04:43:22 +00:00
|
|
|
{{end}}
|
2017-03-17 05:57:43 +00:00
|
|
|
{{end}}
|