diff --git a/conf/app.ini b/conf/app.ini index 5c7ce698..d9d29c9e 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -334,3 +334,5 @@ it-IT = it [other] SHOW_FOOTER_BRANDING = false +; Show version information about gogs and go in the footer +SHOW_FOOTER_VERSION = true diff --git a/modules/middleware/context.go b/modules/middleware/context.go index 3910a205..4839ccf9 100644 --- a/modules/middleware/context.go +++ b/modules/middleware/context.go @@ -245,6 +245,7 @@ func Contexter() macaron.Handler { ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding + ctx.Data["ShowFooterVersion"] = setting.ShowFooterVersion c.Map(ctx) } diff --git a/modules/setting/setting.go b/modules/setting/setting.go index a7726722..fac01990 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -178,6 +178,7 @@ var ( // Other settings. ShowFooterBranding bool + ShowFooterVersion bool // Global setting objects. Cfg *ini.File @@ -425,6 +426,7 @@ func NewContext() { dateLangs = Cfg.Section("i18n.datelang").KeysHash() ShowFooterBranding = Cfg.Section("other").Key("SHOW_FOOTER_BRANDING").MustBool() + EnableShowVersion = Cfg.Section("other").Key("ENABLE_SHOW_VERSION").MustBool() HasRobotsTxt = com.IsFile(path.Join(CustomPath, "robots.txt")) } diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl index 686b82f2..f3eb2506 100644 --- a/templates/base/footer.tmpl +++ b/templates/base/footer.tmpl @@ -2,7 +2,7 @@ @@ -46,4 +46,4 @@ - \ No newline at end of file + diff --git a/templates/ng/base/footer.tmpl b/templates/ng/base/footer.tmpl index bafcc46e..695a145f 100644 --- a/templates/ng/base/footer.tmpl +++ b/templates/ng/base/footer.tmpl @@ -1,7 +1,7 @@ - \ No newline at end of file +