Sha256: e4ce85f70c5d21b87871f0df7017348ddea2892898cb153a8160cdc352d6edc2

Contents?: true

Size: 799 Bytes

Versions: 19

Compression:

Stored size: 799 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) %>
        <% 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

19 entries across 19 versions & 1 rubygems

Version Path
avo-2.11.1 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.11.1.pre.2 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.11.1.pre.1 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.11.0 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.10.3.pre.1 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.10.2 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.9.2.pre1 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.10.0 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.9.1.pre7 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.9.1.pre6 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.9.1.pre5 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.9.1.pre4 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.9.1.pre3 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.9.1.pre2 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.9.1.pre1 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.9.0 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.8.0 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.7.1.pre.1 app/components/avo/fields/has_one_field/show_component.html.erb
avo-2.7.0 app/components/avo/fields/has_one_field/show_component.html.erb