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.

feeds.tmpl 2.3KB

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