gitea源码

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <div class="flex-container-nav">
  2. <div class="ui fluid vertical menu">
  3. <div class="header item">{{ctx.Locale.Tr "repo.settings"}}</div>
  4. <a class="{{if .PageIsSettingsOptions}}active {{end}}item" href="{{.RepoLink}}/settings">
  5. {{ctx.Locale.Tr "repo.settings.options"}}
  6. </a>
  7. {{if or .Repository.IsPrivate .Permission.HasAnyUnitPublicAccess}}
  8. <a class="{{if .PageIsSettingsPublicAccess}}active {{end}}item" href="{{.RepoLink}}/settings/public_access">
  9. {{ctx.Locale.Tr "repo.settings.public_access"}}
  10. </a>
  11. {{end}}
  12. <a class="{{if .PageIsSettingsCollaboration}}active {{end}}item" href="{{.RepoLink}}/settings/collaboration">
  13. {{ctx.Locale.Tr "repo.settings.collaboration"}}
  14. </a>
  15. {{if not DisableWebhooks}}
  16. <a class="{{if .PageIsSettingsHooks}}active {{end}}item" href="{{.RepoLink}}/settings/hooks">
  17. {{ctx.Locale.Tr "repo.settings.hooks"}}
  18. </a>
  19. {{end}}
  20. {{if .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeCode}}
  21. <a class="{{if .PageIsSettingsBranches}}active {{end}}item" href="{{.RepoLink}}/settings/branches">
  22. {{ctx.Locale.Tr "repo.settings.branches"}}
  23. </a>
  24. <a class="{{if .PageIsSettingsTags}}active {{end}}item" href="{{.RepoLink}}/settings/tags">
  25. {{ctx.Locale.Tr "repo.settings.tags"}}
  26. </a>
  27. {{if .SignedUser.CanEditGitHook}}
  28. <a class="{{if .PageIsSettingsGitHooks}}active {{end}}item" href="{{.RepoLink}}/settings/hooks/git">
  29. {{ctx.Locale.Tr "repo.settings.githooks"}}
  30. </a>
  31. {{end}}
  32. <a class="{{if .PageIsSettingsKeys}}active {{end}}item" href="{{.RepoLink}}/settings/keys">
  33. {{ctx.Locale.Tr "repo.settings.deploy_keys"}}
  34. </a>
  35. {{if .LFSStartServer}}
  36. <a class="{{if .PageIsSettingsLFS}}active {{end}}item" href="{{.RepoLink}}/settings/lfs">
  37. {{ctx.Locale.Tr "repo.settings.lfs"}}
  38. </a>
  39. {{end}}
  40. {{end}}
  41. {{if and .EnableActions (.Permission.CanRead ctx.Consts.RepoUnitTypeActions)}}
  42. <details class="item toggleable-item" {{if or .PageIsSharedSettingsRunners .PageIsSharedSettingsSecrets .PageIsSharedSettingsVariables}}open{{end}}>
  43. <summary>{{ctx.Locale.Tr "actions.actions"}}</summary>
  44. <div class="menu">
  45. <a class="{{if .PageIsSharedSettingsRunners}}active {{end}}item" href="{{.RepoLink}}/settings/actions/runners">
  46. {{ctx.Locale.Tr "actions.runners"}}
  47. </a>
  48. <a class="{{if .PageIsSharedSettingsSecrets}}active {{end}}item" href="{{.RepoLink}}/settings/actions/secrets">
  49. {{ctx.Locale.Tr "secrets.secrets"}}
  50. </a>
  51. <a class="{{if .PageIsSharedSettingsVariables}}active {{end}}item" href="{{.RepoLink}}/settings/actions/variables">
  52. {{ctx.Locale.Tr "actions.variables"}}
  53. </a>
  54. </div>
  55. </details>
  56. {{end}}
  57. </div>
  58. </div>