teams.tmpl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {{template "base/head" .}}
  2. <div class="organization teams">
  3. {{template "org/header" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. {{if .IsOrganizationOwner}}
  7. <div class="text right">
  8. <a class="ui green button" href="{{.OrgLink}}/teams/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.create_new_team"}}</a>
  9. </div>
  10. <div class="ui divider"></div>
  11. {{end}}
  12. <div class="ui two column grid">
  13. {{range .Teams}}
  14. <div class="column">
  15. <div class="ui top attached header">
  16. <a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a>
  17. <div class="ui right">
  18. {{if .IsMember $.SignedUser.ID}}
  19. <a class="ui red small button" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/leave?uid={{$.SignedUser.ID}}">{{$.i18n.Tr "org.teams.leave"}}</a>
  20. {{else if $.IsOrganizationOwner}}
  21. <a class="ui blue small button" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/join?uid={{$.SignedUser.ID}}">{{$.i18n.Tr "org.teams.join"}}</a>
  22. {{end}}
  23. </div>
  24. </div>
  25. <div class="ui attached segment members">
  26. {{range .Members}}
  27. <a href="{{.HomeLink}}" title="{{.Name}}">
  28. <img class="ui avatar image" src="{{.AvatarLink}}">
  29. </a>
  30. {{end}}
  31. </div>
  32. <div class="ui bottom attached header">
  33. <p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
  34. </div>
  35. </div>
  36. {{end}}
  37. </div>
  38. </div>
  39. </div>
  40. {{template "base/footer" .}}