add iqdb preview
This commit is contained in:
9
app/views/iqdb_queries/preview.html.erb
Normal file
9
app/views/iqdb_queries/preview.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<% if @results.any? %>
|
||||
<h3>Similar</h3>
|
||||
<% @results.each do |match| %>
|
||||
<%= PostPresenter.preview(Post.find(match["post_id"]), :tags => "status:any", :similarity => match["score"]) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<h3>Similar</h3>
|
||||
<p>No matches found</p>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user