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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Add (dummy) action menus for filtering the list of shares in the modal
Henriette Darge8da8e258a545
diff --git a/app/components/work_packages/share/modal_body_component.html.erb b/app/components/work_packages/share/modal_body_component.html.erbindex a4b6f6cbbfb..182b6eafb66 100644--- a/app/components/work_packages/share/modal_body_component.html.erb+++ b/app/components/work_packages/share/modal_body_component.html.erb@@ -31,6 +31,39 @@render(WorkPackages::Share::CounterComponent.new(work_package: @work_package, count: shared_principals.size))end+ header_grid.with_area(:actions,+ tag: :div,+ data: { 'work-packages--share--bulk-selection-target': 'defaultActions' }) do+ flex_layout do |header_actions|+ header_actions.with_column(mr: 2) do+ render(Primer::Alpha::ActionMenu.new(anchor_align: :end,+ color: :subtle)) do |menu|+ menu.with_show_button(scheme: :invisible, color: :subtle) do |button|+ button.with_trailing_action_icon(icon: "triangle-down")+ I18n.t('work_package.sharing.filter.type')+ end+ menu.with_item(label: I18n.t('work_package.sharing.filter.project_member'))+ menu.with_item(label: I18n.t('work_package.sharing.filter.not_project_member'))+ menu.with_item(label: I18n.t('work_package.sharing.filter.project_group'))+ menu.with_item(label: I18n.t('work_package.sharing.filter.not_project_group'))+ end+ end++ header_actions.with_column do+ render(Primer::Alpha::ActionMenu.new(anchor_align: :end,+ color: :subtle)) do |menu|+ menu.with_show_button(scheme: :invisible, color: :subtle) do |button|+ button.with_trailing_action_icon(icon: "triangle-down")+ I18n.t('work_package.sharing.filter.role')+ end+ menu.with_item(label: I18n.t('work_package.sharing.permissions.view'))+ menu.with_item(label: I18n.t('work_package.sharing.permissions.comment'))+ menu.with_item(label: I18n.t('work_package.sharing.permissions.edit'))+ end+ end+ end+ end+header_grid.with_area(:actions,tag: :div,hidden: true, # Prevent flicker on initial renderdiff --git a/config/locales/en.yml b/config/locales/en.ymlindex c47901294b1..d004955a9db 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -3237,7 +3237,13 @@ en:zero: "0 users"one: "1 user"other: "%{count} users"- share: "Share"+ filter:+ project_member: 'Project member'+ not_project_member: 'Not project member'+ project_group: 'Project group'+ not_project_group: 'Not project group'+ role: 'Role'+ type: 'Type'label_search: "Search for users to invite"label_search_placeholder: "Search by user or email address"label_toggle_all: "Toggle all shares"@@ -3250,6 +3256,7 @@ en:view: "View"view_description: "Can view this work package."remove: "Remove"+ share: "Share"text_empty_state_description: "The work package has not been shared with anyone yet."text_empty_state_header: "No shared users"