diff --git a/templates/admin/applications/list.tmpl b/templates/admin/applications/list.tmpl index 4da6cb044659..a292051fd0d9 100644 --- a/templates/admin/applications/list.tmpl +++ b/templates/admin/applications/list.tmpl @@ -1,14 +1,8 @@ -{{template "base/head" .}} -
- {{template "admin/navbar" .}} -
-
- {{template "base/alert" .}} -

- {{.locale.Tr "settings.applications"}} -

- {{template "user/settings/applications_oauth2_list" .}} -
+{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}} +
+

+ {{.locale.Tr "settings.applications"}} +

+ {{template "user/settings/applications_oauth2_list" .}}
-
-{{template "base/footer" .}} +{{template "admin/layout_footer" .}} diff --git a/templates/admin/applications/oauth2_edit.tmpl b/templates/admin/applications/oauth2_edit.tmpl index 20231c4b1ca9..668bfe063340 100644 --- a/templates/admin/applications/oauth2_edit.tmpl +++ b/templates/admin/applications/oauth2_edit.tmpl @@ -1,7 +1,6 @@ -{{template "base/head" .}} -
- {{template "admin/navbar" .}} +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}} +
- {{template "user/settings/applications_oauth2_edit_form" .}} -
-{{template "base/footer" .}} + {{template "user/settings/applications_oauth2_edit_form" .}} +
+{{template "admin/layout_footer" .}} diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index c3ff228ac052..c39725699c40 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -
- {{template "admin/navbar" .}} -
- {{template "base/alert" .}} +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit authentication")}} +

{{.locale.Tr "admin.auths.edit"}}

@@ -438,7 +435,6 @@
-
-{{template "base/footer" .}} + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl index 3b8d17ff7d23..5350672026cb 100644 --- a/templates/admin/auth/list.tmpl +++ b/templates/admin/auth/list.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -
- {{template "admin/navbar" .}} -
- {{template "base/alert" .}} +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin authentication")}} +

{{.locale.Tr "admin.auths.auth_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
@@ -38,5 +35,4 @@

-
-{{template "base/footer" .}} +{{template "admin/layout_footer" .}} diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index b7715cb5fe42..5d9a9083c5c8 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -
- {{template "admin/navbar" .}} -
- {{template "base/alert" .}} +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new authentication")}} +

{{.locale.Tr "admin.auths.new"}}

@@ -122,5 +119,4 @@
-
-{{template "base/footer" .}} +{{template "admin/layout_footer" .}} diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 14281c70c068..136ad38f1632 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -
- {{template "admin/navbar" .}} -
- {{template "base/alert" .}} +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}} +

{{.locale.Tr "admin.config.server_config"}}

@@ -426,5 +423,4 @@
-
-{{template "base/footer" .}} +{{template "admin/layout_footer" .}} diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index fc1b1f43857e..93fcae4ca4d4 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -
- {{template "admin/navbar" .}} -
- {{template "base/alert" .}} +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin dashboard")}} +
{{if .NeedUpdate}}

{{(.locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer) | Str2html}}

@@ -145,5 +142,4 @@
-
-{{template "base/footer" .}} +{{template "admin/layout_footer" .}} diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl index 61af57109548..05c6aa66b4e9 100644 --- a/templates/admin/emails/list.tmpl +++ b/templates/admin/emails/list.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -
- {{template "admin/navbar" .}} -
- {{template "base/alert" .}} +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} +

{{.locale.Tr "admin.emails.email_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})

@@ -101,5 +98,4 @@
-
-{{template "base/footer" .}} +{{template "admin/layout_footer" .}} diff --git a/templates/admin/hook_new.tmpl b/templates/admin/hook_new.tmpl index 0c018ff2939e..1abdd4c813a2 100644 --- a/templates/admin/hook_new.tmpl +++ b/templates/admin/hook_new.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -
- {{template "admin/navbar" .}} -
- {{template "base/alert" .}} +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin settings new webhook")}} +

{{if .PageIsAdminDefaultHooksNew}} {{.locale.Tr "admin.defaulthooks.add_webhook"}} @@ -55,5 +52,4 @@ {{template "repo/settings/webhook/history" .}}

-
-{{template "base/footer" .}} +{{template "admin/layout_footer" .}} diff --git a/templates/admin/hooks.tmpl b/templates/admin/hooks.tmpl index 26f92c706410..c77d27dbd0bd 100644 --- a/templates/admin/hooks.tmpl +++ b/templates/admin/hooks.tmpl @@ -1,13 +1,9 @@ -{{template "base/head" .}} -
- {{template "admin/navbar" .}} -
- {{template "base/alert" .}} +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin hooks")}} +
{{template "repo/settings/webhook/base_list" .SystemWebhooks}} {{template "repo/settings/webhook/base_list" .DefaultWebhooks}} {{template "repo/settings/webhook/delete_modal" .}}
-
-{{template "base/footer" .}} +{{template "admin/layout_footer" .}} diff --git a/templates/admin/layout_footer.tmpl b/templates/admin/layout_footer.tmpl new file mode 100644 index 000000000000..8d6e564d515e --- /dev/null +++ b/templates/admin/layout_footer.tmpl @@ -0,0 +1,11 @@ +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
+
+
+ {{/* block: admin-setting-content */}} +{{end}} + +
+
+
+{{template "base/footer" .}} diff --git a/templates/admin/layout_head.tmpl b/templates/admin/layout_head.tmpl new file mode 100644 index 000000000000..6d84f8f3590e --- /dev/null +++ b/templates/admin/layout_head.tmpl @@ -0,0 +1,13 @@ +{{template "base/head" .ctxData}} +
+
+ {{template "admin/navbar" .ctxData}} +
+ {{template "base/alert" .ctxData}} + {{/* block: admin-setting-content */}} + +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
+
+
+{{end}} diff --git a/templates/admin/monitor.tmpl b/templates/admin/monitor.tmpl index 4d66d3bfbb64..4b9e51503c65 100644 --- a/templates/admin/monitor.tmpl +++ b/templates/admin/monitor.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -
- {{template "admin/navbar" .}} -
- {{template "base/alert" .}} +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}} +
{{template "admin/cron" .}}

{{.locale.Tr "admin.monitor.queues"}} @@ -26,7 +23,7 @@ {{.Type}} {{.ExemplarType}} {{$sum := .NumberOfWorkers}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}} - {{$sum := .NumberInQueue}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}} + {{$sum = .NumberInQueue}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}} {{if lt $sum 0}}{{$.locale.Tr "admin.monitor.queue.review"}}{{else}}{{$.locale.Tr "admin.monitor.queue.review_add"}}{{end}} {{end}} @@ -36,7 +33,7 @@ {{template "admin/process" .}}

-
+ -{{template "base/footer" .}} + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl index 97ee9171671d..e8eb54e58da4 100644 --- a/templates/admin/navbar.tmpl +++ b/templates/admin/navbar.tmpl @@ -1,5 +1,6 @@ -