Skip to content

Commit 44e0cfa

Browse files
HesterGwxiaoguang
andauthored
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 <[email protected]>
1 parent 476a043 commit 44e0cfa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+350
-582
lines changed
Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
{{template "base/head" .}}
2-
<div role="main" aria-label="{{.Title}}" class="page-content admin config">
3-
{{template "admin/navbar" .}}
4-
<div class="ui container">
5-
<div class="twelve wide column content">
6-
{{template "base/alert" .}}
7-
<h4 class="ui top attached header">
8-
{{.locale.Tr "settings.applications"}}
9-
</h4>
10-
{{template "user/settings/applications_oauth2_list" .}}
11-
</div>
1+
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
2+
<div class="admin-setting-content">
3+
<h4 class="ui top attached header">
4+
{{.locale.Tr "settings.applications"}}
5+
</h4>
6+
{{template "user/settings/applications_oauth2_list" .}}
127
</div>
13-
</div>
14-
{{template "base/footer" .}}
8+
{{template "admin/layout_footer" .}}
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
{{template "base/head" .}}
2-
<div role="main" aria-label="{{.Title}}" class="page-content admin config">
3-
{{template "admin/navbar" .}}
1+
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
2+
<div class="admin-setting-content">
43

5-
{{template "user/settings/applications_oauth2_edit_form" .}}
6-
</div>
7-
{{template "base/footer" .}}
4+
{{template "user/settings/applications_oauth2_edit_form" .}}
5+
</div>
6+
{{template "admin/layout_footer" .}}

templates/admin/auth/edit.tmpl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
{{template "base/head" .}}
2-
<div role="main" aria-label="{{.Title}}" class="page-content admin edit authentication">
3-
{{template "admin/navbar" .}}
4-
<div class="ui container">
5-
{{template "base/alert" .}}
1+
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit authentication")}}
2+
<div class="admin-setting-content">
63
<h4 class="ui top attached header">
74
{{.locale.Tr "admin.auths.edit"}}
85
</h4>
@@ -438,7 +435,6 @@
438435
</form>
439436
</div>
440437
</div>
441-
</div>
442438

443439
<div class="ui gitea-confirm-modal delete modal">
444440
<div class="header">
@@ -450,4 +446,5 @@
450446
</div>
451447
{{template "base/modal_actions_confirm" .}}
452448
</div>
453-
{{template "base/footer" .}}
449+
450+
{{template "admin/layout_footer" .}}

templates/admin/auth/list.tmpl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
{{template "base/head" .}}
2-
<div role="main" aria-label="{{.Title}}" class="page-content admin authentication">
3-
{{template "admin/navbar" .}}
4-
<div class="ui container">
5-
{{template "base/alert" .}}
1+
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin authentication")}}
2+
<div class="admin-setting-content">
63
<h4 class="ui top attached header">
74
{{.locale.Tr "admin.auths.auth_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
85
<div class="ui right">
@@ -38,5 +35,4 @@
3835
</table>
3936
</div>
4037
</div>
41-
</div>
42-
{{template "base/footer" .}}
38+
{{template "admin/layout_footer" .}}

templates/admin/auth/new.tmpl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
{{template "base/head" .}}
2-
<div role="main" aria-label="{{.Title}}" class="page-content admin new authentication">
3-
{{template "admin/navbar" .}}
4-
<div class="ui container">
5-
{{template "base/alert" .}}
1+
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new authentication")}}
2+
<div class="admin-setting-content">
63
<h4 class="ui top attached header">
74
{{.locale.Tr "admin.auths.new"}}
85
</h4>
@@ -122,5 +119,4 @@
122119
</div>
123120
</div>
124121
</div>
125-
</div>
126-
{{template "base/footer" .}}
122+
{{template "admin/layout_footer" .}}

templates/admin/config.tmpl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
{{template "base/head" .}}
2-
<div role="main" aria-label="{{.Title}}" class="page-content admin config">
3-
{{template "admin/navbar" .}}
4-
<div class="ui container">
5-
{{template "base/alert" .}}
1+
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
2+
<div class="admin-setting-content">
63
<h4 class="ui top attached header">
74
{{.locale.Tr "admin.config.server_config"}}
85
</h4>
@@ -426,5 +423,4 @@
426423
</dl>
427424
</div>
428425
</div>
429-
</div>
430-
{{template "base/footer" .}}
426+
{{template "admin/layout_footer" .}}

templates/admin/dashboard.tmpl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
{{template "base/head" .}}
2-
<div role="main" aria-label="{{.Title}}" class="page-content admin dashboard">
3-
{{template "admin/navbar" .}}
4-
<div class="ui container">
5-
{{template "base/alert" .}}
1+
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin dashboard")}}
2+
<div class="admin-setting-content">
63
{{if .NeedUpdate}}
74
<div class="ui negative message flash-error">
85
<p>{{(.locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer) | Str2html}}</p>
@@ -145,5 +142,4 @@
145142
</dl>
146143
</div>
147144
</div>
148-
</div>
149-
{{template "base/footer" .}}
145+
{{template "admin/layout_footer" .}}

templates/admin/emails/list.tmpl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
{{template "base/head" .}}
2-
<div role="main" aria-label="{{.Title}}" class="page-content admin user">
3-
{{template "admin/navbar" .}}
4-
<div class="ui container">
5-
{{template "base/alert" .}}
1+
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
2+
<div class="admin-setting-content">
63
<h4 class="ui top attached header">
74
{{.locale.Tr "admin.emails.email_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
85
</h4>
@@ -101,5 +98,4 @@
10198
</div>
10299

103100
</div>
104-
</div>
105-
{{template "base/footer" .}}
101+
{{template "admin/layout_footer" .}}

templates/admin/hook_new.tmpl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
{{template "base/head" .}}
2-
<div role="main" aria-label="{{.Title}}" class="page-content admin settings new webhook">
3-
{{template "admin/navbar" .}}
4-
<div class="ui container">
5-
{{template "base/alert" .}}
1+
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin settings new webhook")}}
2+
<div class="admin-setting-content">
63
<h4 class="ui top attached header">
74
{{if .PageIsAdminDefaultHooksNew}}
85
{{.locale.Tr "admin.defaulthooks.add_webhook"}}
@@ -55,5 +52,4 @@
5552

5653
{{template "repo/settings/webhook/history" .}}
5754
</div>
58-
</div>
59-
{{template "base/footer" .}}
55+
{{template "admin/layout_footer" .}}

templates/admin/hooks.tmpl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
{{template "base/head" .}}
2-
<div role="main" aria-label="{{.Title}}" class="page-content admin hooks">
3-
{{template "admin/navbar" .}}
4-
<div class="ui container">
5-
{{template "base/alert" .}}
1+
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin hooks")}}
2+
<div class="admin-setting-content">
63

74
{{template "repo/settings/webhook/base_list" .SystemWebhooks}}
85
{{template "repo/settings/webhook/base_list" .DefaultWebhooks}}
96

107
{{template "repo/settings/webhook/delete_modal" .}}
118
</div>
12-
</div>
13-
{{template "base/footer" .}}
9+
{{template "admin/layout_footer" .}}

0 commit comments

Comments
 (0)