Sha256: 3adec16f9f4deb6405bfdf10dc193b301d14847aada03dd40665697b1fa21c86

Contents?: true

Size: 808 Bytes

Versions: 9

Compression:

Stored size: 808 Bytes

Contents

<% if @field.value %>
  <turbo-frame id="<%= @field.turbo_frame %>" src="<%= @field.frame_url %>" target="_top" class="block">
    <%= render(Avo::LoadingComponent.new(title: @field.name)) %>
  </turbo-frame>
<% else %>
  <%= render Avo::PanelComponent.new(title: @field.name) do |c| %>
    <% c.tools do %>
      <% if !@field.readonly && can_attach? %>
        <%= a_link attach_path, icon: 'heroicons/outline/link', color: :primary, 'data-turbo-frame': 'attach_modal' do %>
          <%= t('avo.attach_item', item: @field.name.downcase) %>
        <% end %>
      <% end %>
    <% end %>

    <% c.body do %>
      <div class="py-8 flex justify-center items-center">
        <%= empty_state resource_name: @field.id, related_name: params[:related_name] %>
      </div>
    <% end %>
  <% end %>
<% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
avo-2.12.1.pre.1 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.12.0 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.11.3.pre.3 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.11.3.pre.2 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.11.3.pre.1 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.11.2.pre.3 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.11.2.pre.2 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.11.2.pre.1 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.11.1.pre.3 app/components/avo/fields/has_one_field/show_component.html.erb