diff --git a/templates/admin/applications/list.tmpl b/templates/admin/applications/list.tmpl index 4da6cb0446..a292051fd0 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 20231c4b1c..668bfe0633 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 c3ff228ac0..c39725699c 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 3b8d17ff7d..5350672026 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 b7715cb5fe..5d9a9083c5 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 14281c70c0..136ad38f16 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 fc1b1f4385..93fcae4ca4 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 61af571095..05c6aa66b4 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 0c018ff293..1abdd4c813 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 26f92c7064..c77d27dbd0 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 0000000000..8d6e564d51 --- /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 0000000000..6d84f8f359 --- /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 4d66d3bfbb..4b9e51503c 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 97ee917167..e8eb54e58d 100644 --- a/templates/admin/navbar.tmpl +++ b/templates/admin/navbar.tmpl @@ -1,5 +1,6 @@ -