Files
danbooru/app/views/uploads/_image.html.erb
evazion 950fcdb7b2 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.
2018-09-06 20:43:20 -05:00

20 lines
678 B
Plaintext

<% if params[:url] %>
<% if ImageProxy.needs_proxy?(@source.image_url) %>
<%= image_tag(image_proxy_uploads_path(:url => @source.image_url), :title => "Preview", :id => "image") %>
<% else %>
<%= image_tag(@source.image_url, :title => "Preview", :id => "image") %>
<% end %>
<ul id="upload-image-metadata">
<% if @remote_size %>
<li><strong>Size:</strong> <%= number_to_human_size(@remote_size) %></li>
<% end %>
<% if params[:ref] %>
<li><strong>Referrer:</strong> <%= params[:ref] %></li>
<% end %>
<li><span id="scale"></span> (<%= link_to "toggle size", "#", :id => "image-resize-to-window-link" %>)</li>
</ul>
<% end %>