* When creating an artist by clicking the '?' next to the artist tag in the tag list, prefill the new artist form by finding the artist's last upload and fetching its source data. Previously we filled the urls with the source of the artist's last upload, which was wrong because it was usually a direct image URL (#3078). * Fix the other names field not escaping spaces within names to underscores. * Fix the other names field being potentially prefilled with duplicate names.
51 lines
1.6 KiB
Plaintext
51 lines
1.6 KiB
Plaintext
<%# source %>
|
|
|
|
<div id="source-info">
|
|
<%= link_to "Fetch source data", source_path, id: "fetch-data-manual" %>
|
|
<i id="source-info-loading" class="fas fa-spinner fa-spin"></i>
|
|
|
|
<% if @source.present? %>
|
|
<dl id="source-info-content">
|
|
<div id="source-info-artist">
|
|
<dt>Artist</dt>
|
|
<dd>
|
|
<% if @source.artist_name.blank? %>
|
|
<em>None</em>
|
|
<% else %>
|
|
<%= link_to @source.artist_name, @source.profile_url, id: "source-info-artist-profile" %>
|
|
|
|
<% if @source.artists.empty? %>
|
|
(<%= link_to "Create new artist", new_artist_path(artist: { source: @source.canonical_url }), id: "source-info-create-new-artist" %>)
|
|
<% else %>
|
|
(<ul id="source-info-translated-artists">
|
|
<% @source.artists.each do |artist| %>
|
|
<li><%= link_to artist.name, artist_path(artist), class: "tag-type-#{artist.category_name}" %></li>
|
|
<% end %>
|
|
</ul>)
|
|
<% end %>
|
|
<% end %>
|
|
</dd>
|
|
</div>
|
|
|
|
<div id="source-info-tags">
|
|
<dt>Tags</dt>
|
|
<dd>
|
|
<% if @source.tags.empty? %>
|
|
<em>None</em>
|
|
<% else %>
|
|
<ul>
|
|
<% @source.tags.each do |tag, href| %>
|
|
<li><%= link_to tag, href, rel: :nofollow %></li>
|
|
<% end %>
|
|
</ul>
|
|
|
|
<% if @source.image_urls.length > 1 %>
|
|
<p id="source-info-gallery-warning">Gallery. Tags may not apply to all images.</p>
|
|
<% end %>
|
|
<% end %>
|
|
</dd>
|
|
</li>
|
|
</dl>
|
|
<% end %>
|
|
</div>
|