diff --git a/app/components/projects/disk_usage_information_component.html.erb b/app/components/projects/disk_usage_information_component.html.erb new file mode 100644 index 00000000000..eed9f4c860e --- /dev/null +++ b/app/components/projects/disk_usage_information_component.html.erb @@ -0,0 +1,6 @@ +

+ <%= helpers.op_icon('icon-info1') %> + <%= t(:label_projects_disk_usage_information, + count: Project.count, + used_disk_space: number_to_human_size(Project.total_projects_size, precision: 2)) %> +

diff --git a/app/components/projects/storage_information_component.rb b/app/components/projects/disk_usage_information_component.rb similarity index 95% rename from app/components/projects/storage_information_component.rb rename to app/components/projects/disk_usage_information_component.rb index e42c11bfa2f..6a6984e64fe 100644 --- a/app/components/projects/storage_information_component.rb +++ b/app/components/projects/disk_usage_information_component.rb @@ -28,7 +28,7 @@ # See COPYRIGHT and LICENSE files for more details. # ++ -class Projects::StorageInformationComponent < ApplicationComponent +class Projects::DiskUsageInformationComponent < ApplicationComponent options :current_user def render? diff --git a/app/components/projects/storage_information_component.html.erb b/app/components/projects/storage_information_component.html.erb deleted file mode 100644 index 92a6c1658bc..00000000000 --- a/app/components/projects/storage_information_component.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -

- <%= helpers.op_icon('icon-info1') %> - <%= t(:label_projects_storage_information, - count: Project.count, - storage: number_to_human_size(Project.total_projects_size, precision: 2)) %> -

diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 68cee0bcd62..41fc41610cb 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -48,11 +48,11 @@ See COPYRIGHT and LICENSE files for more details. size: :medium, aria: { label: I18n.t(:label_project_new) }, data: { 'test-selector': 'project-new-button' }) do |button| - button.with_leading_visual_icon(icon: :plus) - Project.model_name.human - end + button.with_leading_visual_icon(icon: :plus) + Project.model_name.human end end + end %> @@ -61,6 +61,5 @@ See COPYRIGHT and LICENSE files for more details. current_user: current_user, params:) %> - <%= render Projects::StorageInformationComponent.new( - current_user: current_user) %> + <%= render Projects::DiskUsageInformationComponent.new(current_user: current_user) %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 92e00054631..0a37a04c8ed 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2270,7 +2270,7 @@ Project attributes and sections are defined in the