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
minor adjustments towards resource injection, not restricting the editor type
Jonas Jabari78ca627db506
diff --git a/app/components/work_packages/activities_tab/journals/item_component/edit.html.erb b/app/components/work_packages/activities_tab/journals/item_component/edit.html.erbindex 0e17f8952e1..3fae4360c28 100644--- a/app/components/work_packages/activities_tab/journals/item_component/edit.html.erb+++ b/app/components/work_packages/activities_tab/journals/item_component/edit.html.erb@@ -10,7 +10,7 @@) do |f|flex_layout do |form_container|form_container.with_row do- render(WorkPackages::ActivitiesTab::Journals::NotesForm.new(f, journal:))+ render(WorkPackages::ActivitiesTab::Journals::NotesForm.new(f))endform_container.with_row(flex_layout: true, mt: 3, justify_content: :flex_end) do |submit_container|submit_container.with_column(mr: 2) dodiff --git a/app/components/work_packages/activities_tab/journals/new_component.html.erb b/app/components/work_packages/activities_tab/journals/new_component.html.erbindex f14375d05a8..42ff11c03bc 100644--- a/app/components/work_packages/activities_tab/journals/new_component.html.erb+++ b/app/components/work_packages/activities_tab/journals/new_component.html.erb@@ -41,7 +41,7 @@) do |f|flex_layout(justify_content: :space_between, align_items: :flex_end) do |form_container|form_container.with_column(id: "ck-editor-column", mr: 2) do- render(WorkPackages::ActivitiesTab::Journals::NotesForm.new(f, journal:))+ render(WorkPackages::ActivitiesTab::Journals::NotesForm.new(f))endform_container.with_column dorender(Primer::Beta::IconButton.new(diff --git a/app/forms/work_packages/activities_tab/journals/notes_form.rb b/app/forms/work_packages/activities_tab/journals/notes_form.rbindex f76ba4ede8b..9d28b86b8ba 100644--- a/app/forms/work_packages/activities_tab/journals/notes_form.rb+++ b/app/forms/work_packages/activities_tab/journals/notes_form.rb@@ -27,6 +27,8 @@#++module WorkPackages::ActivitiesTab::Journalsclass NotesForm < ApplicationForm+ delegate :object, to: :@builder+form do |notes_form|notes_form.rich_text_area(name: :notes,@@ -34,21 +36,18 @@ module WorkPackages::ActivitiesTab::Journalsrich_text_options: {showAttachments: false,macros: "none",- resource:,- editorType: "constrained"+ resource:})end- def initialize(journal:)- @journal = journal- end-privatedef resource+ return unless object+API::V3::Activities::ActivityRepresenter- .new(@journal, current_user: User.current, embed_links: false)+ .new(object, current_user: User.current, embed_links: false)endendend