scinote-web/app/views/search/results/_experiments.html.erb
2023-06-08 10:33:37 +04:00

42 lines
1.3 KiB
Text

<% results.each do |experiment| %>
<h5>
<i class="sn-icon sn-icon-experiment"></i>
<%= render partial: "search/results/partials/experiment_text.html.erb",
locals: { experiment: experiment, query: search_query } %>
</h5>
<p>
<span>
<%=t 'search.object_id' %>
<%= highlight experiment.code, @search_query.strip.split(/\s+/) %>
</span>
<br>
<span>
<%=t "search.index.created_at" %>
<%=l experiment.created_at, format: :full %>
</span>
<br>
<span>
<%=t "search.index.project" %>
<%= render partial: "search/results/partials/project_text.html.erb",
locals: { project: experiment.project, link_to_page: :show } %>
</span>
<br>
<% if experiment.project.project_folder %>
<span>
<%=t "search.index.folder" %>
<%= render partial: "search/results/partials/project_folders_text.html.erb",
locals: { folder: experiment.project.project_folder } %>
</span>
<br>
<% end %>
<span>
<%=t "search.index.team" %>
<%= render partial: "search/results/partials/team_text.html.erb",
locals: { team: experiment.project.team } %>
</span>
<span data-hook="search-result-experiment"></span>
</p>
<hr>
<% end %>