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

fixed margin bottom for desc sorting

Jonas Jabari077593fd727f
diff --git a/app/components/work_packages/activities_tab/journals/index_component.html.erb b/app/components/work_packages/activities_tab/journals/index_component.html.erb
index b61c695ab05..c600de950ba 100644
--- a/app/components/work_packages/activities_tab/journals/index_component.html.erb
+++ b/app/components/work_packages/activities_tab/journals/index_component.html.erb
@@ -1,7 +1,7 @@
<%=
component_wrapper do
flex_layout do |journals_index_wrapper_container|
- journals_index_wrapper_container.with_row(id: "wp-journals-inner-container") do
+ journals_index_wrapper_container.with_row(id: "wp-journals-inner-container", mb: inner_container_margin_bottom) do
flex_layout(id: insert_target_modifier_id, data: { "test_selector": "op-wp-journals-container" }) do |journals_index_container|
if empty_state?
journals_index_container.with_row(mt: 2, mb: 3) do
diff --git a/app/components/work_packages/activities_tab/journals/index_component.rb b/app/components/work_packages/activities_tab/journals/index_component.rb
index bcb49534532..3e503df4334 100644
--- a/app/components/work_packages/activities_tab/journals/index_component.rb
+++ b/app/components/work_packages/activities_tab/journals/index_component.rb
@@ -70,6 +70,14 @@ module WorkPackages
def empty_state?
filter == :only_comments && journal_with_notes.empty?
end
+
+ def inner_container_margin_bottom
+ if journal_sorting == "desc"
+ 3
+ else
+ 0
+ end
+ end
end
end
end