Skip to content

Commit

Permalink
show project count in index
Browse files Browse the repository at this point in the history
  • Loading branch information
toy committed Dec 11, 2024
1 parent e476214 commit 516961c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ See COPYRIGHT and LICENSE files for more details.
title_container.with_column(pt: 1) do
render(Projects::LifeCycleTypeComponent.new(definition))
end
title_container.with_column(pt: 1, ml: 3) do
render(Primer::Beta::Text.new) { t("project.count_lowercase", count: definition.project_count) }
end
end
end
%>
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def check_feature_flag
end

def find_definitions
@definitions = Project::LifeCycleStepDefinition.all
@definitions = Project::LifeCycleStepDefinition.with_project_count
end

def find_definition
Expand Down
4 changes: 4 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3283,6 +3283,10 @@ en:
zero: "0 Projects"
one: "1 Project"
other: "%{count} Projects"
count_lowercase:
zero: "0 projects"
one: "1 project"
other: "%{count} projects"

project_module_activity: "Activity"
project_module_forums: "Forums"
Expand Down

0 comments on commit 516961c

Please sign in to comment.