sidebar.tmpl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <div class="ui six wide column">
  2. <h4 class="ui top attached header">
  3. <strong>{{.Team.Name}}</strong>
  4. <div class="ui right">
  5. {{if .Team.IsMember $.LoggedUser.ID}}
  6. <a class="ui red tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave?uid={{$.LoggedUser.ID}}&page=team">{{$.i18n.Tr "org.teams.leave"}}</a>
  7. {{else if .IsOrganizationOwner}}
  8. <a class="ui blue tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join?uid={{$.LoggedUser.ID}}&page=team">{{$.i18n.Tr "org.teams.join"}}</a>
  9. {{end}}
  10. </div>
  11. </h4>
  12. <div class="ui attached table segment detail">
  13. <div class="item">
  14. {{if .Team.Description}}
  15. {{.Team.Description}}
  16. {{else}}
  17. <span class="text grey italic">{{.i18n.Tr "org.teams.no_desc"}}</span>
  18. {{end}}
  19. </div>
  20. <div class="item">
  21. <a href="{{.OrgLink}}/teams/{{.Team.LowerName}}"><span class="octicon octicon-person"></span> <strong>{{.Team.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> ·
  22. <a href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories"><span class="octicon octicon-repo"></span> <strong>{{.Team.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a>
  23. </div>
  24. <div class="item">
  25. {{if eq .Team.LowerName "owners"}}
  26. {{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}}
  27. {{else if (eq .Team.Authorize 1)}}
  28. {{.i18n.Tr "org.teams.read_permission_desc" | Str2html}}
  29. {{else if (eq .Team.Authorize 2)}}
  30. {{.i18n.Tr "org.teams.write_permission_desc" | Str2html}}
  31. {{else if (eq .Team.Authorize 3)}}
  32. {{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}}
  33. {{end}}
  34. </div>
  35. </div>
  36. {{if .IsOrganizationOwner}}
  37. <div class="ui bottom attached segment">
  38. <a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/edit"><span class="octicon octicon-gear"></span> {{$.i18n.Tr "org.teams.settings"}}</a>
  39. </div>
  40. {{end}}
  41. </div>