diff options
Diffstat (limited to 'templates/repo/sub_menu.tmpl')
-rw-r--r-- | templates/repo/sub_menu.tmpl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl index 2be7d47a1c..def6beccb9 100644 --- a/templates/repo/sub_menu.tmpl +++ b/templates/repo/sub_menu.tmpl @@ -15,7 +15,9 @@ </div> {{end}} <div class="item"> - <span>{{svg "octicon-database"}} <b>{{FileSize .Repository.Size}}</b></span> + {{$fileSizeFormatted := FileSize .Repository.Size}}{{/* the formatted string is always "{val} {unit}" */}} + {{$fileSizeFields := StringUtils.Split $fileSizeFormatted " "}} + <span>{{svg "octicon-database"}} <b>{{.locale.PrettyNumber (index $fileSizeFields 0)}}</b> {{index $fileSizeFields 1}}</span> </div> {{end}} </div> |