navbar.tmpl 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.RelAvatarLink}}">
  5. {{.ContextUser.ShortName 20}}
  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}}/{{if .PageIsIssues}}issues{{else if .PageIsPulls}}pulls{{end}}">
  14. <img class="ui avatar image" src="{{.SignedUser.RelAvatarLink}}">
  15. {{.SignedUser.Name}}
  16. </a>
  17. {{range .Orgs}}
  18. <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}}">
  19. <img class="ui avatar image" src="{{.RelAvatarLink}}">
  20. {{.ShortName 20}}
  21. </a>
  22. {{end}}
  23. </div>
  24. <a class="item" href="{{AppSubUrl}}/org/create">
  25. <i class="octicon octicon-plus"></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 "activities"}}
  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. <a class="{{if .PageIsPulls}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/pulls">
  39. <i class="octicon octicon-git-pull-request"></i>&nbsp;{{.i18n.Tr "pull_requests"}}
  40. </a>
  41. <div class="right menu">
  42. <div class="item">
  43. <a class="ui blue basic button" href="{{.ContextUser.HomeLink}}">
  44. {{.i18n.Tr "home.view_home" (.ContextUser.ShortName 10)}}
  45. </a>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. {{end}}
  51. </div>
  52. <div class="ui divider"></div>