diff --git a/modules/templates/helper.go b/modules/templates/helper.go index db9dbb90a5..eb0c7f7e71 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 4059cb5deb..d7561dde7d 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 a762f63161..c911a83c98 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 1fec6dcec1..5ba88f7356 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 74f2bc0574..0e19b6e3f2 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}}