Sha256: 7249651c5b65184ccb7d37ab596092dd14093f38a35200fff29da790ac6ffdb2

Contents?: true

Size: 754 Bytes

Versions: 16

Compression:

Stored size: 754 Bytes

Contents

<% if @field.value %>
  <turbo-frame id="<%= @field.turbo_frame %>" src="<%= @field.frame_url %>" target="_top">
    <%= render(Avo::LoadingComponent.new(title: @field.name)) %>
  </turbo-frame>
<% else %>
  <%= panel(title: @field.id.capitalize) do |c| %>
    <% c.with :tools do %>
      <%= a_link helpers.resource_attach_path(@resource.model.model_name.route_key, @resource.model.id, @field.id), color: 'indigo', 'data-turbo-frame': 'attach_modal' do %>
        <%= svg 'view-grid-add' %> <%= t('avo.attach_item', { item: @field.id }).capitalize %>
      <% end %>
    <% end %>

    <% c.with :body do %>
      <div class="py-8 flex justify-center items-center">
        <%= empty_state @field.id %>
      </div>
    <% end %>
  <% end %>
<% end %>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
avo-1.0.0 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta15 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta14 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta13 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta12 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta11 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta10 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta9 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta8 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta7 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta6 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta5 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta4 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta3 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta2 app/components/avo/show/fields/has_one_field_component.html.erb
avo-0.5.0.beta1 app/components/avo/show/fields/has_one_field_component.html.erb