fixes #3306
This commit is contained in:
@@ -50,6 +50,12 @@ class PostPresenter < Presenter
|
|||||||
html << %{</p>}
|
html << %{</p>}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if options[:similarity]
|
||||||
|
html << %{<p class="desc">}
|
||||||
|
html << "Similarity: " + options[:similarity].to_s
|
||||||
|
html << %{</p>}
|
||||||
|
end
|
||||||
|
|
||||||
if options[:size]
|
if options[:size]
|
||||||
html << %{<p class="desc">}
|
html << %{<p class="desc">}
|
||||||
html << post.file_size.to_formatted_s(:human_size)
|
html << post.file_size.to_formatted_s(:human_size)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<% if @results.any? %>
|
<% if @results.any? %>
|
||||||
<h3>Similar</h3>
|
<h3>Similar</h3>
|
||||||
<% @results.each do |match| %>
|
<% @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 %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<h3>Similar</h3>
|
<h3>Similar</h3>
|
||||||
|
|||||||
Reference in New Issue
Block a user