code.gitea.io/gitea@v1.22.3/templates/user/dashboard/feeds.tmpl (about) 1 <div id="activity-feed" class="flex-list"> 2 {{range .Feeds}} 3 <div class="flex-item"> 4 <div class="flex-item-leading"> 5 {{ctx.AvatarUtils.AvatarByAction .}} 6 </div> 7 <div class="flex-item-main tw-gap-2"> 8 <div> 9 {{if gt .ActUser.ID 0}} 10 <a href="{{AppSubUrl}}/{{(.GetActUserName ctx) | PathEscape}}" title="{{.GetActDisplayNameTitle ctx}}">{{.GetActDisplayName ctx}}</a> 11 {{else}} 12 {{.ShortActUserName ctx}} 13 {{end}} 14 {{if .GetOpType.InActions "create_repo"}} 15 {{ctx.Locale.Tr "action.create_repo" (.GetRepoLink ctx) (.ShortRepoPath ctx)}} 16 {{else if .GetOpType.InActions "rename_repo"}} 17 {{ctx.Locale.Tr "action.rename_repo" .GetContent (.GetRepoLink ctx) (.ShortRepoPath ctx)}} 18 {{else if .GetOpType.InActions "commit_repo"}} 19 {{if .Content}} 20 {{ctx.Locale.Tr "action.commit_repo" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}} 21 {{else}} 22 {{ctx.Locale.Tr "action.create_branch" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}} 23 {{end}} 24 {{else if .GetOpType.InActions "create_issue"}} 25 {{$index := index .GetIssueInfos 0}} 26 {{ctx.Locale.Tr "action.create_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} 27 {{else if .GetOpType.InActions "create_pull_request"}} 28 {{$index := index .GetIssueInfos 0}} 29 {{ctx.Locale.Tr "action.create_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} 30 {{else if .GetOpType.InActions "transfer_repo"}} 31 {{ctx.Locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink ctx) (.ShortRepoPath ctx)}} 32 {{else if .GetOpType.InActions "push_tag"}} 33 {{ctx.Locale.Tr "action.push_tag" (.GetRepoLink ctx) (.GetRefLink ctx) .GetTag (.ShortRepoPath ctx)}} 34 {{else if .GetOpType.InActions "comment_issue"}} 35 {{$index := index .GetIssueInfos 0}} 36 {{ctx.Locale.Tr "action.comment_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} 37 {{else if .GetOpType.InActions "merge_pull_request"}} 38 {{$index := index .GetIssueInfos 0}} 39 {{ctx.Locale.Tr "action.merge_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} 40 {{else if .GetOpType.InActions "close_issue"}} 41 {{$index := index .GetIssueInfos 0}} 42 {{ctx.Locale.Tr "action.close_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} 43 {{else if .GetOpType.InActions "reopen_issue"}} 44 {{$index := index .GetIssueInfos 0}} 45 {{ctx.Locale.Tr "action.reopen_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} 46 {{else if .GetOpType.InActions "close_pull_request"}} 47 {{$index := index .GetIssueInfos 0}} 48 {{ctx.Locale.Tr "action.close_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} 49 {{else if .GetOpType.InActions "reopen_pull_request"}} 50 {{$index := index .GetIssueInfos 0}} 51 {{ctx.Locale.Tr "action.reopen_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} 52 {{else if .GetOpType.InActions "delete_tag"}} 53 {{$index := index .GetIssueInfos 0}} 54 {{ctx.Locale.Tr "action.delete_tag" (.GetRepoLink ctx) .GetTag (.ShortRepoPath ctx)}} 55 {{else if .GetOpType.InActions "delete_branch"}} 56 {{$index := index .GetIssueInfos 0}} 57 {{ctx.Locale.Tr "action.delete_branch" (.GetRepoLink ctx) .GetBranch (.ShortRepoPath ctx)}} 58 {{else if .GetOpType.InActions "mirror_sync_push"}} 59 {{ctx.Locale.Tr "action.mirror_sync_push" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}} 60 {{else if .GetOpType.InActions "mirror_sync_create"}} 61 {{ctx.Locale.Tr "action.mirror_sync_create" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}} 62 {{else if .GetOpType.InActions "mirror_sync_delete"}} 63 {{ctx.Locale.Tr "action.mirror_sync_delete" (.GetRepoLink ctx) .GetBranch (.ShortRepoPath ctx)}} 64 {{else if .GetOpType.InActions "approve_pull_request"}} 65 {{$index := index .GetIssueInfos 0}} 66 {{ctx.Locale.Tr "action.approve_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} 67 {{else if .GetOpType.InActions "reject_pull_request"}} 68 {{$index := index .GetIssueInfos 0}} 69 {{ctx.Locale.Tr "action.reject_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} 70 {{else if .GetOpType.InActions "comment_pull"}} 71 {{$index := index .GetIssueInfos 0}} 72 {{ctx.Locale.Tr "action.comment_pull" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}} 73 {{else if .GetOpType.InActions "publish_release"}} 74 {{$linkText := .Content | RenderEmoji $.Context}} 75 {{ctx.Locale.Tr "action.publish_release" (.GetRepoLink ctx) (printf "%s/releases/tag/%s" (.GetRepoLink ctx) .GetTag) (.ShortRepoPath ctx) $linkText}} 76 {{else if .GetOpType.InActions "review_dismissed"}} 77 {{$index := index .GetIssueInfos 0}} 78 {{$reviewer := index .GetIssueInfos 1}} 79 {{ctx.Locale.Tr "action.review_dismissed" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx) $reviewer}} 80 {{end}} 81 {{TimeSince .GetCreate ctx.Locale}} 82 </div> 83 {{if .GetOpType.InActions "commit_repo" "mirror_sync_push"}} 84 {{$push := ActionContent2Commits .}} 85 {{$repoLink := (.GetRepoLink ctx)}} 86 {{$repo := .Repo}} 87 <div class="tw-flex tw-flex-col tw-gap-1"> 88 {{range $push.Commits}} 89 {{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}} 90 <div class="flex-text-block"> 91 <img class="ui avatar" src="{{$push.AvatarLink $.Context .AuthorEmail}}" title="{{.AuthorName}}" width="16" height="16"> 92 <a class="ui sha label" href="{{$commitLink}}">{{ShortSha .Sha1}}</a> 93 <span class="text truncate"> 94 {{RenderCommitMessage $.Context .Message ($repo.ComposeMetas ctx)}} 95 </span> 96 </div> 97 {{end}} 98 </div> 99 {{if and (gt $push.Len 1) $push.CompareURL}} 100 <a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{ctx.Locale.Tr "action.compare_commits" $push.Len}} ยป</a> 101 {{end}} 102 {{else if .GetOpType.InActions "create_issue"}} 103 <span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span> 104 {{else if .GetOpType.InActions "create_pull_request"}} 105 <span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span> 106 {{else if .GetOpType.InActions "comment_issue" "approve_pull_request" "reject_pull_request" "comment_pull"}} 107 <a href="{{.GetCommentLink ctx}}" class="text truncate issue title">{{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}}</a> 108 {{$comment := index .GetIssueInfos 1}} 109 {{if $comment}} 110 <div class="markup tw-text-14">{{RenderMarkdownToHtml ctx $comment}}</div> 111 {{end}} 112 {{else if .GetOpType.InActions "merge_pull_request"}} 113 <div class="flex-item-body text black">{{index .GetIssueInfos 1}}</div> 114 {{else if .GetOpType.InActions "close_issue" "reopen_issue" "close_pull_request" "reopen_pull_request"}} 115 <span class="text truncate issue title">{{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}}</span> 116 {{else if .GetOpType.InActions "pull_review_dismissed"}} 117 <div class="flex-item-body text black">{{ctx.Locale.Tr "action.review_dismissed_reason"}}</div> 118 <div class="flex-item-body text black">{{index .GetIssueInfos 2 | RenderEmoji $.Context}}</div> 119 {{end}} 120 </div> 121 <div class="flex-item-trailing"> 122 {{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "text grey tw-mr-1"}} 123 </div> 124 </div> 125 {{end}} 126 {{template "base/paginate" .}} 127 </div>