From bea03b7dc6a9bb87a6deb1d860d1c006fd6842fb Mon Sep 17 00:00:00 2001 From: nonamethanks Date: Sat, 3 Jul 2021 06:39:28 +0200 Subject: [PATCH] Upload page: show artist tag if it exists even if artist_name is empty in source --- .../source_data_component.html.erb | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/app/components/source_data_component/source_data_component.html.erb b/app/components/source_data_component/source_data_component.html.erb index 0bd693257..e5eff3ba2 100644 --- a/app/components/source_data_component/source_data_component.html.erb +++ b/app/components/source_data_component/source_data_component.html.erb @@ -5,20 +5,7 @@ <% if @source.present? %> - <% if @source.artist_name.blank? %> - - - - - <% elsif @source.artists.empty? %> - - - - - <% else %> + <% if @source.artists.present? %> <% @source.artists.each do |artist| %> @@ -33,6 +20,21 @@ <% end %> + <% else %> + <% if @source.artist_name.blank? %> + + + + + <% else %> + + + + + <% end %> <% end %>
ArtistNone
Artist - <%= external_link_to @source.profile_url, @source.artist_name %> - (<%= link_to "Create new artist", new_artist_path(artist: { source: @source.canonical_url }) %>) -
Artist
ArtistNone
Artist + <%= external_link_to @source.profile_url, @source.artist_name %> + (<%= link_to "Create new artist", new_artist_path(artist: { source: @source.canonical_url }) %>) +