Sha256: 33012d91d60807d7dc6c57ecad17cae4dbec8ee751f598d22145e7674be4e3df

Contents?: true

Size: 817 Bytes

Versions: 29

Compression:

Stored size: 817 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.id.capitalize) 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.id).capitalize %>
        <% 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

29 entries across 29 versions & 1 rubygems

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