1{{range .Feeds}}
2	<div class="news">
3		<div class="ui left">
4			{{avatarByAction .}}
5		</div>
6		<div class="ui grid">
7			<div class="ui fourteen wide column">
8				<div class="{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}push news{{end}}">
9					<p>
10						{{if gt .ActUser.ID 0}}
11							<a href="{{AppSubUrl}}/{{.GetActUserName | PathEscape}}" title="{{.GetDisplayNameTitle}}">{{.GetDisplayName}}</a>
12						{{else}}
13							{{.ShortActUserName}}
14						{{end}}
15						{{if eq .GetOpType 1}}
16							{{$.i18n.Tr "action.create_repo" (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
17						{{else if eq .GetOpType 2}}
18							{{$.i18n.Tr "action.rename_repo" (.GetContent|Escape) (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
19						{{else if eq .GetOpType 5}}
20							{{if .Content}}
21								{{$.i18n.Tr "action.commit_repo" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
22							{{else}}
23								{{$.i18n.Tr "action.create_branch" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
24							{{end}}
25						{{else if eq .GetOpType 6}}
26							{{ $index := index .GetIssueInfos 0}}
27							{{$.i18n.Tr "action.create_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
28						{{else if eq .GetOpType 7}}
29							{{ $index := index .GetIssueInfos 0}}
30							{{$.i18n.Tr "action.create_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
31						{{else if eq .GetOpType 8}}
32							{{$.i18n.Tr "action.transfer_repo" .GetContent (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
33						{{else if eq .GetOpType 9}}
34							{{$.i18n.Tr "action.push_tag" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
35						{{else if eq .GetOpType 10}}
36							{{ $index := index .GetIssueInfos 0}}
37							{{$.i18n.Tr "action.comment_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
38						{{else if eq .GetOpType 11}}
39							{{ $index := index .GetIssueInfos 0}}
40							{{$.i18n.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
41						{{else if eq .GetOpType 12}}
42							{{ $index := index .GetIssueInfos 0}}
43							{{$.i18n.Tr "action.close_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
44						{{else if eq .GetOpType 13}}
45							{{ $index := index .GetIssueInfos 0}}
46							{{$.i18n.Tr "action.reopen_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
47						{{else if eq .GetOpType 14}}
48							{{ $index := index .GetIssueInfos 0}}
49							{{$.i18n.Tr "action.close_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
50						{{else if eq .GetOpType 15}}
51							{{ $index := index .GetIssueInfos 0}}
52							{{$.i18n.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
53						{{else if eq .GetOpType 16}}
54							{{ $index := index .GetIssueInfos 0}}
55							{{$.i18n.Tr "action.delete_tag" (.GetRepoLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
56						{{else if eq .GetOpType 17}}
57							{{ $index := index .GetIssueInfos 0}}
58							{{$.i18n.Tr "action.delete_branch" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
59						{{else if eq .GetOpType 18}}
60							{{$.i18n.Tr "action.mirror_sync_push" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
61						{{else if eq .GetOpType 19}}
62							{{$.i18n.Tr "action.mirror_sync_create" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
63						{{else if eq .GetOpType 20}}
64							{{$.i18n.Tr "action.mirror_sync_delete" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
65						{{else if eq .GetOpType 21}}
66							{{ $index := index .GetIssueInfos 0}}
67							{{$.i18n.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
68						{{else if eq .GetOpType 22}}
69							{{ $index := index .GetIssueInfos 0}}
70							{{$.i18n.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
71						{{else if eq .GetOpType 23}}
72							{{ $index := index .GetIssueInfos 0}}
73							{{$.i18n.Tr "action.comment_pull" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
74						{{else if eq .GetOpType 24}}
75							{{ $linkText := .Content | RenderEmoji }}
76							{{$.i18n.Tr "action.publish_release" (.GetRepoLink|Escape) ((printf "%s/releases/tag/%s" .GetRepoLink .GetTag)|Escape) (.ShortRepoPath|Escape) $linkText | Str2html}}
77						{{else if eq .GetOpType 25}}
78							{{ $index := index .GetIssueInfos 0}}
79							{{ $reviewer := index .GetIssueInfos 1}}
80							{{$.i18n.Tr "action.review_dismissed" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) $reviewer | Str2html}}
81						{{end}}
82					</p>
83					{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}
84						<div class="content">
85							<ul>
86								{{ $push := ActionContent2Commits .}}
87								{{ $repoLink := .GetRepoLink}}
88								{{range $push.Commits}}
89									{{ $commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
90									<li>
91										{{avatarHTML ($push.AvatarLink .AuthorEmail) 16 "mr-2" .AuthorName}}
92										<a class="commit-id mr-2" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
93										<span class="text truncate light grey">
94											{{RenderCommitMessage .Message $repoLink $.ComposeMetas}}
95										</span>
96									</li>
97								{{end}}
98								{{if and (gt $push.Len 1) $push.CompareURL}}<li><a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.i18n.Tr "action.compare_commits" $push.Len}} »</a></li>{{end}}
99							</ul>
100						</div>
101					{{else if eq .GetOpType 6}}
102						<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji}}</span>
103					{{else if eq .GetOpType 7}}
104						<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji}}</span>
105					{{else if or (eq .GetOpType 10) (eq .GetOpType 21) (eq .GetOpType 22) (eq .GetOpType 23)}}
106						<a href="{{.GetCommentLink}}" class="text truncate issue title">{{.GetIssueTitle | RenderEmoji}}</a>
107						{{$comment := index .GetIssueInfos 1}}
108						{{if gt (len $comment) 0}}<p class="text light grey">{{$comment | RenderEmoji}}</p>{{end}}
109					{{else if eq .GetOpType 11}}
110						<p class="text light grey">{{index .GetIssueInfos 1}}</p>
111					{{else if or (eq .GetOpType 12) (eq .GetOpType 13) (eq .GetOpType 14) (eq .GetOpType 15)}}
112						<span class="text truncate issue title">{{.GetIssueTitle | RenderEmoji}}</span>
113					{{else if eq .GetOpType 25}}
114					<p class="text light grey">{{$.i18n.Tr "action.review_dismissed_reason"}}</p>
115						<p class="text light grey">{{index .GetIssueInfos 2 | RenderEmoji}}</p>
116					{{end}}
117					<p class="text italic light grey">{{TimeSince .GetCreate $.i18n.Lang}}</p>
118				</div>
119			</div>
120			<div class="ui two wide right aligned column">
121				<span class="text grey">{{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32}}</span>
122			</div>
123		</div>
124		<div class="ui divider"></div>
125	</div>
126{{end}}
127