Sha256: ba71a87a271eaae8c7c7dbcec0f5a76237f179505f57114fecb328da8cc17958

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

<%= content_tag :div,
  class: "relative bg-white rounded shadow-modal flex flex-col group",
  data: {
    component_name: self.class.to_s.underscore,
    resource_name: @resource.class.to_s,
    record_id: @resource.record.id,
    **item_selector_data_attributes(@resource),
    **(try(:drag_reorder_item_data_attributes) || {}),
  } do %>
  <%= content_tag :div,
    class: class_names("relative w-full pb-3/4 rounded-t overflow-hidden", html(:cover, :classes)),
    style: html(:cover, :style) do %>
    <%= render Avo::RowSelectorComponent.new(floating: true, size: :lg) if @resource.record_selector%>
    <%= render_cover %>
    <%= render_badge %>
  <% end %>
  <div class="grid grid-cols-1 place-content-between p-4 h-full">
    <div class="mb-4 h-full flex flex-col space-between">
      <%= render_title %>
      <%= render_body %>
    </div>
    <div class="place-self-end w-full">
      <%= render(Avo::Index::ResourceControlsComponent.new(resource: @resource, reflection: @reflection, parent_record: @parent_record, parent_resource: @parent_resource, view_type: :grid, actions: @actions)) %>
    </div>
  </div>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
avo-3.15.1 app/components/avo/index/grid_item_component.html.erb
avo-3.15.0 app/components/avo/index/grid_item_component.html.erb