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
refactored and fixed stem behaviour for filter states
Jonas Jabari64c6494e3afb
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.erbindex f58f5604129..b61c695ab05 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@@ -4,7 +4,7 @@journals_index_wrapper_container.with_row(id: "wp-journals-inner-container") doflex_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) do+ journals_index_container.with_row(mt: 2, mb: 3) dorender(WorkPackages::ActivitiesTab::Journals::EmptyComponent.new())diff --git a/app/components/work_packages/activities_tab/journals/item_component/details.html.erb b/app/components/work_packages/activities_tab/journals/item_component/details.html.erbindex 5d142053342..2740ce426bc 100644--- a/app/components/work_packages/activities_tab/journals/item_component/details.html.erb+++ b/app/components/work_packages/activities_tab/journals/item_component/details.html.erb@@ -1,26 +1,31 @@-<%=- component_wrapper(class: "work-packages-activities-tab-journals-item-component-details") do- if journal.details.any? && filter != :only_comments+<%= component_wrapper(class: "work-packages-activities-tab-journals-item-component-details") do+ case filter+ when :only_comments+ flex_layout(my: 0, border: :left, classes: "journal-details-container") do |details_container|+ render_empty_line(details_container) unless journal.initial?+ end+ when :only_changes+ if journal.details.any?flex_layout(my: 0, border: :left, classes: "journal-details-container") do |details_container|- if journal.notes.present? && filter != :only_changes+ render_details_header(details_container)+ render_details(details_container)+ end+ end+ else # :all or any other state+ flex_layout(my: 0, border: :left, classes: "journal-details-container") do |details_container|+ if journal.details.any?+ if journal.notes.present?render_details(details_container)elserender_details_header(details_container)render_details(details_container)end- end- elsif journal.details.empty?- unless filter == :only_changes- flex_layout(my: 0, border: :left, classes: "journal-details-container journal-details-container--empty--#{journal_sorting}") do |details_container|- # empty row to render the flex layout with its minimal height- render_empty_line(details_container)- end- end- else- flex_layout(my: 0, border: :left, classes: "journal-details-container journal-details-container--empty--#{journal_sorting}") do |details_container|+ elsif journal.notes.present?+ render_details(details_container)+ else# empty row to render the flex layout with its minimal heightrender_empty_line(details_container)endendend-%>+end %>\ No newline at end of file