You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
2.5 KiB

  1. <div id="dashboard-header">
  2. <ul class="menu menu-line container">
  3. <li id="dashboard-selection-menu" class="down drop">
  4. <a href="#" class="text-bold radius">
  5. <img class="avatar-30" src="{{.ContextUser.AvatarLink}}" alt="user-avatar" />
  6. {{.ContextUser.Name}}
  7. </a>
  8. <div class="drop-down panel panel-radius">
  9. <p class="panel-header"><strong>{{.i18n.Tr "home.switch_dashboard_context"}}</strong></p>
  10. <ul class="menu menu-vertical switching-list" id="dashboard-switch-menu">
  11. <li class="org {{if eq .ContextUser.Id .SignedUser.Id}}checked{{end}}">
  12. <a href="{{AppSubUrl}}/">
  13. <i class="octicon octicon-check"></i>
  14. <img class="avatar-24" src="{{.SignedUser.AvatarLink}}" alt="user-avatar" />
  15. {{.SignedUser.Name}}
  16. </a>
  17. </li>
  18. {{range .Orgs}}
  19. <li class="org {{if eq $.ContextUser.Id .Id}}checked{{end}}">
  20. <a href="{{.DashboardLink}}">
  21. <i class="octicon octicon-check"></i>
  22. <img class="avatar-24" src="{{.AvatarLink}}" alt="user-avatar" />
  23. {{.Name}}
  24. </a>
  25. </li>
  26. {{end}}
  27. <!-- <li>
  28. <a href="{{AppSubUrl}}/user/settings/orgs"><i class="octicon octicon-organization"></i>{{.i18n.Tr "manage_org"}}</a>
  29. </li> -->
  30. <li>
  31. <a href="{{AppSubUrl}}/org/create"><i class="octicon octicon-plus"></i>{{.i18n.Tr "new_org"}}</a>
  32. </li>
  33. </ul>
  34. </div>
  35. </li>
  36. <li class="right">
  37. <a {{if $.PageIsIssues}}class="current"{{end}} href="{{AppSubUrl}}/{{if .ContextUser.IsOrganization}}org/{{.ContextUser.Name}}/{{end}}issues"><i class="octicon octicon-issue-opened"></i>{{.i18n.Tr "issues"}}</a>
  38. </li>
  39. <!-- <li class="right">
  40. <a {{if .PageIsPulls}}class="current"{{end}} href="{{.ContextUser.DashboardLink}}pulls"><i class="octicon octicon-git-pull-request"></i>{{.i18n.Tr "pull_requests"}}</a>
  41. </li> -->
  42. <li class="right">
  43. <a {{if $.PageIsNews}}class="current"{{end}} href="{{.ContextUser.DashboardLink}}"><i class="octicon octicon-rss"></i>{{.i18n.Tr "news_feed"}}</a>
  44. </li>
  45. </ul>
  46. </div>