Merge pull request #3479 from BrokenEagle/feat-add-iqdb-page
Initial add of IQDB standalone page
This commit is contained in:
34
app/views/iqdb_queries/check.html.erb
Normal file
34
app/views/iqdb_queries/check.html.erb
Normal file
@@ -0,0 +1,34 @@
|
||||
<div id="c-iqdb-queries">
|
||||
<div id="a-check">
|
||||
<h1>IQDB Queries</h1>
|
||||
<section>
|
||||
<%= form_tag(check_iqdb_queries_path, :method => :get, :class => "simple_form inline-form" ) do %>
|
||||
<div class="input string optional">
|
||||
<%= label_tag "url", "URL", class: "string optional" %>
|
||||
<%= text_field_tag "url", params[:url] %>
|
||||
</div>
|
||||
<div class="input string optional">
|
||||
<%= label_tag "post_id", "Post ID", class: "string optional" %>
|
||||
<%= text_field_tag "post_id", params[:post_id] %>
|
||||
</div>
|
||||
<%= submit_tag "Check" %>
|
||||
<% end %>
|
||||
</section>
|
||||
<% if params[:url].present? || params[:post_id].present? %>
|
||||
<section>
|
||||
<h2>Similar results</h2>
|
||||
<% if @results.any? %>
|
||||
<% @results.each do |match| %>
|
||||
<%= PostPresenter.preview(match[:post], :tags => "status:any", :size => true, :similarity => match[:score]) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p>No matches found</p>
|
||||
<% end %>
|
||||
</section>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
IQDB Queries - <%= Danbooru.config.app_name %>
|
||||
<% end %>
|
||||
@@ -28,6 +28,7 @@
|
||||
<li><%= link_to("Keyboard Shortcuts", keyboard_shortcuts_path) %></li>
|
||||
<li><%= link_to("Bookmarklet", bookmarklet_path) %></li>
|
||||
<li><%= link_to("API Documentation", wiki_pages_path(:title => "help:api")) %></li>
|
||||
<li><%= link_to("IQDB Queries", check_iqdb_queries_path) %></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><h1>Artists</h1></li>
|
||||
|
||||
Reference in New Issue
Block a user