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.

48 lines
2.5 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 8}}
  19. {{$.i18n.Tr "action.transfer_repo" .GetContent .GetRepoLink .GetRepoPath | Str2html}}
  20. {{else if eq .GetOpType 9}}
  21. {{$.i18n.Tr "action.push_tag" .GetRepoLink .GetBranch .GetRepoPath | Str2html}}
  22. {{else if eq .GetOpType 10}}
  23. {{ $index := index .GetIssueInfos 0}}
  24. {{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .GetRepoPath | Str2html}}
  25. {{end}}
  26. </p>
  27. {{if eq .GetOpType 5}}
  28. <div class="news-content content">
  29. <ul class="list-no-style">
  30. {{ $push := ActionContent2Commits .}}
  31. {{ $repoLink := .GetRepoLink}}
  32. {{if $push.Commits}}
  33. {{range $push.Commits}}
  34. <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>
  35. {{end}}
  36. {{end}}
  37. {{if $push.CompareUrl}}<li><a href="{{AppSubUrl}}/{{$push.CompareUrl}}">{{$.i18n.Tr "action.compare_2_commits"}} »</a></li>{{end}}
  38. </ul>
  39. </div>
  40. {{else if eq .GetOpType 6}}
  41. <p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
  42. {{else if eq .GetOpType 10}}
  43. <p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
  44. {{end}}
  45. <p class="news-time text-italic">{{TimeSince .GetCreate $.i18n.Lang}}</p>
  46. </div>
  47. <i class="mega-octicon octicon-{{ActionIcon .GetOpType}} right"></i>
  48. </div>
  49. {{end}}