diff --git a/app/controllers/my_module_repositories_controller.rb b/app/controllers/my_module_repositories_controller.rb index e33bb5003..b7fddcaed 100644 --- a/app/controllers/my_module_repositories_controller.rb +++ b/app/controllers/my_module_repositories_controller.rb @@ -28,13 +28,13 @@ class MyModuleRepositoriesController < ApplicationController if params[:simple_view] repository_rows = datatable_service.repository_rows - rows_view = 'repository_rows/simple_view_index.json' + rows_view = 'repository_rows/simple_view_index' else repository_rows = datatable_service.repository_rows .preload(:repository_columns, :created_by, repository_cells: { value: @repository.cell_preload_includes }) - rows_view = 'repository_rows/index.json' + rows_view = 'repository_rows/index' end @repository_rows = repository_rows.page(page).per(per_page) diff --git a/app/controllers/my_module_tags_controller.rb b/app/controllers/my_module_tags_controller.rb index ec2ab3f5e..03fa281cd 100644 --- a/app/controllers/my_module_tags_controller.rb +++ b/app/controllers/my_module_tags_controller.rb @@ -13,7 +13,7 @@ class MyModuleTagsController < ApplicationController render json: { my_module: @my_module, - html: render_to_string(partial: 'index_edit.html.erb') + html: render_to_string(partial: 'index_edit', formats: :html) } end diff --git a/app/controllers/my_modules_controller.rb b/app/controllers/my_modules_controller.rb index 5722ccb57..eb03381ed 100644 --- a/app/controllers/my_modules_controller.rb +++ b/app/controllers/my_modules_controller.rb @@ -199,27 +199,33 @@ class MyModulesController < ApplicationController status: :ok, start_date_label: render_to_string( partial: 'my_modules/start_date_label', + formats: :html, locals: { my_module: @my_module, start_date_editable: true } ), due_date_label: render_to_string( partial: 'my_modules/due_date_label', + formats: :html, locals: { my_module: @my_module, due_date_editable: true } ), card_due_date_label: render_to_string( partial: 'my_modules/card_due_date_label', + formats: :html, locals: { my_module: @my_module } ), table_due_date_label: { html: render_to_string(partial: 'experiments/table_due_date_label', + formats: :html, locals: { my_module: @my_module, user: current_user }), due_status: my_module_due_status(@my_module) }, module_header_due_date: render_to_string( partial: 'my_modules/module_header_due_date', + formats: :html, locals: { my_module: @my_module } ), description_label: render_to_string( partial: 'my_modules/description_label', + formats: :html, locals: { my_module: @my_module } ), alerts: alerts diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index 148d9f271..512abc047 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -338,6 +338,7 @@ class ProtocolsController < ApplicationController render json: { message: t('my_modules.protocols.copy_to_repository_modal.success_message') } end end + format.html end end diff --git a/app/helpers/comment_helper.rb b/app/helpers/comment_helper.rb index 091630116..b6f653cdb 100644 --- a/app/helpers/comment_helper.rb +++ b/app/helpers/comment_helper.rb @@ -45,7 +45,7 @@ module CommentHelper render json: { html: render_to_string( - partial: "/shared/comments/#{partial}.html.erb", + partial: "shared/comments/#{partial}", locals: { comment: comment, skip_header: false diff --git a/app/views/my_module_tags/_index_edit.html.erb b/app/views/my_module_tags/_index_edit.html.erb index 1a969caa1..32edec205 100644 --- a/app/views/my_module_tags/_index_edit.html.erb +++ b/app/views/my_module_tags/_index_edit.html.erb @@ -36,7 +36,7 @@ <%= f.text_field :name, hide_label: true %>
- <%= render partial: 'shared/color_picker_select.erb', + <%= render partial: 'shared/color_picker_select', locals: { name: :color, colors: Constants::TAG_COLORS, classes: "edit-tag-color", styles: "", object_name: :tag} %> diff --git a/app/views/protocols/index/_new_protocol_modal.html.erb b/app/views/protocols/index/_new_protocol_modal.html.erb index d7af0698f..e8153f382 100644 --- a/app/views/protocols/index/_new_protocol_modal.html.erb +++ b/app/views/protocols/index/_new_protocol_modal.html.erb @@ -1,5 +1,8 @@