From 2d5c400f9b6b58cd4531b8f51b0cad80a3e74b42 Mon Sep 17 00:00:00 2001 From: Kat <54268893+kosiakkatrina@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:16:40 +0000 Subject: [PATCH] More lint --- app/views/rails_admin/main/index.html.erb | 35 +++++++++++------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/app/views/rails_admin/main/index.html.erb b/app/views/rails_admin/main/index.html.erb index 948859826..7c4254c81 100644 --- a/app/views/rails_admin/main/index.html.erb +++ b/app/views/rails_admin/main/index.html.erb @@ -1,20 +1,19 @@ -query = params[:query] - params = request.params.except(:authenticity_token, :action, :controller, :utf8, :bulk_export) - params.delete(:query) if params[:query].blank? - params.delete(:sort_reverse) unless params[:sort_reverse] == "true" - sort_reverse = params[:sort_reverse] - sort = params[:sort] - params.delete(:sort) if params[:sort] == @model_config.list.sort_by.to_s - export_action = RailsAdmin::Config::Actions.find(:export, { controller: controller, abstract_model: @abstract_model }) - export_action = nil unless export_action && authorized?(export_action.authorization_key, @abstract_model) - description = RailsAdmin.config(@abstract_model.model_name).description - properties = @model_config.list.with(controller: controller, view: self, object: @abstract_model.model.new).fields_for_table - checkboxes = @model_config.list.checkboxes? - table_table_header_count = begin - count = checkboxes ? 1 : 0 - count += properties.count - end -%> +<% query = params[:query] %> +<% params = request.params.except(:authenticity_token, :action, :controller, :utf8, :bulk_export) %> +<% params.delete(:query) if params[:query].blank? %> +<% params.delete(:sort_reverse) unless params[:sort_reverse] == "true" %> +<% sort_reverse = params[:sort_reverse] %> +<% sort = params[:sort] %> +<% params.delete(:sort) if params[:sort] == @model_config.list.sort_by.to_s %> +<% export_action = RailsAdmin::Config::Actions.find(:export, { controller:, abstract_model: @abstract_model }) %> +<% export_action = nil unless export_action && authorized?(export_action.authorization_key, @abstract_model) %> +<% description = RailsAdmin.config(@abstract_model.model_name).description %> +<% properties = @model_config.list.with(controller:, view: self, object: @abstract_model.model.new).fields_for_table %> +<% checkboxes = @model_config.list.checkboxes? %> +<% table_table_header_count = begin + count = checkboxes ? 1 : 0 + count += properties.count + end %> <% content_for :contextual_tabs do %> <% if filterable_fields.present? %> @@ -57,7 +56,7 @@ query = params[:query]
- " type="search" value="<%= query %>"> + " type="search" value="<%= query %>" autocomplete="off">