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

[#47024] Replace TeamPlanner cells by ViewComponent

Dombi Attila1b78e44ec5b8
diff --git a/modules/team_planner/app/cells/team_planner/row_cell.rb b/modules/team_planner/app/components/team_planner/row_component.rb
similarity index 98%
rename from modules/team_planner/app/cells/team_planner/row_cell.rb
rename to modules/team_planner/app/components/team_planner/row_component.rb
index ab430452522..71eb937700c 100644
--- a/modules/team_planner/app/cells/team_planner/row_cell.rb
+++ b/modules/team_planner/app/components/team_planner/row_component.rb
@@ -27,7 +27,7 @@
#++
module TeamPlanner
- class RowCell < ::RowCell
+ class RowComponent < ::RowComponent
include ApplicationHelper
include ::Redmine::I18n
diff --git a/modules/team_planner/app/cells/team_planner/table_cell.rb b/modules/team_planner/app/components/team_planner/table_component.rb
similarity index 97%
rename from modules/team_planner/app/cells/team_planner/table_cell.rb
rename to modules/team_planner/app/components/team_planner/table_component.rb
index 73814bafea8..c2ab05baf1c 100644
--- a/modules/team_planner/app/cells/team_planner/table_cell.rb
+++ b/modules/team_planner/app/components/team_planner/table_component.rb
@@ -27,7 +27,7 @@
#++
module TeamPlanner
- class TableCell < ::TableCell
+ class TableComponent < ::TableComponent
options :current_user
columns :name, :assignees, :created_at
diff --git a/modules/team_planner/app/views/team_planner/team_planner/index.html.erb b/modules/team_planner/app/views/team_planner/team_planner/index.html.erb
index e8feb0ce83f..624d912e16f 100644
--- a/modules/team_planner/app/views/team_planner/team_planner/index.html.erb
+++ b/modules/team_planner/app/views/team_planner/team_planner/index.html.erb
@@ -13,4 +13,4 @@
<% end %>
<% end %>
-<%= rails_cell ::TeamPlanner::TableCell, @views, current_user: current_user %>
\ No newline at end of file
+<%= render ::TeamPlanner::TableComponent.new(rows: @views, current_user: current_user) %>
\ No newline at end of file