dashboard.tmpl 5.3 KB

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