File tree Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -428,5 +428,7 @@ cs-CZ = cs-CZ
428
428
429
429
[other]
430
430
SHOW_FOOTER_BRANDING = false
431
- ; Show version information about gogs and go in the footer
431
+ ; Show version information about Gogs and Go in the footer
432
432
SHOW_FOOTER_VERSION = true
433
+ ; Show time of template execution in the footer
434
+ SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
Original file line number Diff line number Diff line change @@ -246,9 +246,10 @@ var (
246
246
// Highlight settings are loaded in modules/template/hightlight.go
247
247
248
248
// Other settings
249
- ShowFooterBranding bool
250
- ShowFooterVersion bool
251
- SupportMiniWinService bool
249
+ ShowFooterBranding bool
250
+ ShowFooterVersion bool
251
+ ShowFooterTemplateLoadTime bool
252
+ SupportMiniWinService bool
252
253
253
254
// Global setting objects
254
255
Cfg * ini.File
@@ -571,6 +572,7 @@ func NewContext() {
571
572
572
573
ShowFooterBranding = Cfg .Section ("other" ).Key ("SHOW_FOOTER_BRANDING" ).MustBool ()
573
574
ShowFooterVersion = Cfg .Section ("other" ).Key ("SHOW_FOOTER_VERSION" ).MustBool ()
575
+ ShowFooterTemplateLoadTime = Cfg .Section ("other" ).Key ("SHOW_FOOTER_TEMPLATE_LOAD_TIME" ).MustBool ()
574
576
575
577
HasRobotsTxt = com .IsFile (path .Join (CustomPath , "robots.txt" ))
576
578
}
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ func NewFuncMap() []template.FuncMap {
52
52
"DisableGravatar" : func () bool {
53
53
return setting .DisableGravatar
54
54
},
55
+ "ShowFooterTemplateLoadTime" : func () bool {
56
+ return setting .ShowFooterTemplateLoadTime
57
+ },
55
58
"LoadTimes" : func (startTime time.Time ) string {
56
59
return fmt .Sprint (time .Since (startTime ).Nanoseconds ()/ 1e6 ) + "ms"
57
60
},
Original file line number Diff line number Diff line change 7
7
<footer>
8
8
<div class="ui container">
9
9
<div class="ui left">
10
- © 2016 Gogs {{if (or .ShowFooterVersion .PageIsAdmin)}}{{.i18n.Tr "version"}}: {{AppVer}}{{end}} {{.i18n.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong> {{.i18n.Tr "template"}}: <strong>{{call .TmplLoadTimes}}</strong>
10
+ © 2016 Gogs {{if (or .ShowFooterVersion .PageIsAdmin)}}{{.i18n.Tr "version"}}: {{AppVer}}{{end}} {{if ShowFooterTemplateLoadTime}}{{ .i18n.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong> {{.i18n.Tr "template"}}: <strong>{{call .TmplLoadTimes}}</strong>{{end}}
11
11
</div>
12
12
<div class="ui right links">
13
13
{{if .ShowFooterBranding}}
50
50
{{end}}
51
51
<script src="{{AppSubUrl}}/js/libs/emojify-1.1.0.min.js"></script>
52
52
<script src="{{AppSubUrl}}/js/libs/clipboard-1.5.9.min.js"></script>
53
-
53
+
54
54
</html>
You can’t perform that action at this time.
0 commit comments