dashboard.tmpl 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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>
  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>{{.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>
  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. {{.Owner.Name}} / <strong>{{.Name}}</strong>
  50. <span class="ui right text light grey">
  51. <i class="octicon octicon-star"></i>{{.NumStars}}
  52. </span>
  53. </a>
  54. </li>
  55. {{end}}
  56. </ul>
  57. </div>
  58. {{end}}
  59. </div>
  60. {{if not .ContextUser.IsOrganization}}
  61. <div class="ui tab list" data-tab="orgs">
  62. <h4 class="ui top attached header">
  63. {{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span>
  64. <div class="ui right">
  65. <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>
  66. </div>
  67. </h4>
  68. <div class="ui attached table segment">
  69. <ul>
  70. {{range .ContextUser.Orgs}}
  71. <li>
  72. <a href="{{AppSubUrl}}/{{.Name}}">
  73. <i class="icon octicon octicon-organization"></i>
  74. <strong>{{.ShortName 20}}</strong>
  75. <span class="ui right text light grey">
  76. <i class="octicon octicon-repo"></i>{{.NumRepos}}
  77. </span>
  78. </a>
  79. </li>
  80. {{end}}
  81. </ul>
  82. </div>
  83. </div>
  84. {{end}}
  85. <div class="ui tab list" data-tab="mirrors">
  86. <h4 class="ui top attached header">
  87. {{.i18n.Tr "home.my_mirrors"}} <span class="ui grey label">{{.MirrorCount}}</span>
  88. <div class="ui right">
  89. <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>
  90. </div>
  91. </h4>
  92. <div class="ui attached table segment">
  93. <ul>
  94. {{range .Mirrors}}
  95. <li {{if .IsPrivate}}class="private"{{end}}>
  96. <a href="{{AppSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}">
  97. <i class="icon octicon octicon-repo-clone"></i>
  98. <strong>{{.Name}}</strong>
  99. <span class="ui right text light grey">
  100. <i class="octicon octicon-sync"></i>{{.Interval}}H
  101. </span>
  102. </a>
  103. </li>
  104. {{end}}
  105. </ul>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. {{template "base/footer" .}}