teams.tmpl 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 $.LoggedUser.ID}}
  19. <a class="ui red small button" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/leave?uid={{$.LoggedUser.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={{$.LoggedUser.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="{{.RelAvatarLink}}">
  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" .}}