home.tmpl 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {{template "base/head" .}}
  2. <div class="organization profile">
  3. <div class="ui container">
  4. <div class="ui grid">
  5. <div class="ui sixteen wide column">
  6. <img class="ui left" id="org-avatar" src="{{.Org.RelAvatarLink}}?s=140"/>
  7. <div id="org-info">
  8. <div class="ui header">
  9. {{.Org.DisplayName}}
  10. {{if .IsOrganizationOwner}}<a class="text grey" href="{{.OrgLink}}/settings"><span class="octicon octicon-gear"></span></a>{{end}}
  11. </div>
  12. {{if .Org.Description}}<p class="desc">{{.Org.Description}}</p>{{end}}
  13. <div class="text grey meta">
  14. {{if .Org.Location}}<div class="item"><span class="octicon octicon-location"></span> <span>{{.Org.Location}}</span></div>{{end}}
  15. {{if .Org.Website}}<div class="item"><span class="octicon octicon-link"></span> <a target="_blank" rel="noopener noreferrer" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="ui divider"></div>
  22. <div class="ui container">
  23. <div class="ui grid">
  24. <div class="ui eleven wide column">
  25. {{if .IsOrganizationOwner}}
  26. <div class="text right">
  27. <a class="ui green button" href="{{AppSubURL}}/repo/create?org={{.Org.ID}}"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a>
  28. </div>
  29. <div class="ui divider"></div>
  30. {{end}}
  31. {{template "explore/repo_list" .}}
  32. {{template "explore/page" .}}
  33. </div>
  34. <div class="ui five wide column">
  35. <div class="ui top attached header">
  36. <strong>{{.i18n.Tr "org.people"}}</strong>
  37. {{if .IsOrganizationMember}}
  38. <div class="ui right">
  39. <a class="text grey" href="{{.OrgLink}}/members">{{.Org.NumMembers}} <span class="octicon octicon-chevron-right"></span></a>
  40. </div>
  41. {{end}}
  42. </div>
  43. <div class="ui attached segment members">
  44. {{$isMember := .IsOrganizationMember}}
  45. {{range .Members}}
  46. {{if or $isMember (.IsPublicMember $.Org.ID)}}
  47. <a href="{{.HomeLink}}" title="{{.Name}}{{if .FullName}} ({{.FullName}}){{end}}"><img class="ui avatar" src="{{.RelAvatarLink}}"></a>
  48. {{end}}
  49. {{end}}
  50. </div>
  51. {{if .IsOrganizationOwner}}
  52. <div class="ui bottom attached segment">
  53. <a class="ui blue small button" href="{{.OrgLink}}/invitations/new">{{.i18n.Tr "org.invite_someone"}}</a>
  54. </div>
  55. {{end}}
  56. {{if .IsOrganizationMember}}
  57. <div class="ui top attached header">
  58. <strong>{{.i18n.Tr "org.teams"}}</strong>
  59. <div class="ui right">
  60. <a class="text grey" href="{{.OrgLink}}/teams"><span>{{.Org.NumTeams}}</span> <span class="octicon octicon-chevron-right"></span></a>
  61. </div>
  62. </div>
  63. <div class="ui attached table segment teams">
  64. {{range .Teams}}
  65. <div class="item">
  66. <a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a>
  67. <p class="text grey">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
  68. </div>
  69. {{end}}
  70. </div>
  71. {{if .IsOrganizationOwner}}
  72. <div class="ui bottom attached segment">
  73. <a class="ui blue small button" href="{{.OrgLink}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a>
  74. </div>
  75. {{end}}
  76. {{end}}
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. {{template "base/footer" .}}