dashboard.tmpl 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. <div id="dashboard-news" class="left grid-2-3">
  7. {{range .Feeds}}
  8. <div class="news clear">
  9. <div class="avatar left">
  10. <img class="avatar-30" src="{{AvatarLink .GetActEmail}}" alt="">
  11. </div>
  12. <div class="content left {{if eq .GetOpType 5}}push-news{{end}}">
  13. <p class="text-bold">
  14. <a href="/{{.GetActUserName}}">{{.GetActUserName}}</a>
  15. {{if eq .GetOpType 1}}
  16. {{$.i18n.Tr "action.create_repo" .GetRepoLink .GetRepoLink | Str2html}}
  17. {{else if eq .GetOpType 5}}
  18. {{$.i18n.Tr "action.commit_repo" .GetRepoLink .GetBranch .GetBranch .GetRepoLink .GetRepoLink | Str2html}}
  19. {{else if eq .GetOpType 6}}
  20. {{ $index := index .GetIssueInfos 0}}
  21. {{$.i18n.Tr "action.create_issue" .GetRepoLink $index .GetRepoLink $index | Str2html}}
  22. {{else if eq .GetOpType 10}}
  23. {{ $index := index .GetIssueInfos 0}}
  24. {{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .GetRepoLink $index | Str2html}}
  25. {{end}}
  26. </p>
  27. {{if eq .GetOpType 5}}
  28. <div class="news-content content">
  29. <ul class="list-no-style">
  30. {{ $push := ActionContent2Commits .}}
  31. {{ $repoLink := .GetRepoLink}}
  32. {{range $push.Commits}}
  33. <li><img src="{{AvatarLink .AuthorEmail}}?s=16"> <a href="/{{$repoLink}}/commit/{{.Sha1}}">{{ShortSha .Sha1}}</a> {{.Message}}</li>
  34. {{end}}
  35. </ul>
  36. </div>
  37. {{else if eq .GetOpType 6}}
  38. <p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
  39. {{else if eq .GetOpType 10}}
  40. <p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
  41. {{end}}
  42. <p class="news-time text-italic">{{TimeSince .GetCreate $.i18n.Lang}}</p>
  43. </div>
  44. <i class="mega-octicon octicon-{{ActionIcon .GetOpType}} right"></i>
  45. </div>
  46. {{end}}
  47. </div>
  48. <div id="dashboard-sidebar" class="right grid-1-3">
  49. <ul id="dashboard-sidebar-menu" class="menu menu-line">
  50. <li class="js-tab-nav js-tab-nav-show first" data-tab-target="#dashboard-my-repo"><a href="#">{{.i18n.Tr "repository"}}</a></li>
  51. <li class="js-tab-nav" data-tab-target="#dashboard-my-org"><a href="#">{{.i18n.Tr "organization"}}</a></li>
  52. <li class="js-tab-nav last" data-tab-target="#dashboard-my-mirror"><a href="#">{{.i18n.Tr "mirror"}}</a></li>
  53. <li class="drop right">
  54. <button class="btn btn-green text-bold" id="dashboard-new-repo">
  55. <i class="octicon octicon-plus"></i>
  56. </button>
  57. <ul class="menu menu-vertical drop-down" id="dashboard-new-repo-menu">
  58. <li><a href="/repo/create"><i class="octicon octicon-repo-create"></i>{{.i18n.Tr "new_repo"}}</a></li>
  59. <li><a href="/org/create"><i class="octicon octicon-organization"></i>{{.i18n.Tr "new_org"}}</a></li>
  60. </ul>
  61. </li>
  62. </ul>
  63. <div class="panel" id="dashboard-my-repo">
  64. <div class="panel-header">
  65. <h4 class="left">{{.i18n.Tr "home.my_repos"}}
  66. <span class="repo-count label label-gray label-radius">{{.ContextUser.NumRepos}}</span>
  67. </h4>
  68. &nbsp;
  69. </div>
  70. <div class="panel-body">
  71. <ul class="list-no-style">
  72. {{range .Repos}}
  73. {{template "user/dashboard/repo_list" .}}
  74. {{end}}
  75. </ul>
  76. </div>
  77. <div class="panel-header repo-contrib-header">
  78. <h4 class="text-bold">{{.i18n.Tr "home.collaborative_repos"}}</h4>
  79. </div>
  80. <div class="panel-body">
  81. <ul class="list-no-style">
  82. {{range .CollaborativeRepos}}
  83. {{template "user/dashboard/repo_list" .}}
  84. {{end}}
  85. </ul>
  86. </div>
  87. </div>
  88. <div class="panel" id="dashboard-my-org">
  89. <div class="panel-header">
  90. <h4 class="text-bold">{{.i18n.Tr "home.my_orgs"}}</h4>
  91. </div>
  92. </div>
  93. <div class="panel" id="dashboard-my-mirror">
  94. <div class="panel-header">
  95. <h4 class="text-bold">{{.i18n.Tr "home.my_mirrors"}}</h4>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. {{template "ng/base/footer" .}}