Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to vertical navbar layout for secondary navbar for repo/user/admin settings #24246

Merged
merged 24 commits into from
Apr 23, 2023
Merged
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
20 changes: 7 additions & 13 deletions templates/admin/applications/list.tmpl
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin config">
{{template "admin/navbar" .}}
<div class="ui container">
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
{{.locale.Tr "settings.applications"}}
</h4>
{{template "user/settings/applications_oauth2_list" .}}
</div>
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "settings.applications"}}
</h4>
{{template "user/settings/applications_oauth2_list" .}}
</div>
</div>
{{template "base/footer" .}}
{{template "admin/layout_footer" .}}
11 changes: 5 additions & 6 deletions templates/admin/applications/oauth2_edit.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin config">
{{template "admin/navbar" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
<div class="admin-setting-content">

{{template "user/settings/applications_oauth2_edit_form" .}}
</div>
{{template "base/footer" .}}
{{template "user/settings/applications_oauth2_edit_form" .}}
</div>
{{template "admin/layout_footer" .}}
11 changes: 4 additions & 7 deletions templates/admin/auth/edit.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin edit authentication">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit authentication")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "admin.auths.edit"}}
</h4>
Expand Down Expand Up @@ -438,7 +435,6 @@
</form>
</div>
</div>
</div>

<div class="ui gitea-confirm-modal delete modal">
<div class="header">
Expand All @@ -450,4 +446,5 @@
</div>
{{template "base/modal_actions_confirm" .}}
</div>
{{template "base/footer" .}}

{{template "admin/layout_footer" .}}
10 changes: 3 additions & 7 deletions templates/admin/auth/list.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin authentication">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin authentication")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "admin.auths.auth_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
<div class="ui right">
Expand Down Expand Up @@ -38,5 +35,4 @@
</table>
</div>
</div>
</div>
{{template "base/footer" .}}
{{template "admin/layout_footer" .}}
10 changes: 3 additions & 7 deletions templates/admin/auth/new.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin new authentication">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new authentication")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "admin.auths.new"}}
</h4>
Expand Down Expand Up @@ -122,5 +119,4 @@
</div>
</div>
</div>
</div>
{{template "base/footer" .}}
{{template "admin/layout_footer" .}}
10 changes: 3 additions & 7 deletions templates/admin/config.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin config">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "admin.config.server_config"}}
</h4>
Expand Down Expand Up @@ -426,5 +423,4 @@
</dl>
</div>
</div>
</div>
{{template "base/footer" .}}
{{template "admin/layout_footer" .}}
10 changes: 3 additions & 7 deletions templates/admin/dashboard.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin dashboard">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin dashboard")}}
<div class="admin-setting-content">
{{if .NeedUpdate}}
<div class="ui negative message flash-error">
<p>{{(.locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer) | Str2html}}</p>
Expand Down Expand Up @@ -145,5 +142,4 @@
</dl>
</div>
</div>
</div>
{{template "base/footer" .}}
{{template "admin/layout_footer" .}}
10 changes: 3 additions & 7 deletions templates/admin/emails/list.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin user">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "admin.emails.email_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
</h4>
Expand Down Expand Up @@ -101,5 +98,4 @@
</div>

</div>
</div>
{{template "base/footer" .}}
{{template "admin/layout_footer" .}}
10 changes: 3 additions & 7 deletions templates/admin/hook_new.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin settings new webhook">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin settings new webhook")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{if .PageIsAdminDefaultHooksNew}}
{{.locale.Tr "admin.defaulthooks.add_webhook"}}
Expand Down Expand Up @@ -55,5 +52,4 @@

{{template "repo/settings/webhook/history" .}}
</div>
</div>
{{template "base/footer" .}}
{{template "admin/layout_footer" .}}
10 changes: 3 additions & 7 deletions templates/admin/hooks.tmpl
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin hooks">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin hooks")}}
<div class="admin-setting-content">

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

{{template "repo/settings/webhook/delete_modal" .}}
</div>
</div>
{{template "base/footer" .}}
{{template "admin/layout_footer" .}}
11 changes: 11 additions & 0 deletions templates/admin/layout_footer.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
<div class="page-content">
<div class="admin-layout-right">
<div>
{{/* block: admin-setting-content */}}
{{end}}

</div>
</div>
</div>
{{template "base/footer" .}}
13 changes: 13 additions & 0 deletions templates/admin/layout_head.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{template "base/head" .ctxData}}
<div role="main" aria-label="{{.ctxData.Title}}" class="page-content {{.pageClass}}">
<div class="ui container stackable grid">
{{template "admin/navbar" .ctxData}}
<div class="twelve wide column">
{{template "base/alert" .ctxData}}
{{/* block: admin-setting-content */}}

{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}}
</div>
</div>
</div>
{{end}}
14 changes: 6 additions & 8 deletions templates/admin/monitor.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin monitor">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}
<div class="admin-setting-content">
{{template "admin/cron" .}}
<h4 class="ui top attached header">
{{.locale.Tr "admin.monitor.queues"}}
Expand All @@ -26,7 +23,7 @@
<td>{{.Type}}</td>
<td>{{.ExemplarType}}</td>
<td>{{$sum := .NumberOfWorkers}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
<td>{{$sum := .NumberInQueue}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
<td>{{$sum = .NumberInQueue}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
<td><a href="{{$.Link}}/queue/{{.QID}}" class="button">{{if lt $sum 0}}{{$.locale.Tr "admin.monitor.queue.review"}}{{else}}{{$.locale.Tr "admin.monitor.queue.review_add"}}{{end}}</a>
</tr>
{{end}}
Expand All @@ -36,7 +33,7 @@

{{template "admin/process" .}}
</div>
</div>

<div class="ui gitea-confirm-modal delete modal">
<div class="header">
{{.locale.Tr "admin.monitor.process.cancel"}}
Expand All @@ -47,4 +44,5 @@
</div>
{{template "base/modal_actions_confirm" .}}
</div>
{{template "base/footer" .}}

{{template "admin/layout_footer" .}}
5 changes: 3 additions & 2 deletions templates/admin/navbar.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
<div class="new-menu-inner">
<div class="four wide column">
<div class="ui fluid vertical menu">
<div class="header item">{{.locale.Tr "settings"}}</div>
<a class="{{if .PageIsAdminDashboard}}active {{end}}item" href="{{AppSubUrl}}/admin">
{{.locale.Tr "admin.dashboard"}}
</a>
Expand Down
11 changes: 4 additions & 7 deletions templates/admin/notice.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin notice">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin notice")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "admin.notices.system_notice_list"}} ({{.locale.Tr "admin.total" .Total}})
</h4>
Expand Down Expand Up @@ -69,7 +66,6 @@

{{template "base/paginate" .}}
</div>
</div>

<div class="ui modal admin" id="detail-modal">
<div class="header">{{$.locale.Tr "admin.notices.view_detail_header"}}</div>
Expand All @@ -78,4 +74,5 @@
<pre></pre>
</div>
</div>
{{template "base/footer" .}}

{{template "admin/layout_footer" .}}
10 changes: 3 additions & 7 deletions templates/admin/org/list.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin user">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "admin.orgs.org_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
<div class="ui right">
Expand Down Expand Up @@ -54,5 +51,4 @@

{{template "base/paginate" .}}
</div>
</div>
{{template "base/footer" .}}
{{template "admin/layout_footer" .}}
11 changes: 4 additions & 7 deletions templates/admin/packages/list.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin user">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "admin.packages.package_manage_panel"}} ({{.locale.Tr "admin.total" .TotalCount}},
{{.locale.Tr "admin.packages.total_size" (FileSize .TotalBlobSize)}},
Expand Down Expand Up @@ -78,7 +75,6 @@

{{template "base/paginate" .}}
</div>
</div>

<div class="ui gitea-confirm-modal delete modal">
<div class="header">
Expand All @@ -90,4 +86,5 @@
</div>
{{template "base/modal_actions_confirm" .}}
</div>
{{template "base/footer" .}}

{{template "admin/layout_footer" .}}
15 changes: 6 additions & 9 deletions templates/admin/queue.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin monitor">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "admin.monitor.queue" .Queue.Name}}
</h4>
Expand All @@ -25,7 +22,7 @@
<td>{{.Queue.ExemplarType}}</td>
<td>{{$sum := .Queue.NumberOfWorkers}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
<td>{{if lt $sum 0}}-{{else}}{{.Queue.MaxNumberOfWorkers}}{{end}}</td>
<td>{{$sum := .Queue.NumberInQueue}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
<td>{{$sum = .Queue.NumberInQueue}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -177,10 +174,10 @@
{{.locale.Tr "admin.monitor.queue.configuration"}}
</h4>
<div class="ui attached segment">
<pre>{{.Queue.Configuration | JsonPrettyPrint}}
<pre>{{.Queue.Configuration | JsonPrettyPrint}}</pre>
</div>
</div>
</div>

<div class="ui gitea-confirm-modal delete modal">
<div class="header">
{{.locale.Tr "admin.monitor.queue.pool.cancel"}}
Expand All @@ -192,4 +189,4 @@
{{template "base/modal_actions_confirm" .}}
</div>

{{template "base/footer" .}}
{{template "admin/layout_footer" .}}
11 changes: 4 additions & 7 deletions templates/admin/repo/list.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin user">
{{template "admin/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{.locale.Tr "admin.repos.repo_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
<div class="ui right">
Expand Down Expand Up @@ -93,7 +90,6 @@

{{template "base/paginate" .}}
</div>
</div>

<div class="ui gitea-confirm-modal delete modal">
<div class="header">
Expand All @@ -107,4 +103,5 @@
</div>
{{template "base/modal_actions_confirm" .}}
</div>
{{template "base/footer" .}}

{{template "admin/layout_footer" .}}
Loading