Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Add empty state for share WP modal

Henriette Darge216b852c05ea
diff --git a/app/components/work_packages/share/modal_component.html.erb b/app/components/work_packages/share/modal_component.html.erb
index ade00370916..f2e501f6739 100644
--- a/app/components/work_packages/share/modal_component.html.erb
+++ b/app/components/work_packages/share/modal_component.html.erb
@@ -11,7 +11,19 @@
end
if shared_users.empty?
- # Todo: show empty state?
+ modal_content.with_row(mt: 3) do
+ render(Primer::Beta::Blankslate.new(border: true)) do |component|
+ component.with_visual_icon(icon: :people, size: :medium)
+ component.with_heading(tag: :h2).with_content(I18n.t('work_package.sharing.text_empty_state_header') )
+ component.with_description do
+ flex_layout do |flex|
+ flex.with_row(mb: 2) do
+ render(Primer::Beta::Text.new(color: :subtle)) { I18n.t('work_package.sharing.text_empty_state_description') }
+ end
+ end
+ end
+ end
+ end
else
modal_content.with_row(mt: 3, data: { 'test-selector': 'op-share-wp-active-list'}) do
render(Primer::Beta::BorderBox.new) do |invited_user_list|
diff --git a/config/locales/en.yml b/config/locales/en.yml
index f3bcc773484..57c22a2b0ea 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -3166,6 +3166,8 @@ en:
edit: "Edit"
view: "View"
remove: "Remove"
+ text_empty_state_description: "The work package has not been shared with anyone yet."
+ text_empty_state_header: "No shared users"
working_days:
info: >