forked from bofh/fetsite
AutoCommit Don Jun 11 09:03:21 CEST 2015
This commit is contained in:
12
app/views/documents/_search_results.html.erb
Normal file
12
app/views/documents/_search_results.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<ul>
|
||||
<% search_results.hits.each do |hit| %>
|
||||
<li>
|
||||
<% hit.highlights(:name).each do |hlgt| %>
|
||||
<%=puts hlgt.format {|word|} "<b>#{word}</b>" %>
|
||||
<% end %>
|
||||
<% hit.highlights(:text).each do |hlgt| %>
|
||||
<%=%> puts hlgt.format {|word|} "<b>#{word}</b>" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
1
app/views/documents/search.js.erb
Normal file
1
app/views/documents/search.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#searchresults").html("<%=escape_javascript( render :partial=>'documents/search_results', :object=>@results )%>")
|
||||
Reference in New Issue
Block a user