You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

131 lines
5.1 KiB

  1. {{template "base/head" .}}
  2. <div class="dashboard feeds">
  3. {{template "user/dashboard/navbar" .}}
  4. <div class="ui container">
  5. <div class="ui grid">
  6. <div class="ten wide column">
  7. {{template "user/dashboard/feeds" .}}
  8. </div>
  9. <div class="six wide column">
  10. <div class="ui {{if not .ContextUser.IsOrganization}}three{{else}}two{{end}} item tabable menu">
  11. <a class="item active" data-tab="repos">{{.i18n.Tr "repository"}}</a>
  12. {{if not .ContextUser.IsOrganization}}
  13. <a class="item" data-tab="orgs">{{.i18n.Tr "organization"}}</a>
  14. {{end}}
  15. <a class="item" data-tab="mirrors">{{.i18n.Tr "mirror"}}</a>
  16. </div>
  17. <div class="ui tab active list" data-tab="repos">
  18. <h4 class="ui top attached header">
  19. {{.i18n.Tr "home.my_repos"}} <span class="ui grey label">{{.ContextUser.NumRepos}}</span>
  20. <div class="ui right">
  21. <a class="poping up" href="{{AppSubUrl}}/repo/create" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center">
  22. <i class="plus icon"></i>
  23. <span class="sr-only">{{.i18n.Tr "new_repo"}}</span>
  24. </a>
  25. </div>
  26. </h4>
  27. <div class="ui attached table segment">
  28. <ul class="repo-owner-name-list">
  29. {{range .Repos}}
  30. <li {{if .IsPrivate}}class="private"{{end}}>
  31. <a href="{{AppSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}">
  32. <i class="octicon octicon-{{if .IsFork}}repo-forked{{else if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
  33. <strong class="text truncate item-name">{{.Name}}</strong>
  34. <span class="ui right text light grey">
  35. {{.NumStars}} <i class="octicon octicon-star rear"></i>
  36. </span>
  37. </a>
  38. </li>
  39. {{end}}
  40. {{if gt .ContextUser.NumRepos .MaxShowRepoNum}}
  41. <li>
  42. <a href="{{.ContextUser.HomeLink}}">{{.i18n.Tr "home.show_more_repos"}}</a>
  43. </li>
  44. {{end}}
  45. </ul>
  46. </div>
  47. {{if not .ContextUser.IsOrganization}}
  48. <h4 class="ui top attached header">
  49. {{.i18n.Tr "home.collaborative_repos"}}
  50. </h4>
  51. <div class="ui attached table segment">
  52. <ul id="collaborative-repo-list">
  53. {{range .CollaborativeRepos}}
  54. <li {{if .IsPrivate}}class="private"{{end}}>
  55. <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">
  56. <i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
  57. <span class="text truncate owner-and-repo">
  58. <span class="text truncate owner-name">{{.Owner.Name}}</span> / <strong>{{.Name}}</strong>
  59. </span>
  60. <span class="ui right text light grey">
  61. {{.NumStars}} <i class="octicon octicon-star rear"></i>
  62. </span>
  63. </a>
  64. </li>
  65. {{end}}
  66. </ul>
  67. </div>
  68. {{end}}
  69. </div>
  70. {{if not .ContextUser.IsOrganization}}
  71. <div class="ui tab list" data-tab="orgs">
  72. <h4 class="ui top attached header">
  73. {{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span>
  74. <div class="ui right">
  75. <a class="poping up" href="{{AppSubUrl}}/org/create" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center">
  76. <i class="plus icon"></i>
  77. <span class="sr-only">{{.i18n.Tr "new_org"}}</span>
  78. </a>
  79. </div>
  80. </h4>
  81. <div class="ui attached table segment">
  82. <ul class="repo-owner-name-list">
  83. {{range .ContextUser.Orgs}}
  84. <li>
  85. <a href="{{AppSubUrl}}/{{.Name}}">
  86. <i class="octicon octicon-organization"></i>
  87. <strong class="text truncate item-name">{{.Name}}</strong>
  88. <span class="ui right text light grey">
  89. {{.NumRepos}} <i class="octicon octicon-repo rear"></i>
  90. </span>
  91. </a>
  92. </li>
  93. {{end}}
  94. </ul>
  95. </div>
  96. </div>
  97. {{end}}
  98. <div class="ui tab list" data-tab="mirrors">
  99. <h4 class="ui top attached header">
  100. {{.i18n.Tr "home.my_mirrors"}} <span class="ui grey label">{{.MirrorCount}}</span>
  101. <div class="ui right">
  102. <a class="poping up" href="{{AppSubUrl}}/repo/migrate?mirror=1" data-content="{{.i18n.Tr "new_mirror"}}" data-variation="tiny inverted" data-position="left center">
  103. <i class="plus icon"></i>
  104. <span class="sr-only">{{.i18n.Tr "new_mirror"}}</span>
  105. </a>
  106. </div>
  107. </h4>
  108. <div class="ui attached table segment">
  109. <ul class="repo-owner-name-list">
  110. {{range .Mirrors}}
  111. <li {{if .IsPrivate}}class="private"{{end}}>
  112. <a href="{{AppSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}">
  113. <i class="octicon octicon-repo-clone"></i>
  114. <strong class="text truncate item-name">{{.Name}}</strong>
  115. <span class="ui right text light grey">
  116. {{.Interval}}H <i class="octicon octicon-sync rear"></i>
  117. </span>
  118. </a>
  119. </li>
  120. {{end}}
  121. </ul>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. {{template "base/footer" .}}