Skip to content
Snippets Groups Projects
Commit e12e3222 authored by smayer's avatar smayer
Browse files

Update dataset views for including text content of articles and compound articles

parent 2ba47b8a
No related branches found
No related tags found
1 merge request!2Merging development into onb as preparation for Annolyzer release
......@@ -3,15 +3,13 @@
data-action="click->dataset#toggleResultSelection"
data-doc-id="<%= doc.id %>">
<h5>
<%
if doc.is_a?(Article)
url = "/catalog/#{doc.issue_id}?selected=#{doc.id}"
<% if doc.is_a?(Article)
url = "/catalog/#{doc.issue_id}?selected=#{doc.id}"
elsif doc.is_a?(CompoundArticle)
url = "/catalog/#{doc.issue_id}?selected_compound=#{doc.id}"
url = "/catalog/#{doc.issue_id}?selected_compound=#{doc.id}"
else
url = "/catalog/#{doc.id}"
end
%>
url = "/catalog/#{doc.id}"
end %>
<a href="<%= url %>">
<span class="doc_index"><%= doc_index %>.</span>
<%= doc.is_a?(Article) ? doc.id : doc.title %>
......@@ -30,9 +28,9 @@
</div>
<div class="col-4">
<% if !highlight.nil? and !highlight.first.nil? %>
<% highlight.first[1].each do |extract| %>
<p>...<%= extract.gsub(/\n/,'<br/>').gsub('<br/><br/>','<br/>').html_safe %>...</p>
<% end %>
<%# highlight.first[1].each do |extract| %>
<p><%= highlight unless doc.is_a?(Issue) %><%#= extract.gsub(/\n/, "<br/>").gsub("<br/><br/>", "<br/>").html_safe %></p>
<%# end %>
<% end %>
</div>
<div class="col-4">
......
<div class="list-group list-group-flush w-100">
<% docs.each_with_index do |doc, idx| %>
<%# Highlight will be used when searching into a dataset %>
<%= render partial: "document", locals: {doc: doc, highlight: nil, doc_index: (pagenum-1) * rows + idx + 1} %>
<%= render partial: "document", locals: { doc: doc, highlight: doc.all_text, doc_index: (pagenum - 1) * rows + idx + 1 } %>
<hr/>
<% end %>
</div>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment