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
[#48267] Replace Two factor authentication cells by ViewComponent
Dombi Attilaa021ede33cd0
diff --git a/modules/two_factor_authentication/app/cells/two_factor_authentication/devices/row_cell.rb b/modules/two_factor_authentication/app/components/two_factor_authentication/devices/row_component.rbsimilarity index 98%rename from modules/two_factor_authentication/app/cells/two_factor_authentication/devices/row_cell.rbrename to modules/two_factor_authentication/app/components/two_factor_authentication/devices/row_component.rbindex 905d31ca7a8..ddbc804f1a3 100644--- a/modules/two_factor_authentication/app/cells/two_factor_authentication/devices/row_cell.rb+++ b/modules/two_factor_authentication/app/components/two_factor_authentication/devices/row_component.rb@@ -1,6 +1,6 @@module ::TwoFactorAuthenticationmodule Devices- class RowCell < ::RowCell+ class RowComponent < ::RowComponentinclude ::IconsHelperinclude ::PasswordHelperdiff --git a/modules/two_factor_authentication/app/cells/two_factor_authentication/devices/table_cell.rb b/modules/two_factor_authentication/app/components/two_factor_authentication/devices/table_component.rbsimilarity index 97%rename from modules/two_factor_authentication/app/cells/two_factor_authentication/devices/table_cell.rbrename to modules/two_factor_authentication/app/components/two_factor_authentication/devices/table_component.rbindex cb95246dedf..f1d88e391ab 100644--- a/modules/two_factor_authentication/app/cells/two_factor_authentication/devices/table_cell.rb+++ b/modules/two_factor_authentication/app/components/two_factor_authentication/devices/table_component.rb@@ -1,6 +1,6 @@module ::TwoFactorAuthenticationmodule Devices- class TableCell < ::TableCell+ class TableComponent < ::TableComponentoptions :admin_tablecolumns :device_type, :default, :confirmeddiff --git a/modules/two_factor_authentication/app/views/two_factor_authentication/my/two_factor_devices/index.html.erb b/modules/two_factor_authentication/app/views/two_factor_authentication/my/two_factor_devices/index.html.erbindex b713eba3722..d515bc645b1 100644--- a/modules/two_factor_authentication/app/views/two_factor_authentication/my/two_factor_devices/index.html.erb+++ b/modules/two_factor_authentication/app/views/two_factor_authentication/my/two_factor_devices/index.html.erb@@ -44,7 +44,7 @@<section class="account--section"><h2><%= t 'two_factor_authentication.label_devices' %></h2>- <%= rails_cell ::TwoFactorAuthentication::Devices::TableCell, @two_factor_devices, admin_table: false %>+ <%= render ::TwoFactorAuthentication::Devices::TableComponent.new(rows: @two_factor_devices, admin_table: false) %></section><section class="account--section">diff --git a/modules/two_factor_authentication/app/views/users/_two_factor_authentication_admin.html.erb b/modules/two_factor_authentication/app/views/users/_two_factor_authentication_admin.html.erbindex ff8a4a42075..01b46eff98d 100644--- a/modules/two_factor_authentication/app/views/users/_two_factor_authentication_admin.html.erb+++ b/modules/two_factor_authentication/app/views/users/_two_factor_authentication_admin.html.erb@@ -55,6 +55,6 @@<% end %><% end %>- <%= rails_cell ::TwoFactorAuthentication::Devices::TableCell, devices, admin_table: true || @user != User.current %>+ <%= render ::TwoFactorAuthentication::Devices::TableComponent.new(rows: devices, admin_table: true || @user != User.current) %></div></section>