mirror of https://github.com/go-gitea/gitea.git
Removed SizeFmt. (#17890)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
03ec9e5060
commit
6ceef87671
|
@ -125,7 +125,6 @@ func NewFuncMap() []template.FuncMap {
|
||||||
"DateFmtShort": func(t time.Time) string {
|
"DateFmtShort": func(t time.Time) string {
|
||||||
return t.Format("Jan 02, 2006")
|
return t.Format("Jan 02, 2006")
|
||||||
},
|
},
|
||||||
"SizeFmt": base.FileSize,
|
|
||||||
"CountFmt": base.FormatNumberSI,
|
"CountFmt": base.FormatNumberSI,
|
||||||
"SubStr": func(str string, start, length int) string {
|
"SubStr": func(str string, start, length int) string {
|
||||||
if len(str) == 0 {
|
if len(str) == 0 {
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
<td>{{.NumStars}}</td>
|
<td>{{.NumStars}}</td>
|
||||||
<td>{{.NumForks}}</td>
|
<td>{{.NumForks}}</td>
|
||||||
<td>{{.NumIssues}}</td>
|
<td>{{.NumIssues}}</td>
|
||||||
<td>{{SizeFmt .Size}}</td>
|
<td>{{FileSize .Size}}</td>
|
||||||
<td><span title="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td>
|
<td><span title="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td>
|
||||||
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.ID}}" data-name="{{.Name}}">{{svg "octicon-trash"}}</a></td>
|
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.ID}}" data-name="{{.Name}}">{{svg "octicon-trash"}}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{.i18n.Tr "repo.repo_size"}}</label>
|
<label>{{.i18n.Tr "repo.repo_size"}}</label>
|
||||||
<span>{{SizeFmt .Repository.Size}}</span>
|
<span>{{FileSize .Repository.Size}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{.i18n.Tr "repo.template"}}</label>
|
<label>{{.i18n.Tr "repo.template"}}</label>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class="ui">{{svg "octicon-database"}} <b>{{SizeFmt .Repository.Size}}</b></span>
|
<span class="ui">{{svg "octicon-database"}} <b>{{FileSize .Repository.Size}}</b></span>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<span class="icon">{{svg "octicon-repo"}}</span>
|
<span class="icon">{{svg "octicon-repo"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="name" href="{{$repo.Link}}">{{$repo.OwnerName}}/{{$repo.Name}}</a>
|
<a class="name" href="{{$repo.Link}}">{{$repo.OwnerName}}/{{$repo.Name}}</a>
|
||||||
<span>{{SizeFmt $repo.Size}}</span>
|
<span>{{FileSize $repo.Size}}</span>
|
||||||
{{if $repo.IsFork}}
|
{{if $repo.IsFork}}
|
||||||
{{$.i18n.Tr "repo.forked_from"}}
|
{{$.i18n.Tr "repo.forked_from"}}
|
||||||
<span><a href="{{$repo.BaseRepo.Link}}">{{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}}</a></span>
|
<span><a href="{{$repo.BaseRepo.Link}}">{{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}}</a></span>
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
<span class="iconFloat">{{svg "octicon-repo"}}</span>
|
<span class="iconFloat">{{svg "octicon-repo"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="name" href="{{.Link}}">{{.OwnerName}}/{{.Name}}</a>
|
<a class="name" href="{{.Link}}">{{.OwnerName}}/{{.Name}}</a>
|
||||||
<span>{{SizeFmt .Size}}</span>
|
<span>{{FileSize .Size}}</span>
|
||||||
{{if .IsFork}}
|
{{if .IsFork}}
|
||||||
{{$.i18n.Tr "repo.forked_from"}}
|
{{$.i18n.Tr "repo.forked_from"}}
|
||||||
<span><a href="{{.BaseRepo.Link}}">{{.BaseRepo.OwnerName}}/{{.BaseRepo.Name}}</a></span>
|
<span><a href="{{.BaseRepo.Link}}">{{.BaseRepo.OwnerName}}/{{.BaseRepo.Name}}</a></span>
|
||||||
|
|
Loading…
Reference in New Issue