navbar.tmpl 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <div class="ui container">
  2. <div class="ui floating dropdown link jump">
  3. <span class="text">
  4. <img class="ui avatar image" src="{{.ContextUser.AvatarLink}}">
  5. {{.ContextUser.Name}}
  6. <i class="dropdown icon"></i>
  7. </span>
  8. <div class="context user overflow menu" tabindex="-1">
  9. <div class="ui header">
  10. {{.i18n.Tr "home.switch_dashboard_context"}}
  11. </div>
  12. <div class="items">
  13. <a class="{{if eq .ContextUser.Id .SignedUser.Id}}active selected{{end}} item" href="{{AppSubUrl}}/issues">
  14. <img class="ui avatar image" src="{{.SignedUser.AvatarLink}}">
  15. {{.SignedUser.Name}}
  16. </a>
  17. {{range .Orgs}}
  18. <a class="{{if eq $.ContextUser.Id .Id}}active selected{{end}} item" href="{{AppSubUrl}}/org/{{.Name}}/issues">
  19. <img class="ui avatar image" src="{{.AvatarLink}}">
  20. {{.Name}}
  21. </a>
  22. {{end}}
  23. </div>
  24. <a class="item" href="{{AppSubUrl}}/org/create">
  25. <i class="octicon octicon-repo-create"></i>&nbsp;&nbsp;&nbsp;{{.i18n.Tr "new_org"}}
  26. </a>
  27. </div>
  28. </div>
  29. {{if .ContextUser.IsOrganization}}
  30. <div class="ui right">
  31. <div class="ui secondary head menu">
  32. <a class="{{if .PageIsNews}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/dashboard">
  33. <i class="octicon octicon-rss"></i>&nbsp;{{.i18n.Tr "news_feed"}}
  34. </a>
  35. <a class="{{if .PageIsIssues}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/issues">
  36. <i class="octicon octicon-issue-opened"></i>&nbsp;{{.i18n.Tr "issues"}}
  37. </a>
  38. <div class="right menu">
  39. <div class="item">
  40. <a class="ui blue basic button" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}">
  41. {{.i18n.Tr "home.view_home" .ContextUser.Name}}
  42. </a>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. {{end}}
  48. </div>
  49. <div class="ui divider"></div>