home.tmpl 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div class="org-header" id="org-home-header">
  4. <div class="container clear">
  5. <img class="avatar-100 left" src="{{.Org.AvatarLink}}?s=140"/>
  6. <div id="org-home-header-info">
  7. <h2>
  8. {{.Org.FullName}}
  9. {{if .IsOrganizationOwner}}<a class="text-grey" href="{{.OrgLink}}/settings"><span class="octicon octicon-gear"></span></a>{{end}}
  10. </h2>
  11. {{if .Org.Description}}<p>{{.Org.Description}}</p>{{end}}
  12. <ul class="text-grey">
  13. {{if .Org.Location}}<li><span class="octicon octicon-location"></span> <span>{{.Org.Location}}</span></li>{{end}}
  14. {{if .Org.Website}}<li><span class="octicon octicon-link"></span> <a target="_blank" href="{{.Org.Website}}">{{.Org.Website}}</a></li>{{end}}
  15. {{if .Org.Email}}<li><span class="octicon octicon-mail"></span> <a href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></li>{{end}}
  16. </ul>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="container">
  21. {{$isMember := .Org.IsOrgMember $.SignedUser.Id}}
  22. <div id="org-home-repo-list" class="left grid-2-3">
  23. <div class="clear">
  24. {{if .IsOrganizationOwner}}
  25. <a class="btn btn-green btn-large btn-link btn-radius right" href="{{AppSubUrl}}/repo/create?org={{.Org.Id}}"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a>
  26. {{end}}
  27. </div>
  28. <div id="org-repo-list">
  29. {{range .Repos}}
  30. {{if or (not .IsPrivate) (.HasAccess $.SignedUser)}}
  31. <div class="org-repo-item">
  32. <ul class="org-repo-status right">
  33. <li><i class="octicon octicon-star"></i> {{.NumStars}}</li>
  34. <li><i class="octicon octicon-git-branch"></i> {{.NumForks}}</li>
  35. </ul>
  36. <h2><a href="{{AppSubUrl}}/{{$.Org.Name}}/{{.Name}}">{{.Name}}</a></h2>
  37. <p class="org-repo-description">{{.Description}}</p>
  38. <p class="org-repo-updated">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
  39. </div>
  40. {{end}}
  41. {{end}}
  42. </div>
  43. </div>
  44. <div class="grid-1-3 right">
  45. <div class="org-sidebar">
  46. <div class="panel panel-radius">
  47. <div class="panel-header">
  48. {{if $isMember}}
  49. <a class="text-grey right" href="{{AppSubUrl}}/org/{{.Org.LowerName}}/members"><strong>{{.Org.NumMembers}}</strong><span class="octicon octicon-chevron-right"></span></a>
  50. {{end}}
  51. <strong>{{.i18n.Tr "org.people"}}</strong>
  52. </div>
  53. <div class="panel-body member-avatar-group">
  54. {{range .Members}}
  55. {{if or $isMember (.IsPublicMember $.Org.Id)}}
  56. <a href="{{AppSubUrl}}/{{.Name}}" title="{{.Name}}"><img src="{{.AvatarLink}}"></a>
  57. {{end}}
  58. {{end}}
  59. </div>
  60. {{if .IsOrganizationOwner}}
  61. <div class="panel-footer">
  62. <a class="btn btn-medium btn-blue btn-link btn-radius" href="{{AppSubUrl}}/org/{{.Org.LowerName}}/invitations/new">{{.i18n.Tr "org.invite_someone"}}</a>
  63. </div>
  64. {{end}}
  65. </div>
  66. {{if $isMember}}
  67. <br>
  68. <div class="panel panel-radius">
  69. <div class="panel-header">
  70. <a class="text-grey right" href="{{AppSubUrl}}/org/{{.Org.LowerName}}/teams"><strong>{{.Org.NumTeams}}</strong><span class="octicon octicon-chevron-right"></span></a>
  71. <strong>{{.i18n.Tr "org.teams"}}</strong>
  72. </div>
  73. <div class="panel-body" id="org-home-team-list">
  74. <ul>
  75. {{range .Teams}}
  76. <li>
  77. <a class="text-black" href="{{AppSubUrl}}/org/{{$.Org.LowerName}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a>
  78. <p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
  79. </li>
  80. {{end}}
  81. </ul>
  82. </div>
  83. {{if .IsOrganizationOwner}}
  84. <div class="panel-footer">
  85. <a class="btn btn-medium btn-blue btn-link btn-radius" href="{{AppSubUrl}}/org/{{$.Org.LowerName}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a>
  86. </div>
  87. {{end}}
  88. </div>
  89. {{end}}
  90. </div>
  91. </div>
  92. </div>
  93. {{template "ng/base/footer" .}}