mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 04:38:36 +00:00
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>
This commit is contained in:
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
11
templates/repo/settings/layout_footer.tmpl
Normal file
11
templates/repo/settings/layout_footer.tmpl
Normal file
@@ -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" .}}
|
14
templates/repo/settings/layout_head.tmpl
Normal file
14
templates/repo/settings/layout_head.tmpl
Normal file
@@ -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}}
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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>
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -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" .}}
|
||||
|
@@ -1,4 +1,3 @@
|
||||
{{template "base/alert" .}}
|
||||
|
||||
{{template "repo/settings/webhook/base_list" .}}
|
||||
|
||||
|
@@ -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" .}}
|
||||
|
Reference in New Issue
Block a user