sidebar.tmpl 2.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. <div class="grid-1-3 panel panel-radius left" id="org-team-card">
  2. <div class="panel-header">
  3. {{if .Team.IsMember $.SignedUser.Id}}
  4. <a class="btn btn-small btn-red btn-header btn-radius right" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave?uid={{$.SignedUser.Id}}&page=team">{{$.i18n.Tr "org.teams.leave"}}</a>
  5. {{else if .IsOrganizationOwner}}
  6. <a class="btn btn-small btn-blue btn-header btn-radius right" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join?uid={{$.SignedUser.Id}}&page=team">{{$.i18n.Tr "org.teams.join"}}</a>
  7. {{end}}
  8. <strong>{{.Team.Name}}</strong>
  9. </div>
  10. <div class="panel-body">
  11. <p class="desc">{{if .Team.Description}}{{.Team.Description}}{{else}}{{.i18n.Tr "org.teams.no_desc"}}{{end}}</p>
  12. <hr>
  13. <div class="team-stats">
  14. <a href="{{.OrgLink}}/teams/{{.Team.LowerName}}"><span class="octicon octicon-person"></span> <strong>{{.Team.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> ·
  15. <a href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories"><span class="octicon octicon-repo"></span> <strong>{{.Team.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a>
  16. </div>
  17. <p class="desc">
  18. {{if eq .Team.LowerName "owners"}}
  19. {{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}}
  20. {{else if (eq .Team.Authorize 1)}}
  21. {{.i18n.Tr "org.teams.read_permission_desc" | Str2html}}
  22. {{else if (eq .Team.Authorize 2)}}
  23. {{.i18n.Tr "org.teams.write_permission_desc" | Str2html}}
  24. {{else if (eq .Team.Authorize 3)}}
  25. {{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}}
  26. {{end}}
  27. </p>
  28. </div>
  29. {{if .IsOrganizationOwner}}
  30. <div class="panel-footer">
  31. <a class="btn btn-medium btn-green btn-link btn-radius" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/edit"><span class="octicon octicon-gear"></span> {{$.i18n.Tr "org.teams.settings"}}</a>
  32. </div>
  33. {{end}}
  34. </div>