Sha256: d5db382f430826a2d2f60eb497823c0fef98e45c238203dc9423ac60f96cabe8

Contents?: true

Size: 503 Bytes

Versions: 1

Compression:

Stored size: 503 Bytes

Contents

<% if (attachment = field.value(record)) && attachment.attached? %>
  <% if attachment.variable? %>
    <%= image_tag main_app.url_for(attachment), class: "max-h-32" %>
  <% else %>
    <%= link_to attachment.filename, main_app.url_for(attachment), target: :_blank, class: "text-blue-500 underline" %>
  <% end %>

  <%= link_to "Remove", Madmin.resource_for(attachment).show_path(attachment), data: { turbo_method: :delete, turbo_confirm: "Are you sure? You will lose any other changes."} %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
madmin-2.0.0 app/views/madmin/fields/attachment/_show.html.erb