<% 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 custom_auto_link(result.result_text.tinymce_render(:text), simple_format: false, tags: %w(img), team: current_team), 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 %>