members.tmpl 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {{template "base/head" .}}
  2. <div class="organization members">
  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 blue button" href="{{.OrgLink}}/invitations/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.invite_someone"}}</a>
  9. </div>
  10. <div class="ui divider"></div>
  11. {{end}}
  12. <div class="list">
  13. {{range .Members}}
  14. <div class="item ui grid">
  15. <div class="ui one wide column">
  16. <img class="ui avatar" src="{{.AvatarLink}}?s=48">
  17. </div>
  18. <div class="ui three wide column">
  19. <div class="meta"><a href="{{.HomeLink}}">{{.Name}}</a></div>
  20. <div class="meta">{{.FullName}}</div>
  21. </div>
  22. <div class="ui five wide column center">
  23. <div class="meta">
  24. {{$.i18n.Tr "org.members.membership_visibility"}}
  25. </div>
  26. <div class="meta">
  27. {{ $isPublic := .IsPublicMember $.Org.ID}}
  28. {{if $isPublic}}
  29. <strong>{{$.i18n.Tr "org.members.public"}}</strong>
  30. {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a href="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{$.i18n.Tr "org.members.public_helper"}}</a>){{end}}
  31. {{else}}
  32. <strong>{{$.i18n.Tr "org.members.private"}}</strong>
  33. {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a href="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{$.i18n.Tr "org.members.private_helper"}}</a>){{end}}
  34. {{end}}
  35. </div>
  36. </div>
  37. <div class="ui three wide column center">
  38. <div class="meta">
  39. {{$.i18n.Tr "org.members.member_role"}}
  40. </div>
  41. <div class="meta">
  42. <strong>{{if .IsUserOrgOwner $.Org.ID}}<span class="octicon octicon-shield"></span> {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}}</strong>
  43. </div>
  44. </div>
  45. <div class="ui four wide column">
  46. <div class="text right">
  47. {{if eq $.SignedUser.ID .ID}}
  48. <a class="ui red small button" href="{{$.OrgLink}}/members/action/leave?uid={{.ID}}">{{$.i18n.Tr "org.members.leave"}}</a>
  49. {{else if $.IsOrganizationOwner}}
  50. <a class="ui red small button" href="{{$.OrgLink}}/members/action/remove?uid={{.ID}}">{{$.i18n.Tr "org.members.remove"}}</a>
  51. {{end}}
  52. </div>
  53. </div>
  54. </div>
  55. {{end}}
  56. </div>
  57. </div>
  58. </div>
  59. {{template "base/footer" .}}