diff --git a/app/components/shares/project_queries/empty_state_component.rb b/app/components/shares/project_queries/empty_state_component.rb index 36e986bcb260..182a8ce4aac3 100644 --- a/app/components/shares/project_queries/empty_state_component.rb +++ b/app/components/shares/project_queries/empty_state_component.rb @@ -44,10 +44,14 @@ def initialize(strategy:) def blankslate_config @blankslate_config ||= {}.tap do |config| - if params[:filters].blank? + if entity.public? config[:icon] = :people - config[:heading_text] = I18n.t("sharing.project_queries.text_empty_state_header") - config[:description_text] = I18n.t("sharing.project_queries.text_empty_state_description") + config[:heading_text] = I18n.t("sharing.project_queries.blank_state.public.header") + config[:description_text] = I18n.t("sharing.project_queries.blank_state.public.description") + elsif params[:filters].blank? + config[:icon] = "share-android" + config[:heading_text] = I18n.t("sharing.project_queries.blank_state.private.header") + config[:description_text] = I18n.t("sharing.project_queries.blank_state.private.description") else config[:icon] = :search config[:heading_text] = I18n.t("sharing.text_empty_search_header") diff --git a/app/models/sharing_strategies/project_query_strategy.rb b/app/models/sharing_strategies/project_query_strategy.rb index dc600fb2c1b4..09cb2b6973fe 100644 --- a/app/models/sharing_strategies/project_query_strategy.rb +++ b/app/models/sharing_strategies/project_query_strategy.rb @@ -70,7 +70,7 @@ def additional_body_components end def empty_state_component - Shares::ProjectQueries::EmptyStateComponent if @entity.public? + Shares::ProjectQueries::EmptyStateComponent end end end diff --git a/config/locales/en.yml b/config/locales/en.yml index ff76954e8a20..9a297cefc287 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3679,8 +3679,13 @@ en: public_flag: label: "Share with everyone at %{instance_name}" caption: "Everyone can view this project list. Those with global edit permissions can modify it." - text_empty_state_header: "Shared with everyone" - text_empty_state_description: "Everyone can view this project list. You can also add individual users with extra permissions." + blank_state: + public: + header: "Shared with everyone" + description: "Everyone can view this project list. You can also add individual users with extra permissions." + private: + header: "Not shared: Private" + description: "This project list has not been shared with anyone yet. Only you can access this list." permissions: view: "View" view_description: "TODO: Add me"