<% results.each do |result| %>
<% if result.is_text %> <% elsif result.is_table %> <% else %> <% if result.asset.is_image? %> <% else %> <% end %> <% end %> <%= render partial: "search/results/partials/result_text.html.erb", locals: { result: result, query: search_query, target: nil } %>
<% if result.is_text && result.result_text.text.present? && !result.result_text.text.empty? %>

<%= highlight(sanitize_input(result.result_text.text), search_query.strip.split(/\s+/)) %>

<% end %>

<%=t "search.index.created_at" %> <%=l result.created_at, format: :full %>
<%=t "search.index.module" %> <%= render partial: "search/results/partials/my_module_text.html.erb", locals: { my_module: result.my_module } %>
<%=t "search.index.experiment" %> <%= render partial: "search/results/partials/experiment_text.html.erb", locals: { experiment: result.my_module.experiment } %>
<%=t "search.index.project" %> <%= render partial: "search/results/partials/project_text.html.erb", locals: { project: result.my_module.experiment.project, link_to_page: :show } %>
<%=t "search.index.team" %> <%= render partial: "search/results/partials/team_text.html.erb", locals: { team: result.my_module.experiment.project.team } %>


<% end %>