You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
3.1 KiB

  1. {{range .Feeds}}
  2. <div class="news clear">
  3. <div class="avatar left">
  4. <img class="avatar-30" src="{{.ActAvatar}}" alt="">
  5. </div>
  6. <div class="content left {{if eq .GetOpType 5}}push-news{{end}} grid-4-5">
  7. <p class="text-bold">
  8. <a href="{{AppSubUrl}}/{{.GetActUserName}}">{{.GetActUserName}}</a>
  9. {{if eq .GetOpType 1}}
  10. {{$.i18n.Tr "action.create_repo" .GetRepoLink .GetRepoPath | Str2html}}
  11. {{else if eq .GetOpType 2}}
  12. {{$.i18n.Tr "action.rename_repo" .GetContent .GetRepoLink .GetRepoPath | Str2html}}
  13. {{else if eq .GetOpType 5}}
  14. {{$.i18n.Tr "action.commit_repo" .GetRepoLink .GetBranch .GetRepoPath | Str2html}}
  15. {{else if eq .GetOpType 6}}
  16. {{ $index := index .GetIssueInfos 0}}
  17. {{$.i18n.Tr "action.create_issue" .GetRepoLink $index .GetRepoPath | Str2html}}
  18. {{else if eq .GetOpType 7}}
  19. {{ $index := index .GetIssueInfos 0}}
  20. {{$.i18n.Tr "action.create_pull_request" .GetRepoLink $index .GetRepoPath | Str2html}}
  21. {{else if eq .GetOpType 8}}
  22. {{$.i18n.Tr "action.transfer_repo" .GetContent .GetRepoLink .GetRepoPath | Str2html}}
  23. {{else if eq .GetOpType 9}}
  24. {{$.i18n.Tr "action.push_tag" .GetRepoLink .GetBranch .GetRepoPath | Str2html}}
  25. {{else if eq .GetOpType 10}}
  26. {{ $index := index .GetIssueInfos 0}}
  27. {{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .GetRepoPath | Str2html}}
  28. {{else if eq .GetOpType 11}}
  29. {{ $index := index .GetIssueInfos 0}}
  30. {{$.i18n.Tr "action.merge_pull_request" .GetRepoLink $index .GetRepoPath | Str2html}}
  31. {{end}}
  32. </p>
  33. {{if eq .GetOpType 5}}
  34. <div class="news-content content">
  35. <ul class="list-no-style">
  36. {{ $push := ActionContent2Commits .}}
  37. {{ $repoLink := .GetRepoLink}}
  38. {{if $push.Commits}}
  39. {{range $push.Commits}}
  40. <li><img class="avatar-16" src="{{AvatarLink .AuthorEmail}}?s=16"> <a href="{{$repoLink}}/commit/{{.Sha1}}">{{ShortSha .Sha1}}</a> <span class="text-truncate grid-4-5">{{.Message}}</span></li>
  41. {{end}}
  42. {{end}}
  43. {{if $push.CompareUrl}}<li><a href="{{AppSubUrl}}/{{$push.CompareUrl}}">{{$.i18n.Tr "action.compare_2_commits"}} »</a></li>{{end}}
  44. </ul>
  45. </div>
  46. {{else if eq .GetOpType 6}}
  47. <p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
  48. {{else if eq .GetOpType 7}}
  49. <p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
  50. {{else if eq .GetOpType 10}}
  51. <p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
  52. {{else if eq .GetOpType 11}}
  53. <p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
  54. {{end}}
  55. <p class="news-time text-italic">{{TimeSince .GetCreate $.i18n.Lang}}</p>
  56. </div>
  57. <i class="mega-octicon octicon-{{ActionIcon .GetOpType}} right"></i>
  58. </div>
  59. {{end}}