Sha256: ae1dc29bf466d7579dbea4b81c60c43cd969c71496106453258ea5f5ba45f5ba

Contents?: true

Size: 680 Bytes

Versions: 30

Compression:

Stored size: 680 Bytes

Contents

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

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
avo-2.7.1.pre.1 app/components/avo/fields/file_field/index_component.html.erb
avo-2.7.0 app/components/avo/fields/file_field/index_component.html.erb
avo-2.6.1.pre.2 app/components/avo/fields/file_field/index_component.html.erb
avo-2.6.1.pre.1 app/components/avo/fields/file_field/index_component.html.erb
avo-2.6.0 app/components/avo/fields/file_field/index_component.html.erb
avo-2.5.2.pre.7 app/components/avo/fields/file_field/index_component.html.erb
avo-2.5.2.pre.6 app/components/avo/fields/file_field/index_component.html.erb
avo-2.5.2.pre.5 app/components/avo/fields/file_field/index_component.html.erb
avo-2.5.2.pre.4 app/components/avo/fields/file_field/index_component.html.erb
avo-2.5.2.pre.3 app/components/avo/fields/file_field/index_component.html.erb
avo-2.5.2.pre.2 app/components/avo/fields/file_field/index_component.html.erb
avo-2.5.2.pre.1 app/components/avo/fields/file_field/index_component.html.erb
avo-2.5.1 app/components/avo/fields/file_field/index_component.html.erb
avo-2.5.0 app/components/avo/fields/file_field/index_component.html.erb
avo-2.4.1 app/components/avo/fields/file_field/index_component.html.erb
avo-2.4.0 app/components/avo/fields/file_field/index_component.html.erb
avo-2.3.1.pre.6 app/components/avo/fields/file_field/index_component.html.erb
avo-2.3.1.pre.5 app/components/avo/fields/file_field/index_component.html.erb
avo-2.3.1.pre.4 app/components/avo/fields/file_field/index_component.html.erb
avo-2.3.1.pre.3 app/components/avo/fields/file_field/index_component.html.erb