Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2157,6 +2157,7 @@ contributors.contribution_type.deletions = Deletions
settings = Settings
settings.desc = Settings is where you can manage the settings for the repository.
settings.options = Repository
settings.access_management = Access Management
settings.public_access = Public Access
settings.public_access_desc = Configure public visitor's access permissions to override the defaults of this repository.
settings.public_access.docs.not_set = Not Set: no extra public access permission. The visitor's permission follows the repository's visibility and member permissions.
Expand Down
10 changes: 5 additions & 5 deletions routers/web/repo/setting/lfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import (
)

const (
tplSettingsLFS templates.TplName = "repo/settings/lfs"
tplSettingsLFSLocks templates.TplName = "repo/settings/lfs_locks"
tplSettingsLFSFile templates.TplName = "repo/settings/lfs_file"
tplSettingsLFSFileFind templates.TplName = "repo/settings/lfs_file_find"
tplSettingsLFSPointers templates.TplName = "repo/settings/lfs_pointers"
tplSettingsLFS templates.TplName = "repo/settings/lfs/lfs"
tplSettingsLFSLocks templates.TplName = "repo/settings/lfs/lfs_locks"
tplSettingsLFSFile templates.TplName = "repo/settings/lfs/lfs_file"
tplSettingsLFSFileFind templates.TplName = "repo/settings/lfs/lfs_file_find"
tplSettingsLFSPointers templates.TplName = "repo/settings/lfs/lfs_pointers"
)

// LFSFiles shows a repository's LFS files
Expand Down
2 changes: 1 addition & 1 deletion routers/web/repo/setting/public_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"code.gitea.io/gitea/services/context"
)

const tplRepoSettingsPublicAccess templates.TplName = "repo/settings/public_access"
const tplRepoSettingsPublicAccess templates.TplName = "repo/settings/access/public_access"

func parsePublicAccessMode(permission string, allowed []string) (ret struct {
AnonymousAccessMode, EveryoneAccessMode perm.AccessMode
Expand Down
2 changes: 1 addition & 1 deletion routers/web/repo/setting/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

const (
// TODO: Separate secrets from runners when layout is ready
tplRepoSecrets templates.TplName = "repo/settings/actions"
tplRepoSecrets templates.TplName = "repo/settings/actions/actions"
tplOrgSecrets templates.TplName = "org/settings/actions"
tplUserSecrets templates.TplName = "user/settings/actions"
)
Expand Down
4 changes: 2 additions & 2 deletions routers/web/repo/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ import (

const (
tplSettingsOptions templates.TplName = "repo/settings/options"
tplCollaboration templates.TplName = "repo/settings/collaboration"
tplCollaboration templates.TplName = "repo/settings/access/collaboration"
tplBranches templates.TplName = "repo/settings/branches"
tplGithooks templates.TplName = "repo/settings/githooks"
tplGithookEdit templates.TplName = "repo/settings/githook_edit"
tplDeployKeys templates.TplName = "repo/settings/deploy_keys"
tplDeployKeys templates.TplName = "repo/settings/access/deploy_keys"
)

// SettingsCtxData is a middleware that sets all the general context data for the
Expand Down
4 changes: 2 additions & 2 deletions routers/web/shared/actions/runners.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (

const (
// TODO: Separate secrets from runners when layout is ready
tplRepoRunners templates.TplName = "repo/settings/actions"
tplRepoRunners templates.TplName = "repo/settings/actions/actions"
tplOrgRunners templates.TplName = "org/settings/actions"
tplAdminRunners templates.TplName = "admin/actions"
tplUserRunners templates.TplName = "user/settings/actions"
tplRepoRunnerEdit templates.TplName = "repo/settings/runner_edit"
tplRepoRunnerEdit templates.TplName = "repo/settings/actions/runner_edit"
tplOrgRunnerEdit templates.TplName = "org/settings/runners_edit"
tplAdminRunnerEdit templates.TplName = "admin/runners/edit"
tplUserRunnerEdit templates.TplName = "user/settings/runner_edit"
Expand Down
2 changes: 1 addition & 1 deletion routers/web/shared/actions/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

const (
tplRepoVariables templates.TplName = "repo/settings/actions"
tplRepoVariables templates.TplName = "repo/settings/actions/actions"
tplOrgVariables templates.TplName = "org/settings/actions"
tplUserVariables templates.TplName = "user/settings/actions"
tplAdminVariables templates.TplName = "admin/actions"
Expand Down
File renamed without changes.
29 changes: 18 additions & 11 deletions templates/repo/settings/navbar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@
<a class="{{if .PageIsSettingsOptions}}active {{end}}item" href="{{.RepoLink}}/settings">
{{ctx.Locale.Tr "repo.settings.options"}}
</a>
{{if or .Repository.IsPrivate .Permission.HasAnyUnitPublicAccess}}
<a class="{{if .PageIsSettingsPublicAccess}}active {{end}}item" href="{{.RepoLink}}/settings/public_access">
{{ctx.Locale.Tr "repo.settings.public_access"}}
</a>
{{end}}
<a class="{{if .PageIsSettingsCollaboration}}active {{end}}item" href="{{.RepoLink}}/settings/collaboration">
{{ctx.Locale.Tr "repo.settings.collaboration"}}
</a>
<details class="item toggleable-item" {{if or .PageIsSettingsPublicAccess .PageIsSettingsCollaboration .PageIsSettingsKeys}}open{{end}}>
<summary>{{ctx.Locale.Tr "repo.settings.access_management"}}</summary>
<div class="menu">
<a class="{{if .PageIsSettingsCollaboration}}active {{end}}item" href="{{.RepoLink}}/settings/collaboration">
{{ctx.Locale.Tr "repo.settings.collaboration"}}
</a>
{{if .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeCode}}
<a class="{{if .PageIsSettingsKeys}}active {{end}}item" href="{{.RepoLink}}/settings/keys">
{{ctx.Locale.Tr "repo.settings.deploy_keys"}}
</a>
{{end}}
{{if or .Repository.IsPrivate .Permission.HasAnyUnitPublicAccess}}
<a class="{{if .PageIsSettingsPublicAccess}}active {{end}}item" href="{{.RepoLink}}/settings/public_access">
{{ctx.Locale.Tr "repo.settings.public_access"}}
</a>
{{end}}
</div>
</details>
{{if not DisableWebhooks}}
<a class="{{if .PageIsSettingsHooks}}active {{end}}item" href="{{.RepoLink}}/settings/hooks">
{{ctx.Locale.Tr "repo.settings.hooks"}}
Expand All @@ -29,9 +39,6 @@
{{ctx.Locale.Tr "repo.settings.githooks"}}
</a>
{{end}}
<a class="{{if .PageIsSettingsKeys}}active {{end}}item" href="{{.RepoLink}}/settings/keys">
{{ctx.Locale.Tr "repo.settings.deploy_keys"}}
</a>
{{if .LFSStartServer}}
<a class="{{if .PageIsSettingsLFS}}active {{end}}item" href="{{.RepoLink}}/settings/lfs">
{{ctx.Locale.Tr "repo.settings.lfs"}}
Expand Down