This commit is contained in:
r888888888
2014-05-21 18:02:06 -07:00
committed by Toks
parent b194935bde
commit 5f29ef5557
4 changed files with 16 additions and 23 deletions

View File

@@ -1,9 +0,0 @@
<% if @results.any? %>
<h3>Similar</h3>
<% @results.each do |match| %>
<%= PostPresenter.preview(Post.find(match.post_id)) %>
<% end %>
<% else %>
<h3>Similar</h3>
<p>No matches found</p>
<% end %>

View File

@@ -0,0 +1,10 @@
var html = '';
<% if @results.any? %>
<% @results.each do |match| %>
html += '<%= j PostPresenter.preview(Post.find(match.post_id)) %>';
<% end %>
<% else %>
html += '<p>No matches found</p>';
<% end %>
$("<div></div>").html(html).dialog({title: "Similar Posts", modal: true, width: "600px"});

View File

@@ -62,6 +62,10 @@
<%= button_tag "Artist", :id => "find-artist-button", :type => "button" %>
</div>
<% if Danbooru.config.iqdb_hostname_and_port %>
<div class="input" id="iqdb-similar" style="display: none;"></div>
<% end %>
<div class="input">
<div>
<%= f.label :tag_string, "Tags" %>