mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 05:05:55 +08:00
5f9c04844f
* Added prefixed IDs to repository rows (items) [SCI-5909] * Fix prefixed id queries to work with joins, use subquery in repository search [SCI-5909] * Fixed accessing repository_row parent code [SCI-5909] * Better handling of repository_row code display [SCI-5909] * Fix index warning for id prefixed models issue setting up project [SCI-5909]
57 lines
1.7 KiB
Text
57 lines
1.7 KiB
Text
<% results.each do |repository_row| %>
|
|
<h5>
|
|
<i class="fas fa-list-alt"></i>
|
|
<%=t "search.index.repositories.repository_row" %>
|
|
<%= highlight repository_row.name, search_query.strip.split(/\s+/) %>
|
|
</h5>
|
|
|
|
<p>
|
|
<span>
|
|
<%=t 'repository_row.modal_info.ID' %>
|
|
<%= repository_row.code %>
|
|
</span>
|
|
<br />
|
|
<span>
|
|
<%=t "search.index.repositories.added_on" %>
|
|
<%=l repository_row.created_at, format: :full %>
|
|
</span>
|
|
<br>
|
|
<span>
|
|
<%=t "search.index.repositories.added_by" %>
|
|
<%= highlight repository_row.created_by.full_name, search_query.strip.split(/\s+/) %>
|
|
</span>
|
|
<br>
|
|
<% repository_row.repository_cells.each do |cell| %>
|
|
<span>
|
|
<%=t "search.index.repositories.custom_column", column: cell.repository_column.name %>
|
|
<%= highlight cell.value.formatted, search_query.strip.split(/\s+/) %>
|
|
</span>
|
|
<br>
|
|
<% end %>
|
|
</p>
|
|
|
|
<p>
|
|
<span>
|
|
<%=t "search.index.modules" %>
|
|
<% if repository_row.my_modules.any? %>
|
|
<% repository_row.my_modules.each_with_index do |mod, i| %>
|
|
<%= render partial: "search/results/partials/my_module_text.html.erb",
|
|
locals: { my_module: mod, link_to_page: :repositories, repository: repository } %>
|
|
<% if i != repository_row.my_modules.count - 1 %>
|
|
,
|
|
<% end %>
|
|
<% end %>
|
|
<% else %>
|
|
<em><%=t "search.index.repositories.no_modules" %></em>
|
|
<% end %>
|
|
</span>
|
|
<br>
|
|
<span>
|
|
<%=t "search.index.team" %>
|
|
<%= render partial: "search/results/partials/team_text.html.erb",
|
|
locals: { team: repository.team } %>
|
|
</span>
|
|
</p>
|
|
|
|
<hr>
|
|
<% end %>
|