dashboard.tmpl 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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="icon 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. <i class="octicon octicon-star"></i>{{.NumStars}}
  36. </span>
  37. </a>
  38. </li>
  39. {{end}}
  40. </ul>
  41. </div>
  42. {{if not .ContextUser.IsOrganization}}
  43. <h4 class="ui top attached header">
  44. {{.i18n.Tr "home.collaborative_repos"}} <span class="ui grey label">{{.CollaborateCount}}</span>
  45. </h4>
  46. <div class="ui attached table segment">
  47. <ul id="collaborative-repo-list">
  48. {{range .CollaborativeRepos}}
  49. <li {{if .IsPrivate}}class="private"{{end}}>
  50. <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">
  51. <i class="icon octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
  52. <span class="text truncate owner-and-repo">
  53. <span class="text truncate owner-name">{{.Owner.Name}}</span> / <strong>{{.Name}}</strong>
  54. </span>
  55. <span class="ui right text light grey">
  56. <i class="octicon octicon-star"></i>{{.NumStars}}
  57. </span>
  58. </a>
  59. </li>
  60. {{end}}
  61. </ul>
  62. </div>
  63. {{end}}
  64. </div>
  65. {{if not .ContextUser.IsOrganization}}
  66. <div class="ui tab list" data-tab="orgs">
  67. <h4 class="ui top attached header">
  68. {{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span>
  69. <div class="ui right">
  70. <a class="poping up" href="{{AppSubUrl}}/org/create" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center">
  71. <i class="plus icon"></i>
  72. <span class="sr-only">{{.i18n.Tr "new_org"}}</span>
  73. </a>
  74. </div>
  75. </h4>
  76. <div class="ui attached table segment">
  77. <ul class="repo-owner-name-list">
  78. {{range .ContextUser.Orgs}}
  79. <li>
  80. <a href="{{AppSubUrl}}/{{.Name}}">
  81. <i class="icon octicon octicon-organization"></i>
  82. <strong class="text truncate item-name">{{.Name}}</strong>
  83. <span class="ui right text light grey">
  84. <i class="octicon octicon-repo"></i>{{.NumRepos}}
  85. </span>
  86. </a>
  87. </li>
  88. {{end}}
  89. </ul>
  90. </div>
  91. </div>
  92. {{end}}
  93. <div class="ui tab list" data-tab="mirrors">
  94. <h4 class="ui top attached header">
  95. {{.i18n.Tr "home.my_mirrors"}} <span class="ui grey label">{{.MirrorCount}}</span>
  96. <div class="ui right">
  97. <a class="poping up" href="{{AppSubUrl}}/repo/migrate?mirror=1" data-content="{{.i18n.Tr "new_mirror"}}" data-variation="tiny inverted" data-position="left center">
  98. <i class="plus icon"></i>
  99. <span class="sr-only">{{.i18n.Tr "new_mirror"}}</span>
  100. </a>
  101. </div>
  102. </h4>
  103. <div class="ui attached table segment">
  104. <ul class="repo-owner-name-list">
  105. {{range .Mirrors}}
  106. <li {{if .IsPrivate}}class="private"{{end}}>
  107. <a href="{{AppSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}">
  108. <i class="icon octicon octicon-repo-clone"></i>
  109. <strong class="text truncate item-name">{{.Name}}</strong>
  110. <span class="ui right text light grey">
  111. <i class="octicon octicon-sync"></i>{{.Interval}}H
  112. </span>
  113. </a>
  114. </li>
  115. {{end}}
  116. </ul>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. {{template "base/footer" .}}