summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorHester Gong <hestergong@gmail.com>2023-04-23 18:21:21 +0800
committerGitHub <noreply@github.com>2023-04-23 18:21:21 +0800
commit44e0cfa96e8f402b18b88be6ca5c2f368924bfa0 (patch)
tree63bce949dd7988785113a29b313b341abdd4f5ca /templates/repo
parent476a043a5fb2b472e2aaced450ac2a0c9102854e (diff)
downloadgitea-44e0cfa96e8f402b18b88be6ca5c2f368924bfa0.tar.gz
gitea-44e0cfa96e8f402b18b88be6ca5c2f368924bfa0.zip
Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246)
Co-Author: @wxiaoguang This is the first step of #24229. And this PR will only includes html changes, and followed by other PRs that fine tune css and change to submenus. After: Admin Level <img width="1400" alt="Screen Shot 2023-04-21 at 10 07 16" src="https://user-images.githubusercontent.com/17645053/233523870-f848b61d-056a-4b41-9760-a9a49fea1fe8.png"> User Level <img width="1422" alt="Screen Shot 2023-04-21 at 10 07 23" src="https://user-images.githubusercontent.com/17645053/233523878-979adb20-a657-43d9-99a6-ad414010c0ef.png"> Repo Level <img width="1404" alt="Screen Shot 2023-04-21 at 10 07 07" src="https://user-images.githubusercontent.com/17645053/233523863-337440bd-c03a-4dfd-87fa-cef40300bfe0.png"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/settings/branches.tmpl11
-rw-r--r--templates/repo/settings/collaboration.tmpl12
-rw-r--r--templates/repo/settings/deploy_keys.tmpl12
-rw-r--r--templates/repo/settings/githook_edit.tmpl11
-rw-r--r--templates/repo/settings/githooks.tmpl11
-rw-r--r--templates/repo/settings/layout_footer.tmpl11
-rw-r--r--templates/repo/settings/layout_head.tmpl14
-rw-r--r--templates/repo/settings/lfs.tmpl10
-rw-r--r--templates/repo/settings/lfs_file.tmpl11
-rw-r--r--templates/repo/settings/lfs_file_find.tmpl11
-rw-r--r--templates/repo/settings/lfs_locks.tmpl11
-rw-r--r--templates/repo/settings/lfs_pointers.tmpl11
-rw-r--r--templates/repo/settings/navbar.tmpl5
-rw-r--r--templates/repo/settings/options.tmpl12
-rw-r--r--templates/repo/settings/protected_branch.tmpl11
-rw-r--r--templates/repo/settings/runner_edit.tmpl10
-rw-r--r--templates/repo/settings/runners.tmpl10
-rw-r--r--templates/repo/settings/secrets.tmpl11
-rw-r--r--templates/repo/settings/tags.tmpl11
-rw-r--r--templates/repo/settings/webhook/base.tmpl10
-rw-r--r--templates/repo/settings/webhook/list.tmpl1
-rw-r--r--templates/repo/settings/webhook/new.tmpl11
22 files changed, 84 insertions, 144 deletions
diff --git a/templates/repo/settings/branches.tmpl b/templates/repo/settings/branches.tmpl
index 53e1b00f6f..ae1d7277a1 100644
--- a/templates/repo/settings/branches.tmpl
+++ b/templates/repo/settings/branches.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings edit">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit")}}
+ <div class="repo-setting-content">
{{if .Repository.IsArchived}}
<div class="ui warning message">
{{.locale.Tr "repo.settings.archive.branchsettings_unavailable"}}
@@ -94,7 +90,6 @@
{{end}}
{{end}}
</div>
-</div>
<div class="ui gitea-confirm-modal delete modal">
<div class="header">
@@ -107,4 +102,4 @@
{{template "base/modal_actions_confirm" .}}
</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl
index d9a415662e..6b1fcf194a 100644
--- a/templates/repo/settings/collaboration.tmpl
+++ b/templates/repo/settings/collaboration.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings collaboration">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings collaboration")}}
+ <div class="repo-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "repo.settings.collaboration"}}
</h4>
@@ -110,7 +106,6 @@
</div>
{{end}}
</div>
-</div>
<div class="ui gitea-confirm-modal delete modal">
<div class="header">
@@ -122,4 +117,5 @@
</div>
{{template "base/modal_actions_confirm" .}}
</div>
-{{template "base/footer" .}}
+
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl
index a0f802e49a..e577fcc5fa 100644
--- a/templates/repo/settings/deploy_keys.tmpl
+++ b/templates/repo/settings/deploy_keys.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings")}}
+ <div class="repo-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "repo.settings.deploy_keys"}}
<div class="ui right">
@@ -75,7 +71,6 @@
{{end}}
</div>
</div>
-</div>
<div class="ui gitea-confirm-modal delete modal">
<div class="header">
@@ -87,4 +82,5 @@
</div>
{{template "base/modal_actions_confirm" .}}
</div>
-{{template "base/footer" .}}
+
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/githook_edit.tmpl b/templates/repo/settings/githook_edit.tmpl
index d4df95b29a..3d212b5ffd 100644
--- a/templates/repo/settings/githook_edit.tmpl
+++ b/templates/repo/settings/githook_edit.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings edit githook">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit githook")}}
+ <div class="repo-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "repo.settings.githooks"}}
</h4>
@@ -28,5 +24,4 @@
</form>
</div>
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/githooks.tmpl b/templates/repo/settings/githooks.tmpl
index a72d5ba290..c0bf91f910 100644
--- a/templates/repo/settings/githooks.tmpl
+++ b/templates/repo/settings/githooks.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings githooks">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings githooks")}}
+ <div class="repo-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "repo.settings.githooks"}}
</h4>
@@ -24,5 +20,4 @@
</div>
</div>
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/layout_footer.tmpl b/templates/repo/settings/layout_footer.tmpl
new file mode 100644
index 0000000000..60cad3ffb9
--- /dev/null
+++ b/templates/repo/settings/layout_footer.tmpl
@@ -0,0 +1,11 @@
+{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
+<div class="page-content">
+ <div class="repo-layout-right">
+ <div>
+ {{/* block: repo-setting-content */}}
+{{end}}
+
+ </div>
+ </div>
+</div>
+{{template "base/footer" .}}
diff --git a/templates/repo/settings/layout_head.tmpl b/templates/repo/settings/layout_head.tmpl
new file mode 100644
index 0000000000..3117309831
--- /dev/null
+++ b/templates/repo/settings/layout_head.tmpl
@@ -0,0 +1,14 @@
+{{template "base/head" .ctxData}}
+<div role="main" aria-label="{{.ctxData.Title}}" class="page-content {{.pageClass}}">
+ {{template "repo/header" .ctxData}}
+ <div class="ui container stackable grid">
+ {{template "repo/settings/navbar" .ctxData}}
+ <div class="twelve wide column">
+ {{template "base/alert" .ctxData}}
+ {{/* block: repo-setting-content */}}
+
+{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
+ </div>
+ </div>
+</div>
+{{end}}
diff --git a/templates/repo/settings/lfs.tmpl b/templates/repo/settings/lfs.tmpl
index b4ffa1894f..3a39dff62c 100644
--- a/templates/repo/settings/lfs.tmpl
+++ b/templates/repo/settings/lfs.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings lfs">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
+ <div class="repo-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "repo.settings.lfs_filelist"}} ({{.locale.Tr "admin.total" .Total}})
<div class="ui right">
@@ -60,4 +56,4 @@
{{end}}
</div>
</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/lfs_file.tmpl b/templates/repo/settings/lfs_file.tmpl
index 2ad3458501..d38cf32d24 100644
--- a/templates/repo/settings/lfs_file.tmpl
+++ b/templates/repo/settings/lfs_file.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings lfs">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container repository file list">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
+ <div class="user-main-content twelve wide column content repository file list">
<div class="tab-size-8 non-diff-file-content">
<h4 class="ui top attached header">
<a href="{{.LFSFilesLink}}">{{.locale.Tr "repo.settings.lfs"}}</a> / <span class="truncate sha">{{.LFSFile.Oid}}</span>
@@ -58,5 +54,4 @@
</div>
</div>
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/lfs_file_find.tmpl b/templates/repo/settings/lfs_file_find.tmpl
index 81cb649837..21709e7b33 100644
--- a/templates/repo/settings/lfs_file_find.tmpl
+++ b/templates/repo/settings/lfs_file_find.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings lfs">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container repository file list">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
+ <div class="user-main-content twelve wide column content repository file list">
<div class="tab-size-8 non-diff-file-content">
<h4 class="ui top attached header">
<a href="{{.LFSFilesLink}}">{{.locale.Tr "repo.settings.lfs"}}</a> / <span class="truncate sha">{{.Oid}}</span>
@@ -48,5 +44,4 @@
</table>
</div>
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/lfs_locks.tmpl b/templates/repo/settings/lfs_locks.tmpl
index cfe4f6add5..8fa3dfd3d3 100644
--- a/templates/repo/settings/lfs_locks.tmpl
+++ b/templates/repo/settings/lfs_locks.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings lfs">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container repository file list">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
+ <div class="user-main-content twelve wide column content repository file list">
<div class="tab-size-8 non-diff-file-content">
<h4 class="ui top attached header">
<a href="{{.LFSFilesLink}}">{{.locale.Tr "repo.settings.lfs"}}</a> / {{.locale.Tr "repo.settings.lfs_locks"}} ({{.locale.Tr "admin.total" .Total}})
@@ -57,5 +53,4 @@
{{template "base/paginate" .}}
</div>
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/lfs_pointers.tmpl b/templates/repo/settings/lfs_pointers.tmpl
index c95e07b482..5f0cf3164d 100644
--- a/templates/repo/settings/lfs_pointers.tmpl
+++ b/templates/repo/settings/lfs_pointers.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings lfs">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
+ <div class="repo-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "repo.settings.lfs_pointers.found" .NumPointers .NumAssociated .NumNotAssociated .NumNoExist}}
{{if gt .NumAssociatable 0}}
@@ -67,5 +63,4 @@
</table>
</div>
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/navbar.tmpl b/templates/repo/settings/navbar.tmpl
index bdfbb6bf10..081d0c474e 100644
--- a/templates/repo/settings/navbar.tmpl
+++ b/templates/repo/settings/navbar.tmpl
@@ -1,5 +1,6 @@
-<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar shadow-body">
- <div class="new-menu-inner">
+<div class="four wide column">
+ <div class="ui fluid vertical menu">
+ <div class="header item">{{.locale.Tr "org.settings"}}</div>
<a class="{{if .PageIsSettingsOptions}}active {{end}}item" href="{{.RepoLink}}/settings">
{{.locale.Tr "repo.settings.options"}}
</a>
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 70850a6ea4..9440f265fc 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings options">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings options")}}
+ <div class="user-main-content twelve wide column">
<h4 class="ui top attached header">
{{.locale.Tr "repo.settings.basic_settings"}}
</h4>
@@ -798,7 +794,7 @@
</div>
{{end}}
</div>
-</div>
+{{template "repo/settings/layout_footer" .}}
{{if .Permission.IsOwner}}
{{if .Repository.IsMirror}}
@@ -993,5 +989,3 @@
</div>
{{end}}
{{end}}
-
-{{template "base/footer" .}}
diff --git a/templates/repo/settings/protected_branch.tmpl b/templates/repo/settings/protected_branch.tmpl
index d63fed46bc..31ba0bf888 100644
--- a/templates/repo/settings/protected_branch.tmpl
+++ b/templates/repo/settings/protected_branch.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings branches">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings branches")}}
+ <div class="repo-setting-content">
<form class="ui form" action="{{.Link}}" method="post">
<h4 class="ui top attached header">
{{.locale.Tr "repo.settings.branch_protection" (.Rule.RuleName|Escape) | Str2html}}
@@ -260,5 +256,4 @@
</div>
</form>
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/runner_edit.tmpl b/templates/repo/settings/runner_edit.tmpl
index 10d410f096..8b76aead57 100644
--- a/templates/repo/settings/runner_edit.tmpl
+++ b/templates/repo/settings/runner_edit.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div class="page-content repository settings runners">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings runners")}}
+ <div class="repo-setting-content">
{{template "shared/actions/runner_edit" .}}
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/runners.tmpl b/templates/repo/settings/runners.tmpl
index d3a0b64fc5..ab3ad40400 100644
--- a/templates/repo/settings/runners.tmpl
+++ b/templates/repo/settings/runners.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div class="page-content repository settings runners">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings runners")}}
+ <div class="repo-setting-content">
{{template "shared/actions/runner_list" .}}
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/secrets.tmpl b/templates/repo/settings/secrets.tmpl
index 71c5c51157..0b89639e79 100644
--- a/templates/repo/settings/secrets.tmpl
+++ b/templates/repo/settings/secrets.tmpl
@@ -1,10 +1,5 @@
-{{template "base/head" .}}
-<div class="page-content repository settings">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings")}}
+ <div class="repo-setting-content">
{{template "shared/secrets/add_list" .}}
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/tags.tmpl b/templates/repo/settings/tags.tmpl
index 6387a20de6..fffb97100e 100644
--- a/templates/repo/settings/tags.tmpl
+++ b/templates/repo/settings/tags.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings edit">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit")}}
+ <div class="repo-setting-content">
{{if .Repository.IsArchived}}
<div class="ui warning message">
{{.locale.Tr "repo.settings.archive.tagsettings_unavailable"}}
@@ -127,5 +123,4 @@
</div>
{{end}}
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/webhook/base.tmpl b/templates/repo/settings/webhook/base.tmpl
index 442434007d..d524722454 100644
--- a/templates/repo/settings/webhook/base.tmpl
+++ b/templates/repo/settings/webhook/base.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings webhooks">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings webhooks")}}
+ <div class="repo-setting-content">
{{template "repo/settings/webhook/list" .}}
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}
diff --git a/templates/repo/settings/webhook/list.tmpl b/templates/repo/settings/webhook/list.tmpl
index 507f5e1f67..b24159fccb 100644
--- a/templates/repo/settings/webhook/list.tmpl
+++ b/templates/repo/settings/webhook/list.tmpl
@@ -1,4 +1,3 @@
-{{template "base/alert" .}}
{{template "repo/settings/webhook/base_list" .}}
diff --git a/templates/repo/settings/webhook/new.tmpl b/templates/repo/settings/webhook/new.tmpl
index 5102390db9..f4caa28989 100644
--- a/templates/repo/settings/webhook/new.tmpl
+++ b/templates/repo/settings/webhook/new.tmpl
@@ -1,9 +1,5 @@
-{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings new webhook">
- {{template "repo/header" .}}
- {{template "repo/settings/navbar" .}}
- <div class="ui container">
- {{template "base/alert" .}}
+{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings webhook")}}
+ <div class="repo-setting-content">
<h4 class="ui top attached header">
{{if .PageIsSettingsHooksNew}}{{.locale.Tr "repo.settings.add_webhook"}}{{else}}{{.locale.Tr "repo.settings.update_webhook"}}{{end}}
<div class="ui right">
@@ -48,5 +44,4 @@
{{template "repo/settings/webhook/history" .}}
</div>
-</div>
-{{template "base/footer" .}}
+{{template "repo/settings/layout_footer" .}}