diff --git a/modules/templates/helper.go b/modules/templates/helper.go index db9dbb90a..eb0c7f7e7 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -125,7 +125,6 @@ func NewFuncMap() []template.FuncMap { "DateFmtShort": func(t time.Time) string { return t.Format("Jan 02, 2006") }, - "SizeFmt": base.FileSize, "CountFmt": base.FormatNumberSI, "SubStr": func(str string, start, length int) string { if len(str) == 0 { diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index 4059cb5de..d7561dde7 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -82,7 +82,7 @@ {{.NumStars}} {{.NumForks}} {{.NumIssues}} - {{SizeFmt .Size}} + {{FileSize .Size}} {{.CreatedUnix.FormatShort}} {{svg "octicon-trash"}} diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index a762f6316..c911a83c9 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -18,7 +18,7 @@
- {{SizeFmt .Repository.Size}} + {{FileSize .Repository.Size}}
diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl index 1fec6dcec..5ba88f735 100644 --- a/templates/repo/sub_menu.tmpl +++ b/templates/repo/sub_menu.tmpl @@ -14,7 +14,7 @@
{{end}}
- {{svg "octicon-database"}} {{SizeFmt .Repository.Size}} + {{svg "octicon-database"}} {{FileSize .Repository.Size}}
{{end}} diff --git a/templates/user/settings/repos.tmpl b/templates/user/settings/repos.tmpl index 74f2bc057..0e19b6e3f 100644 --- a/templates/user/settings/repos.tmpl +++ b/templates/user/settings/repos.tmpl @@ -27,7 +27,7 @@ {{svg "octicon-repo"}} {{end}} {{$repo.OwnerName}}/{{$repo.Name}} - {{SizeFmt $repo.Size}} + {{FileSize $repo.Size}} {{if $repo.IsFork}} {{$.i18n.Tr "repo.forked_from"}} {{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}} @@ -120,7 +120,7 @@ {{svg "octicon-repo"}} {{end}} {{.OwnerName}}/{{.Name}} - {{SizeFmt .Size}} + {{FileSize .Size}} {{if .IsFork}} {{$.i18n.Tr "repo.forked_from"}} {{.BaseRepo.OwnerName}}/{{.BaseRepo.Name}}