diff --git a/app/views/cards/display/common/_background.html.erb b/app/views/cards/display/common/_background.html.erb index 780184d87..fbe28da85 100644 --- a/app/views/cards/display/common/_background.html.erb +++ b/app/views/cards/display/common/_background.html.erb @@ -1,14 +1,6 @@ <% if card.image.present? %>
<%= image_tag card.image.presence || "", size: 120, data: { upload_preview_target: "image" } %> - <%= render "layouts/lightbox" do %> - <% if card.image.attached? %> - <%= button_to card_image_path(card), method: :delete, class: "btn" do %> - <%= icon_tag "trash" %> - Clear background image - <% end %> - <% end %> - <% end %>
<%= yield %> diff --git a/app/views/cards/show.html.erb b/app/views/cards/show.html.erb index a203b4bb2..f887a421b 100644 --- a/app/views/cards/show.html.erb +++ b/app/views/cards/show.html.erb @@ -49,3 +49,12 @@ <%= render "cards/messages", card: @card %> <% end %> + +<%= render "layouts/lightbox" do %> + <% if @card.image.attached? %> + <%= button_to card_image_path(@card), method: :delete, class: "btn" do %> + <%= icon_tag "trash" %> + Remove background image + <% end %> + <% end %> +<% end %>