Sha256: c6b4952e8e3ee606056ea32dca21628a644dd5f8ca5adc864ef5fc6ad460a2ba

Contents?: true

Size: 694 Bytes

Versions: 3

Compression:

Stored size: 694 Bytes

Contents

<%= index_field_wrapper(**field_wrapper_args, flush: flush?) do %>
  <% if @field.value.present? %>
    <% if @field.value.attached? && @field.value.representable? && @field.is_image %>
      <%= link_to_if @field.link_to_record, image_tag(helpers.main_app.url_for(@field.value), class: 'h-10'), resource_view_path, class: 'block' %>
    <% elsif @field.value.attached? && @field.is_audio %>
      <%= link_to_if @field.link_to_record, audio_tag(helpers.main_app.url_for(@field.value), controls: true, preload: false, class: 'max-h-full h-10'), resource_view_path, class: 'block h-8' %>
    <% else %>
      <%= @field.value.filename %>
    <% end %>
  <% else %>
    —
  <% end %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
avo-3.16.4 app/components/avo/fields/file_field/index_component.html.erb
avo-3.16.3 app/components/avo/fields/file_field/index_component.html.erb
avo-3.16.2 app/components/avo/fields/file_field/index_component.html.erb