support json for iqdb query actions
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
var html = '';
|
||||
<% if @results.any? %>
|
||||
<% @results.each do |match| %>
|
||||
html += '<%= j PostPresenter.preview(match[:post], :tags => "status:any") %>';
|
||||
<% end %>
|
||||
<% else %>
|
||||
html += '<p>No matches found</p>';
|
||||
<% end %>
|
||||
|
||||
$("<div></div>").html(html).dialog({title: "Similar Posts", modal: true, width: "600px"});
|
||||
@@ -1,9 +0,0 @@
|
||||
<% if @results.any? %>
|
||||
<h3>Similar</h3>
|
||||
<% @results.each do |match| %>
|
||||
<%= PostPresenter.preview(match[:post], :tags => "status:any", :size => true, :similarity => match[:score]) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<h3>Similar</h3>
|
||||
<p>No matches found</p>
|
||||
<% end %>
|
||||
3
app/views/iqdb_queries/show.json.erb
Normal file
3
app/views/iqdb_queries/show.json.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<% if @matches %>
|
||||
<%= raw @matches.to_json %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user