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.

53 lines
2.2 KiB

8 years ago
  1. <div class="ui container">
  2. <div class="ui secondary stackable menu">
  3. <div class="item">
  4. <div class="ui floating dropdown link jump">
  5. <span class="text">
  6. <img class="ui avatar image" src="{{.ContextUser.RelAvatarLink}}">
  7. {{.ContextUser.ShortName 20}}
  8. <i class="dropdown icon"></i>
  9. </span>
  10. <div class="context user overflow menu" tabindex="-1">
  11. <div class="ui header">
  12. {{.i18n.Tr "home.switch_dashboard_context"}}
  13. </div>
  14. <div class="items">
  15. <a class="{{if eq .ContextUser.ID .SignedUser.ID}}active selected{{end}} item" href="{{AppSubUrl}}/{{if .PageIsIssues}}issues{{else if .PageIsPulls}}pulls{{end}}">
  16. <img class="ui avatar image" src="{{.SignedUser.RelAvatarLink}}">
  17. {{.SignedUser.Name}}
  18. </a>
  19. {{range .Orgs}}
  20. <a class="{{if eq $.ContextUser.ID .ID}}active selected{{end}} item" href="{{AppSubUrl}}/org/{{.Name}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else}}dashboard{{end}}">
  21. <img class="ui avatar image" src="{{.RelAvatarLink}}">
  22. {{.ShortName 20}}
  23. </a>
  24. {{end}}
  25. </div>
  26. <a class="item" href="{{AppSubUrl}}/org/create">
  27. <i class="octicon octicon-plus"></i>&nbsp;&nbsp;&nbsp;{{.i18n.Tr "new_org"}}
  28. </a>
  29. </div>
  30. </div>
  31. </div>
  32. {{if .ContextUser.IsOrganization}}
  33. <div class="right stackable menu">
  34. <a class="{{if .PageIsNews}}active{{end}} item" style="margin-left: auto" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/dashboard">
  35. <i class="octicon octicon-rss"></i>&nbsp;{{.i18n.Tr "activities"}}
  36. </a>
  37. <a class="{{if .PageIsIssues}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/issues">
  38. <i class="octicon octicon-issue-opened"></i>&nbsp;{{.i18n.Tr "issues"}}
  39. </a>
  40. <a class="{{if .PageIsPulls}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/pulls">
  41. <i class="octicon octicon-git-pull-request"></i>&nbsp;{{.i18n.Tr "pull_requests"}}
  42. </a>
  43. <div class="item">
  44. <a class="ui blue basic button" href="{{.ContextUser.HomeLink}}">
  45. {{.i18n.Tr "home.view_home" (.ContextUser.ShortName 10)}}
  46. </a>
  47. </div>
  48. </div>
  49. {{end}}
  50. </div>
  51. </div>
  52. <div class="ui divider"></div>