From 029c165d0a367e4be548d0b4c0f004c2b17a6c86 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 7 May 2021 21:09:25 +0200 Subject: [PATCH] Rename StaticUrlPrefix to AssetUrlPrefix Use a new name for this template/frontend variable to make it distinct from the server variable StaticURLPrefix. --- modules/templates/helper.go | 2 +- templates/admin/hook_new.tmpl | 18 +++++++++--------- templates/base/footer.tmpl | 12 ++++++------ templates/base/footer_content.tmpl | 2 +- templates/base/head.tmpl | 16 ++++++++-------- templates/base/head_navbar.tmpl | 2 +- templates/home.tmpl | 2 +- templates/install.tmpl | 2 +- templates/org/settings/hook_new.tmpl | 18 +++++++++--------- templates/post-install.tmpl | 2 +- templates/repo/migrate/migrating.tmpl | 4 ++-- templates/repo/settings/webhook/base_list.tmpl | 18 +++++++++--------- templates/repo/settings/webhook/new.tmpl | 18 +++++++++--------- templates/repo/view_file.tmpl | 2 +- templates/status/404.tmpl | 2 +- templates/status/500.tmpl | 2 +- templates/swagger/ui.tmpl | 4 ++-- web_src/js/features/emoji.js | 4 ++-- web_src/js/features/serviceworker.js | 2 +- web_src/js/index.js | 4 ++-- web_src/js/publicpath.js | 6 +++--- 21 files changed, 71 insertions(+), 71 deletions(-) diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 8f1362afc4113..fed15d67d69f8 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -60,7 +60,7 @@ func NewFuncMap() []template.FuncMap { "AppSubUrl": func() string { return setting.AppSubURL }, - "StaticUrlPrefix": func() string { + "AssetUrlPrefix": func() string { return setting.StaticURLPrefix + "/assets" }, "AppUrl": func() string { diff --git a/templates/admin/hook_new.tmpl b/templates/admin/hook_new.tmpl index 9b251ec4cbc1c..01e9e429a6c0d 100644 --- a/templates/admin/hook_new.tmpl +++ b/templates/admin/hook_new.tmpl @@ -15,23 +15,23 @@ {{end}}
{{if eq .HookType "gitea"}} - + {{else if eq .HookType "gogs"}} - + {{else if eq .HookType "slack"}} - + {{else if eq .HookType "discord"}} - + {{else if eq .HookType "dingtalk"}} - + {{else if eq .HookType "telegram"}} - + {{else if eq .HookType "msteams"}} - + {{else if eq .HookType "feishu"}} - + {{else if eq .HookType "matrix"}} - + {{end}}
diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl index bc45315ef9d87..25e163b19b9d4 100644 --- a/templates/base/footer.tmpl +++ b/templates/base/footer.tmpl @@ -12,17 +12,17 @@ {{template "base/footer_content" .}} {{if .RequireSimpleMDE}} - - - + + + {{end}} {{if .RequireU2F}} - + {{end}} {{if .EnableCaptcha}} {{if eq .CaptchaType "recaptcha"}} @@ -32,7 +32,7 @@ {{end}} {{end}} - + {{template "custom/footer" .}} diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl index f0d8a6f5a4502..e30fe70768632 100644 --- a/templates/base/footer_content.tmpl +++ b/templates/base/footer_content.tmpl @@ -16,7 +16,7 @@ {{end}} - {{.i18n.Tr "licenses"}} + {{.i18n.Tr "licenses"}} {{if .EnableSwagger}}API{{end}} {{.i18n.Tr "website"}} {{template "custom/extra_links_footer" .}} diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index d4de8f7905bc5..10fc2bad4a027 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -29,7 +29,7 @@ window.config = { AppVer: '{{AppVer}}', AppSubUrl: '{{AppSubUrl}}', - StaticUrlPrefix: '{{StaticUrlPrefix}}', + AssetUrlPrefix: '{{AssetUrlPrefix}}', UseServiceWorker: {{UseServiceWorker}}, csrf: '{{.CsrfToken}}', HighlightJS: {{if .RequireHighlightJS}}true{{else}}false{{end}}, @@ -61,12 +61,12 @@ {{end}} }; - - + + {{if .RequireSimpleMDE}} - + {{end}} - +