uploads: add new source:<url> dupe check (fix #3873)
* On the /uploads/new page, instead of just showing a "This post has probably already been uploaded" message, show the actual thumbnails of posts having the same source as what the user is trying to upload. * Move the iqdb results section up top, beside the related posts section.
This commit is contained in:
27
app/views/uploads/_related_posts.html.erb
Normal file
27
app/views/uploads/_related_posts.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<%# source %>
|
||||
|
||||
<% if source.present? && source.related_posts.present? %>
|
||||
<div id="related-posts-by-source">
|
||||
<h3>Related Posts</h3>
|
||||
|
||||
<p class="hint">
|
||||
Found <%= link_to pluralize(source.related_posts.total_count, "other post"), posts_path(tags: source.related_posts_search_query) %> from the same source:
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<% source.related_posts.each do |post| %>
|
||||
<%= PostPresenter.preview(post, show_deleted: true, size: true) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if Danbooru.config.iqdbs_server %>
|
||||
<% if params[:url] %>
|
||||
<div class="input" id="iqdb-similar">
|
||||
<p><em>Loading similar...</em></p>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="input" id="iqdb-similar" style="display: none;"></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user