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

[#47018] Replace Bim::IfcModels::TableCell by ViewComponent

Dombi Attilad7599387130a
diff --git a/modules/bim/app/cells/bim/ifc_models/row_cell.rb b/modules/bim/app/components/bim/ifc_models/row_component.rb
similarity index 97%
rename from modules/bim/app/cells/bim/ifc_models/row_cell.rb
rename to modules/bim/app/components/bim/ifc_models/row_component.rb
index dd5f234e600..9e94fbecbe9 100644
--- a/modules/bim/app/cells/bim/ifc_models/row_cell.rb
+++ b/modules/bim/app/components/bim/ifc_models/row_component.rb
@@ -1,10 +1,12 @@
module Bim
module IfcModels
- class RowCell < ::RowCell
+ class RowComponent < ::RowComponent
include ::IconsHelper
include ::AvatarHelper
include ::Redmine::I18n
+ property :created_at
+
def title
if still_processing?
model.title
diff --git a/modules/bim/app/cells/bim/ifc_models/table_cell.rb b/modules/bim/app/components/bim/ifc_models/table_component.rb
similarity index 96%
rename from modules/bim/app/cells/bim/ifc_models/table_cell.rb
rename to modules/bim/app/components/bim/ifc_models/table_component.rb
index 196c71c2949..ab0b2fd1b32 100644
--- a/modules/bim/app/cells/bim/ifc_models/table_cell.rb
+++ b/modules/bim/app/components/bim/ifc_models/table_component.rb
@@ -1,6 +1,6 @@
module Bim
module IfcModels
- class TableCell < ::TableCell
+ class TableComponent < ::TableComponent
include ::IconsHelper
columns :title, :default?, :created_at, :updated_at, :uploader, :processing
diff --git a/modules/bim/app/views/bim/ifc_models/ifc_models/index.html.erb b/modules/bim/app/views/bim/ifc_models/ifc_models/index.html.erb
index 14291b945ae..986945350a5 100644
--- a/modules/bim/app/views/bim/ifc_models/ifc_models/index.html.erb
+++ b/modules/bim/app/views/bim/ifc_models/ifc_models/index.html.erb
@@ -57,4 +57,4 @@ See COPYRIGHT and LICENSE files for more details.
<%= render partial: 'no_default_notice', locals: { project: @project } %>
<% end %>
-<%= rails_cell ::Bim::IfcModels::TableCell, @ifc_models %>
+<%= render ::Bim::IfcModels::TableComponent.new(rows: @ifc_models) %>