gitea源码

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <overflow-menu class="ui secondary pointing tabular borderless menu">
  2. <div class="overflow-menu-items">
  3. {{if and .HasUserProfileReadme .ContextUser.IsIndividual}}
  4. <a class="{{if eq .TabName "overview"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=overview">
  5. {{svg "octicon-info"}} {{ctx.Locale.Tr "user.overview"}}
  6. </a>
  7. {{end}}
  8. <a class="{{if eq .TabName "repositories"}}active {{end}} item" href="{{.ContextUser.HomeLink}}?tab=repositories">
  9. {{svg "octicon-repo"}} {{ctx.Locale.Tr "user.repositories"}}
  10. {{if .RepoCount}}
  11. <div class="ui small label">{{.RepoCount}}</div>
  12. {{end}}
  13. </a>
  14. {{if or .ContextUser.IsIndividual .CanReadProjects}}
  15. <a href="{{.ContextUser.HomeLink}}/-/projects" class="{{if .PageIsViewProjects}}active {{end}}item">
  16. {{svg "octicon-project-symlink"}} {{ctx.Locale.Tr "user.projects"}}
  17. {{if .ProjectCount}}
  18. <div class="ui small label">{{.ProjectCount}}</div>
  19. {{end}}
  20. </a>
  21. {{end}}
  22. {{if and .IsPackageEnabled (or .ContextUser.IsIndividual .CanReadPackages)}}
  23. <a href="{{.ContextUser.HomeLink}}/-/packages" class="{{if .IsPackagesPage}}active {{end}}item">
  24. {{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
  25. </a>
  26. {{end}}
  27. {{if and .IsRepoIndexerEnabled (or .ContextUser.IsIndividual .CanReadCode)}}
  28. <a href="{{.ContextUser.HomeLink}}/-/code" class="{{if .IsCodePage}}active {{end}}item">
  29. {{svg "octicon-code"}} {{ctx.Locale.Tr "user.code"}}
  30. </a>
  31. {{end}}
  32. {{if .ContextUser.IsIndividual}}
  33. <a class="{{if eq .TabName "activity"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=activity">
  34. {{svg "octicon-rss"}} {{ctx.Locale.Tr "user.activity"}}
  35. </a>
  36. {{if not .DisableStars}}
  37. <a class="{{if eq .TabName "stars"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=stars">
  38. {{svg "octicon-star"}} {{ctx.Locale.Tr "user.starred"}}
  39. {{if .ContextUser.NumStars}}
  40. <div class="ui small label">{{.ContextUser.NumStars}}</div>
  41. {{end}}
  42. </a>
  43. {{else}}
  44. <a class="{{if eq .TabName "watching"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=watching">
  45. {{svg "octicon-eye"}} {{ctx.Locale.Tr "user.watched"}}
  46. </a>
  47. {{end}}
  48. {{end}}
  49. </div>
  50. </overflow-menu>