dashboard.tmpl 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. {{template "user/dashboard/nav" .}}
  4. <div id="dashboard-wrapper">
  5. <div id="dashboard" class="container">
  6. {{template "ng/base/alert" .}}
  7. <div id="dashboard-news" class="left grid-2-3">
  8. {{template "user/dashboard/feeds" .}}
  9. </div>
  10. <div class="right grid-1-3" id="dashboard-sidebar">
  11. <ul id="dashboard-sidebar-menu" class="menu menu-line">
  12. <li class="js-tab-nav js-tab-nav-show first" data-tab-target="#dashboard-my-repo"><a href="#">{{.i18n.Tr "repository"}}</a></li>
  13. {{if not .ContextUser.IsOrganization}}
  14. <li class="js-tab-nav" data-tab-target="#dashboard-my-org"><a href="#">{{.i18n.Tr "organization"}}</a></li>
  15. {{end}}
  16. <li class="js-tab-nav last" data-tab-target="#dashboard-my-mirror"><a href="#">{{.i18n.Tr "mirror"}}</a></li>
  17. <li class="drop right">
  18. <button class="btn btn-green text-bold" id="dashboard-new-repo">
  19. <i class="octicon octicon-plus"></i>
  20. </button>
  21. <ul class="menu menu-vertical drop-down" id="dashboard-new-repo-menu">
  22. <li><a href="{{AppSubUrl}}/repo/create"><i class="octicon octicon-repo-create"></i>{{.i18n.Tr "new_repo"}}</a></li>
  23. <li><a href="{{AppSubUrl}}/repo/migrate"><i class="octicon octicon-repo-clone"></i>{{.i18n.Tr "new_migrate"}}</a></li>
  24. <li><a href="{{AppSubUrl}}/org/create"><i class="octicon octicon-organization"></i>{{.i18n.Tr "new_org"}}</a></li>
  25. </ul>
  26. </li>
  27. </ul>
  28. <div class="panel" id="dashboard-my-repo">
  29. <div class="panel-header">
  30. <h4 class="left">{{.i18n.Tr "home.my_repos"}}
  31. <span class="repo-count label label-gray label-radius">{{.ContextUser.NumRepos}}</span>
  32. </h4>
  33. &nbsp;
  34. </div>
  35. <div class="panel-body">
  36. <ul class="list-no-style">
  37. {{range .Repos}}
  38. <li {{if .IsPrivate}}class="private"{{end}}>
  39. <a href="{{AppSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}">
  40. <i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
  41. <span class="repo-name">
  42. <strong class="repo">{{.Name}}</strong>
  43. </span>
  44. <span class="right repo-star">
  45. <i class="octicon octicon-star"></i>{{.NumStars}}
  46. </span>
  47. </a>
  48. </li>
  49. {{end}}
  50. </ul>
  51. </div>
  52. {{if not .ContextUser.IsOrganization}}
  53. <div class="panel-header repo-contrib-header">
  54. <h4 class="text-bold">{{.i18n.Tr "home.collaborative_repos"}}
  55. <span class="repo-count label label-gray label-radius">{{.CollaborateCount}}</span>
  56. </h4>
  57. </div>
  58. <div class="panel-body">
  59. <ul class="list-no-style">
  60. {{range .CollaborativeRepos}}
  61. <li {{if .IsPrivate}}class="private"{{end}}>
  62. <a href="{{.Owner.Name}}/{{.Name}}">
  63. <i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
  64. <span class="repo-name">
  65. <span class="repo-name-prefix">{{.Owner.Name}} / </span>
  66. <strong class="repo">{{.Name}}</strong>
  67. </span>
  68. <span class="right repo-star">
  69. <i class="octicon octicon-star"></i>{{.NumStars}}
  70. </span>
  71. </a>
  72. </li>
  73. {{end}}
  74. </ul>
  75. </div>
  76. {{end}}
  77. </div>
  78. {{if not .ContextUser.IsOrganization}}
  79. <div class="panel" id="dashboard-my-org">
  80. <div class="panel-header">
  81. <h4 class="text-bold">{{.i18n.Tr "home.my_orgs"}}
  82. <span class="repo-count label label-gray label-radius">{{.ContextUser.GetOrganizationCount}}</span>
  83. </h4>
  84. </div>
  85. <div class="panel-body">
  86. <ul class="list-no-style">
  87. {{range .ContextUser.Orgs}}
  88. <li>
  89. <a href="{{AppSubUrl}}/{{.Name}}">
  90. <i class="octicon octicon-organization"></i>
  91. <span class="repo-name">
  92. <strong class="repo">{{.Name}}</strong>
  93. </span>
  94. <span class="right repo-star">
  95. <i class="octicon octicon-repo"></i>{{.NumRepos}}
  96. </span>
  97. </a>
  98. </li>
  99. {{end}}
  100. </ul>
  101. </div>
  102. </div>
  103. {{end}}
  104. <div class="panel" id="dashboard-my-mirror">
  105. <div class="panel-header">
  106. <h4 class="text-bold">{{.i18n.Tr "home.my_mirrors"}}
  107. <span class="repo-count label label-gray label-radius">{{.MirrorCount}}</span>
  108. </h4>
  109. </div>
  110. <div class="panel-body">
  111. <ul class="list-no-style">
  112. {{range .Mirrors}}
  113. <li {{if .IsPrivate}}class="private"{{end}}>
  114. <a href="{{AppSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}">
  115. <i class="octicon octicon-repo-clone"></i>
  116. <span class="repo-name">
  117. <strong class="repo">{{.Name}}</strong>
  118. </span>
  119. <span class="right repo-star">
  120. <i class="octicon octicon-sync"></i>{{.Interval}}H
  121. </span>
  122. </a>
  123. </li>
  124. {{end}}
  125. </ul>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. {{template "ng/base/footer" .}}