From b9d7421dbe783ce72d05591389695a6d7274e87b Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Wed, 13 Nov 2019 00:44:48 +0100 Subject: [PATCH 1/2] feat: display repository size on repo home and settings --- options/locale/locale_en-US.ini | 1 + templates/repo/settings/options.tmpl | 4 ++++ templates/repo/sub_menu.tmpl | 3 +++ 3 files changed, 8 insertions(+) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index a3da32fb50305..e3e0dba9fecda 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -582,6 +582,7 @@ email_notifications.submit = Set Email Preference owner = Owner repo_name = Repository Name repo_name_helper = Good repository names use short, memorable and unique keywords. +repo_size = Repository Size template = Template template_select = Select a template. template_helper = Make repository a template diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 7ded98206cb38..f14bab7369835 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -22,6 +22,10 @@ +
+ + {{SizeFmt .Repository.Size}} +
{{if not .Repository.IsFork}}
diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl index dabaa8a1ef749..b97fe902eb6be 100644 --- a/templates/repo/sub_menu.tmpl +++ b/templates/repo/sub_menu.tmpl @@ -9,6 +9,9 @@ + {{end}}
From e53b28d71b64e289053edd5bb69108dd3523d217 Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Wed, 13 Nov 2019 00:46:42 +0100 Subject: [PATCH 2/2] refactor: move repo size up in setting page --- templates/repo/settings/options.tmpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index f14bab7369835..6f96ff7f47cea 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -15,6 +15,10 @@ +
+ + {{SizeFmt .Repository.Size}} +
@@ -22,10 +26,6 @@
-
- - {{SizeFmt .Repository.Size}} -
{{if not .Repository.IsFork}}