Skip to content

Commit 516961c

Browse files
committed
show project count in index
1 parent e476214 commit 516961c

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

app/components/settings/project_life_cycle_step_definitions/row_component.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ See COPYRIGHT and LICENSE files for more details.
4343
title_container.with_column(pt: 1) do
4444
render(Projects::LifeCycleTypeComponent.new(definition))
4545
end
46+
title_container.with_column(pt: 1, ml: 3) do
47+
render(Primer::Beta::Text.new) { t("project.count_lowercase", count: definition.project_count) }
48+
end
4649
end
4750
end
4851
%>

app/controllers/admin/settings/project_life_cycle_step_definitions_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def check_feature_flag
8080
end
8181

8282
def find_definitions
83-
@definitions = Project::LifeCycleStepDefinition.all
83+
@definitions = Project::LifeCycleStepDefinition.with_project_count
8484
end
8585

8686
def find_definition

config/locales/en.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3283,6 +3283,10 @@ en:
32833283
zero: "0 Projects"
32843284
one: "1 Project"
32853285
other: "%{count} Projects"
3286+
count_lowercase:
3287+
zero: "0 projects"
3288+
one: "1 project"
3289+
other: "%{count} projects"
32863290

32873291
project_module_activity: "Activity"
32883292
project_module_forums: "Forums"

0 commit comments

Comments
 (0)