mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 12:16:06 +08:00
55 lines
1.8 KiB
Text
55 lines
1.8 KiB
Text
<% results.each do |checklist| %>
|
|
<h5>
|
|
<span class="glyphicon glyphicon-check"></span>
|
|
<%= highlight checklist.name, search_query.strip.split(/\s+/) %>
|
|
</h5>
|
|
|
|
<% if checklist.checklist_items.count > 0 %>
|
|
<div class="well well-sm well-search-checklist">
|
|
<ul class="list-unstyled">
|
|
<% checklist.checklist_items.each do |item| %>
|
|
<li>
|
|
<input type="checkbox" disabled="disabled">
|
|
<%= highlight item.text, search_query.strip.split(/\s+/) %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
|
|
<p>
|
|
<span>
|
|
<%=t "search.index.created_at" %>
|
|
<%=l checklist.created_at, format: :full %>
|
|
</span>
|
|
<br>
|
|
<span>
|
|
<%=t "search.index.step" %>
|
|
<%= render partial: "search/results/partials/step_text.html.erb", locals: { step: checklist.step } %>
|
|
</span>
|
|
<br>
|
|
<% if checklist.step.protocol.in_module? %>
|
|
<span>
|
|
<%=t "search.index.module" %>
|
|
<%= render partial: "search/results/partials/my_module_text.html.erb", locals: { my_module: checklist.step.protocol.my_module } %>
|
|
</span>
|
|
<br>
|
|
<span>
|
|
<%=t "search.index.project" %>
|
|
<%= render partial: "search/results/partials/project_text.html.erb", locals: { project: checklist.step.protocol.my_module.project } %>
|
|
</span>
|
|
<% else %>
|
|
<span>
|
|
<%=t "search.index.protocol" %>
|
|
<%= render partial: "search/results/partials/protocol_text.html.erb", locals: { protocol: checklist.step.protocol, query: search_query } %>
|
|
</span>
|
|
<% end %>
|
|
<br>
|
|
<span>
|
|
<%=t "search.index.organization" %>
|
|
<%= render partial: "search/results/partials/organization_text.html.erb", locals: { organization: checklist.step.protocol.organization } %>
|
|
</span>
|
|
</p>
|
|
|
|
<hr>
|
|
<% end %>
|