teams.tmpl 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. {{template "org/base/header" .}}
  4. <div class="container">
  5. <div class="org-header-alert">
  6. {{template "ng/base/alert" .}}
  7. </div>
  8. <div class="org-toolbar clear">
  9. {{if .IsOrganizationOwner}}
  10. <a class="btn btn-green btn-large btn-link btn-radius right" href="{{.OrgLink}}/teams/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.create_new_team"}}</a>
  11. {{end}}
  12. </div>
  13. <div class="org-team-list">
  14. {{range .Teams}}
  15. <div class="org-team-list-item">
  16. <div class="panel panel-radius">
  17. <div class="panel-header">
  18. {{if .IsMember $.SignedUser.Id}}
  19. <a class="btn btn-small btn-red btn-header btn-radius right" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/leave?uid={{$.SignedUser.Id}}">{{$.i18n.Tr "org.teams.leave"}}</a>
  20. {{else if $.IsOrganizationOwner}}
  21. <a class="btn btn-small btn-blue btn-header btn-radius right" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/join?uid={{$.SignedUser.Id}}">{{$.i18n.Tr "org.teams.join"}}</a>
  22. {{end}}
  23. <a class="text-black" href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a>
  24. </div>
  25. {{if .NumMembers}}
  26. <div class="panel-body member-avatar-group">
  27. {{range .Members}}
  28. <a href="{{AppSubUrl}}/{{.Name}}" title="{{.Name}}">
  29. <img src="{{.AvatarLink}}">
  30. </a>
  31. {{end}}
  32. </div>
  33. {{end}}
  34. <div class="panel-footer">
  35. <p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
  36. </div>
  37. </div>
  38. </div>
  39. {{end}}
  40. </div>
  41. </div>
  42. {{template "ng/base/footer" .}}