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

Allow adding content to the actions column in a BorderBoxTableComponent

Klaus Zandersde377402374d
diff --git a/app/components/op_primer/border_box_table_component.html.erb b/app/components/op_primer/border_box_table_component.html.erb
index 9efdd2d5ec6..927e3f9d997 100644
--- a/app/components/op_primer/border_box_table_component.html.erb
+++ b/app/components/op_primer/border_box_table_component.html.erb
@@ -55,10 +55,10 @@ See COPYRIGHT and LICENSE files for more details.
if has_actions?
concat render(
Primer::BaseComponent.new(
- classes: heading_class,
- tag: :div
+ classes: header_classes(:actions),
+ tag: :span
)
- )
+ ) { action_row_header_content }
end
end
diff --git a/app/components/op_primer/border_box_table_component.rb b/app/components/op_primer/border_box_table_component.rb
index 1e116079096..f8d447a54b8 100644
--- a/app/components/op_primer/border_box_table_component.rb
+++ b/app/components/op_primer/border_box_table_component.rb
@@ -138,6 +138,10 @@ module OpPrimer
nil
end
+ def action_row_header_content
+ nil
+ end
+
def footer
raise ArgumentError, "Need to provide footer content"
end
diff --git a/app/components/op_primer/border_box_table_component.sass b/app/components/op_primer/border_box_table_component.sass
index 34902845700..8d20b309126 100644
--- a/app/components/op_primer/border_box_table_component.sass
+++ b/app/components/op_primer/border_box_table_component.sass
@@ -23,6 +23,11 @@
&:not(:last-child)
padding-right: 6px
+ &:last-child
+ justify-content: flex-end !important
+ display: flex !important
+ flex-direction: row !important
+
&--mobile-heading,
&--row-label
display: none