Sha256: 3f547f90c80b5b6a151ad1e3f97ef653a5d2a50ddd9b0803268b59591b0de693

Contents?: true

Size: 1.32 KB

Versions: 67

Compression:

Stored size: 1.32 KB

Contents

<div id="<%= dom_id file %>" class="relative min-h-full max-w-full flex-1 flex flex-col justify-between space-y-2">
  <% if file.present? %>
    <div class="flex flex-col justify-between h-full">
      <% if file.representable? && is_image? %>
        <%= image_tag helpers.main_app.url_for(file), class: 'rounded-lg object-cover w-full aspect-video' %>
      <% elsif is_audio? %>
        <%= audio_tag(helpers.main_app.url_for(file), controls: true, preload: false, class: 'w-full') %>
      <% elsif is_video? %>
        <%= video_tag(helpers.main_app.url_for(file), controls: true, preload: false, class: 'w-full') %>
      <% else %>
        <div class="relative flex flex-col justify-evenly items-center px-2 rounded-lg border bg-white border-gray-500 min-h-24">
          <div class="flex flex-col justify-center items-center w-full">
            <%= helpers.svg 'document-text', class: 'h-10 text-gray-600 mb-2' %>
          </div>
        </div>
      <% end %>
      <% if field.display_filename %>
        <span class="text-gray-500 mt-1 text-sm truncate" title="<%= file.filename %>"><%= file.filename %></span>
      <% end %>
    </div>
    <div class="flex space-x-2">
      <%= render Avo::Fields::Common::Files::ControlsComponent.new(field: field, file: file, resource: resource) %>
    </div>
  <% else %>
    –
  <% end %>
</div>

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
avo-3.0.1.beta17 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta18 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta19 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta15 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta16 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta14 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta12 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta13 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta10 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta11 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.0.pre19 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta8 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta9 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta6 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta7 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta5 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta2 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta4 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.1.beta3 app/components/avo/fields/common/files/view_type/grid_component.html.erb
avo-3.0.0.beta1 app/components/avo/fields/common/files/view_type/grid_component.html.erb