diff --git a/templates/repo/settings/advanced.tmpl b/templates/repo/settings/advanced.tmpl index 81826a6702..00c438a6ef 100644 --- a/templates/repo/settings/advanced.tmpl +++ b/templates/repo/settings/advanced.tmpl @@ -1,17 +1,14 @@ {{template "repo/settings/layout_head" (dict "pageClass" "repository settings advanced")}}
- {{/* FIXME: need to split the "Advance Settings" by units, there are too many options here */}}

{{ctx.Locale.Tr "repo.settings.advanced_settings"}}

- {{/* ── Code ── */}} -
- {{svg "octicon-code" 16}} {{ctx.Locale.Tr "repo.code"}} -
+
+
{{svg "octicon-code" 16}} {{ctx.Locale.Tr "repo.code"}}
{{$isCodeEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeCode}} {{$isCodeGlobalDisabled := ctx.Consts.RepoUnitTypeCode.UnitGlobalDisabled}}
@@ -19,14 +16,11 @@
-
-
- {{/* ── Wiki ── */}} -
- {{svg "octicon-book" 16}} {{ctx.Locale.Tr "repo.wiki"}} -
+
+
+
{{svg "octicon-book" 16}} {{ctx.Locale.Tr "repo.wiki"}}
{{$isInternalWikiEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeWiki}} {{$isExternalWikiEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeExternalWiki}} {{$isWikiEnabled := or $isInternalWikiEnabled $isExternalWikiEnabled}} @@ -38,7 +32,6 @@
-
@@ -70,14 +63,11 @@

{{ctx.Locale.Tr "repo.settings.external_wiki_url_desc"}}

-
-
- {{/* ── Issues ── */}} -
- {{svg "octicon-issue-opened" 16}} {{ctx.Locale.Tr "repo.issues"}} -
+
+
+
{{svg "octicon-issue-opened" 16}} {{ctx.Locale.Tr "repo.issues"}}
{{$isIssuesEnabled := or (.Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeIssues) (.Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeExternalTracker)}} {{$isIssuesGlobalDisabled := ctx.Consts.RepoUnitTypeIssues.UnitGlobalDisabled}} {{$isExternalTrackerGlobalDisabled := ctx.Consts.RepoUnitTypeExternalTracker.UnitGlobalDisabled}} @@ -88,7 +78,6 @@
-
@@ -175,14 +164,11 @@

{{ctx.Locale.Tr "repo.settings.tracker_issue_style.regexp_pattern_desc"}}

-
- - {{/* ── Projects ── */}} -
- {{svg "octicon-project" 16}} {{ctx.Locale.Tr "repo.projects"}} -
+
+
+
{{svg "octicon-project" 16}} {{ctx.Locale.Tr "repo.projects"}}
{{$isProjectsEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeProjects}} {{$isProjectsGlobalDisabled := ctx.Consts.RepoUnitTypeProjects.UnitGlobalDisabled}} {{$projectsUnit := .Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypeProjects}} @@ -192,7 +178,6 @@
-

{{ctx.Locale.Tr "repo.settings.projects_mode_desc"}} @@ -221,14 +206,11 @@

{{ctx.Locale.Tr "repo.settings.projects_mode_all"}}
- - - {{/* ── Releases ── */}} -
- {{svg "octicon-tag" 16}} {{ctx.Locale.Tr "repo.releases"}} -
+
+
+
{{svg "octicon-tag" 16}} {{ctx.Locale.Tr "repo.releases"}}
{{$isReleasesEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypeReleases}} {{$isReleasesGlobalDisabled := ctx.Consts.RepoUnitTypeReleases.UnitGlobalDisabled}}
@@ -236,7 +218,6 @@
-
@@ -246,15 +227,11 @@

{{ctx.Locale.Tr "repo.settings.unit_visibility_releases_help"}}

-
-
-
- {{/* ── Packages ── */}} -
- {{svg "octicon-package" 16}} {{ctx.Locale.Tr "repo.packages"}} -
+
+
+
{{svg "octicon-package" 16}} {{ctx.Locale.Tr "repo.packages"}}
{{$isPackagesEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypePackages}} {{$isPackagesGlobalDisabled := ctx.Consts.RepoUnitTypePackages.UnitGlobalDisabled}}
@@ -262,15 +239,12 @@
-
-
- {{if not .IsMirror}} {{/* ── Pull Requests ── */}} -
- {{svg "octicon-git-pull-request" 16}} {{ctx.Locale.Tr "repo.pulls"}} -
+
+
+
{{svg "octicon-git-pull-request" 16}} {{ctx.Locale.Tr "repo.pulls"}}
{{$pullRequestEnabled := .Repository.UnitEnabled ctx ctx.Consts.RepoUnitTypePullRequests}} {{$pullRequestGlobalDisabled := ctx.Consts.RepoUnitTypePullRequests.UnitGlobalDisabled}} {{$prUnit := .Repository.MustGetUnit ctx ctx.Consts.RepoUnitTypePullRequests}} @@ -323,7 +297,6 @@
-

{{ctx.Locale.Tr "repo.settings.default_merge_style_desc"}} @@ -408,10 +381,7 @@

{{end}} - -
-
diff --git a/templates/repo/settings/navbar.tmpl b/templates/repo/settings/navbar.tmpl index d3a6b9d923..7756301b61 100644 --- a/templates/repo/settings/navbar.tmpl +++ b/templates/repo/settings/navbar.tmpl @@ -1,43 +1,9 @@