Upload page: show artist tag if it exists even if artist_name is empty in source
This commit is contained in:
@@ -5,20 +5,7 @@
|
|||||||
<% if @source.present? %>
|
<% if @source.present? %>
|
||||||
<table class="source-data-content mt-2">
|
<table class="source-data-content mt-2">
|
||||||
<tbody>
|
<tbody>
|
||||||
<% if @source.artist_name.blank? %>
|
<% if @source.artists.present? %>
|
||||||
<tr>
|
|
||||||
<th>Artist</th>
|
|
||||||
<td><em>None</em></td>
|
|
||||||
</tr>
|
|
||||||
<% elsif @source.artists.empty? %>
|
|
||||||
<tr>
|
|
||||||
<th>Artist</th>
|
|
||||||
<td>
|
|
||||||
<%= external_link_to @source.profile_url, @source.artist_name %>
|
|
||||||
(<%= link_to "Create new artist", new_artist_path(artist: { source: @source.canonical_url }) %>)
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% else %>
|
|
||||||
<% @source.artists.each do |artist| %>
|
<% @source.artists.each do |artist| %>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Artist</th>
|
<th>Artist</th>
|
||||||
@@ -33,6 +20,21 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<% if @source.artist_name.blank? %>
|
||||||
|
<tr>
|
||||||
|
<th>Artist</th>
|
||||||
|
<td><em>None</em></td>
|
||||||
|
</tr>
|
||||||
|
<% else %>
|
||||||
|
<tr>
|
||||||
|
<th>Artist</th>
|
||||||
|
<td>
|
||||||
|
<%= external_link_to @source.profile_url, @source.artist_name %>
|
||||||
|
(<%= link_to "Create new artist", new_artist_path(artist: { source: @source.canonical_url }) %>)
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<tr class="source-data-tags">
|
<tr class="source-data-tags">
|
||||||
|
|||||||
Reference in New Issue
Block a user