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
chore[Op#40437]: remove unused constant, touch up formatting
Kabiru Mwenja7b632c319ca8
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 d6aa9ddc56c..adc7832bac0 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,25 +1,32 @@<%=component_wrapper(class: "work-packages-activities-tab-journals-index-component") doflex_layout do |journals_index_wrapper_container|- journals_index_wrapper_container.with_row(classes: "work-packages-activities-tab-journals-index-component--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|+ journals_index_wrapper_container.with_row(+ classes: "work-packages-activities-tab-journals-index-component--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) dorender(- WorkPackages::ActivitiesTab::Journals::EmptyComponent.new()+ WorkPackages::ActivitiesTab::Journals::EmptyComponent.new)endend+journals.each do |journal|journals_index_container.with_row do- render(- WorkPackages::ActivitiesTab::Journals::ItemComponent.new(journal:, filter:)- )+ render(WorkPackages::ActivitiesTab::Journals::ItemComponent.new(journal:, filter:))endendendend- journals_index_wrapper_container.with_row(classes: "work-packages-activities-tab-journals-index-component--stem-connection") unless empty_state? || journal_sorting == "desc"++ unless empty_state? || journal_sorting_desc?+ journals_index_wrapper_container+ .with_row(classes: "work-packages-activities-tab-journals-index-component--stem-connection")+ endendend%>diff --git a/app/components/work_packages/activities_tab/journals/index_component.rb b/app/components/work_packages/activities_tab/journals/index_component.rbindex 3e503df4334..ecacf00f175 100644--- a/app/components/work_packages/activities_tab/journals/index_component.rb+++ b/app/components/work_packages/activities_tab/journals/index_component.rb@@ -59,6 +59,10 @@ module WorkPackagesUser.current.preference&.comments_sorting || "desc"end+ def journal_sorting_desc?+ journal_sorting == "desc"+ end+def journalswork_package.journals.includes(:user, :notifications).reorder(version: journal_sorting)end@@ -72,7 +76,7 @@ module WorkPackagesenddef inner_container_margin_bottom- if journal_sorting == "desc"+ if journal_sorting_desc?3else0diff --git a/app/components/work_packages/activities_tab/journals/item_component/add_reactions.html.erb b/app/components/work_packages/activities_tab/journals/item_component/add_reactions.html.erbindex e451fae6786..2860b93aaba 100644--- a/app/components/work_packages/activities_tab/journals/item_component/add_reactions.html.erb+++ b/app/components/work_packages/activities_tab/journals/item_component/add_reactions.html.erb@@ -2,11 +2,11 @@component_wrapper doif journal.available_emoji_reactions.any?render(Primer::Alpha::Overlay.new(- title: I18n.t("reactions.action_title"),- padding: :condensed,- anchor_side: :outside_top,- visually_hide_title: true- )) do |d|+ title: I18n.t("reactions.action_title"),+ padding: :condensed,+ anchor_side: :outside_top,+ visually_hide_title: true+ )) do |d|d.with_show_button(icon: "smiley","aria-label": I18n.t("reactions.add_reaction"),@@ -20,13 +20,13 @@journal.available_emoji_reactions.each do |emoji, reaction|add_reactions_container.with_column(mr: 2) dorender(Primer::Beta::Button.new(- scheme: :invisible,- id: "#{journal.id}-#{reaction}",- tag: :a,- href: toggle_reaction_work_package_activity_path(journal.journable.id, id: journal.id, reaction:),- data: { "turbo-stream": true, "turbo-method": :put },- "aria-label": I18n.t("reactions.react_with", reaction: reaction.tr("_", "")),- )) do+ scheme: :invisible,+ id: "#{journal.id}-#{reaction}",+ tag: :a,+ href: toggle_reaction_work_package_activity_path(journal.journable.id, id: journal.id, reaction:),+ data: { "turbo-stream": true, "turbo-method": :put },+ "aria-label": I18n.t("reactions.react_with", reaction: reaction.tr("_", ""))+ )) doemojiendenddiff --git a/app/components/work_packages/activities_tab/journals/item_component/reactions.rb b/app/components/work_packages/activities_tab/journals/item_component/reactions.rbindex 6d4637c4dbf..c8e74f9c7b2 100644--- a/app/components/work_packages/activities_tab/journals/item_component/reactions.rb+++ b/app/components/work_packages/activities_tab/journals/item_component/reactions.rb@@ -30,8 +30,6 @@ module WorkPackagesmodule ActivitiesTabmodule Journalsclass ItemComponent::Reactions < ApplicationComponent- MAX_DISPLAYED_USERS_COUNT = 5-include ApplicationHelperinclude OpPrimer::ComponentHelpersinclude OpTurbo::Streamable