This commit is contained in:
r888888888
2017-11-17 14:28:16 -08:00
parent 015db0467c
commit 42c9c71a5f
2 changed files with 7 additions and 1 deletions

View File

@@ -50,6 +50,12 @@ class PostPresenter < Presenter
html << %{</p>}
end
if options[:similarity]
html << %{<p class="desc">}
html << "Similarity: " + options[:similarity].to_s
html << %{</p>}
end
if options[:size]
html << %{<p class="desc">}
html << post.file_size.to_formatted_s(:human_size)

View File

@@ -1,7 +1,7 @@
<% if @results.any? %>
<h3>Similar</h3>
<% @results.each do |match| %>
<%= PostPresenter.preview(match[:post], :tags => "status:any", :size => true) %>
<%= PostPresenter.preview(match[:post], :tags => "status:any", :size => true, :similarity => match[:score]) %>
<% end %>
<% else %>
<h3>Similar</h3>