scinote-web/app/views/search/results/_projects.html.erb
2023-06-21 14:38:32 +02:00

36 lines
1 KiB
Text

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