1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-10 04:27:22 +00:00

Add top author stats to activity page (#9615)

This commit is contained in:
Lauris BH
2020-01-20 12:07:30 +02:00
committed by GitHub
parent 7d7ab1eeae
commit 81cfe243f9
13 changed files with 524 additions and 906 deletions

View File

@ -182,6 +182,13 @@ func NewFuncMap() []template.FuncMap {
}
return path
},
"Json": func(in interface{}) string {
out, err := json.Marshal(in)
if err != nil {
return ""
}
return string(out)
},
"JsonPrettyPrint": func(in string) string {
var out bytes.Buffer
err := json.Indent(&out, []byte(in), "", " ")