Merge pull request #3373 from evazion/fix-3368

Fix #3368: "Fetch source data" on /uploads/new doesn't fetch artist tag
This commit is contained in:
Albert Yi
2017-11-15 10:58:52 -08:00
committed by GitHub
10 changed files with 83 additions and 105 deletions

View File

@@ -4,7 +4,7 @@
</div>
<% end %>
<%= render "sources/info_for_post" %>
<%= render "sources/info" %>
<%= form_for(post, :html => {:class => "simple_form", :id => "form"}) do |f| %>
<%= hidden_field_tag :tags_query, params[:tags] %>

View File

@@ -3,19 +3,13 @@
-->
<div id="source-info">
<% if source.try(:available?) %>
<p><%= link_to "Fetch source data", source_path(:format => "json", :url => source.referer_url), :id => "fetch-data-bookmarklet", :style => "display: none;" %></p>
<p><%= content_tag "span", "Loading #{source.site_name} data...", :id => "loading-data" %></p>
<% else %>
<p><%= link_to "Fetch source data", source_path(:format => "json"), :id => "fetch-data-manual" %></p>
<p><%= content_tag "span", "Loading source data...", :id => "loading-data", :style => "display: none;" %></p>
<% end %>
<p><%= link_to "Fetch source data", source_path(:format => "json"), :id => "fetch-data-manual" %></p>
<p><%= content_tag "span", "Loading source data...", :id => "loading-data", :style => "display: none;" %></p>
<p id="remote-size" style="display: none;"></p>
<p id="gallery-warning" style="display: none;"><%= content_tag "span", "Gallery. Tags may not apply to all images." %></p>
<ul>
<li><strong>Artist</strong>: <span id="source-artist"></span></li>
<li><strong>Tags</strong>: <span id="source-tags"></span></li>
<li><strong>Record</strong>: <span id="source-record"></span></li>
<li><strong>Artist</strong>: <a id="source-artist-profile"></a> (<span id="source-danbooru-artists"></span>)</li>
<li class="source-tags"><strong>Tags</strong>: <span id="source-tags"></span></li>
</ul>
</div>

View File

@@ -1,15 +0,0 @@
<!--
- source
-->
<div id="source-info">
<p><%= link_to "Fetch source data", source_path(:format => "json"), :id => "fetch-data-manual" %></p>
<p><%= content_tag "span", "Loading source data...", :id => "loading-data", :style => "display: none;" %></p>
<p><%= content_tag "span", "Gallery. Tags may not apply to all images.", :id => "gallery-warning", :style => "display: none;" %></p>
<ul>
<li><strong>Artist</strong>: <span id="source-artist"></span></li>
<li><strong>Tags</strong>: <span id="source-tags"></span></li>
<li><strong>Record</strong>: <span id="source-record"></span></li>
</ul>
</div>