dashboard.tmpl 4.7 KB

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