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

[#48264] Replace Calendar cells by ViewComponent

Dombi Attilaeb00c8da4e68
diff --git a/modules/calendar/app/cells/calendar/row_cell.rb b/modules/calendar/app/components/calendar/row_component.rb
similarity index 98%
rename from modules/calendar/app/cells/calendar/row_cell.rb
rename to modules/calendar/app/components/calendar/row_component.rb
index ca2b5fad5da..dd62990624e 100644
--- a/modules/calendar/app/cells/calendar/row_cell.rb
+++ b/modules/calendar/app/components/calendar/row_component.rb
@@ -27,7 +27,7 @@
#++
module Calendar
- class RowCell < ::RowCell
+ class RowComponent < ::RowComponent
include ApplicationHelper
include ::Redmine::I18n
diff --git a/modules/calendar/app/cells/calendar/table_cell.rb b/modules/calendar/app/components/calendar/table_component.rb
similarity index 97%
rename from modules/calendar/app/cells/calendar/table_cell.rb
rename to modules/calendar/app/components/calendar/table_component.rb
index d2748fb361c..54af89aa333 100644
--- a/modules/calendar/app/cells/calendar/table_cell.rb
+++ b/modules/calendar/app/components/calendar/table_component.rb
@@ -27,7 +27,7 @@
#++
module Calendar
- class TableCell < ::TableCell
+ class TableComponent < ::TableComponent
options :current_user
columns :name, :created_at
diff --git a/modules/calendar/app/views/calendar/calendars/index.html.erb b/modules/calendar/app/views/calendar/calendars/index.html.erb
index f5cde2f7445..040722f265f 100644
--- a/modules/calendar/app/views/calendar/calendars/index.html.erb
+++ b/modules/calendar/app/views/calendar/calendars/index.html.erb
@@ -41,4 +41,4 @@ See COPYRIGHT and LICENSE files for more details.
<% end %>
<% end %>
-<%= rails_cell ::Calendar::TableCell, @views, current_user: current_user %>
+<%= render ::Calendar::TableComponent.new(rows: @views, current_user: current_user) %>