Sha256: 8f46a9141f984f1ab7b47a5cf9ef8e5e5fe8c687d84be29896958b0f1ae95747

Contents?: true

Size: 768 Bytes

Versions: 8

Compression:

Stored size: 768 Bytes

Contents

<% if item.is_tool? %>
  <% if item&.partial.present? %>
    <%= render item.partial, tool: item %>
  <% end %>
<% elsif item.is_panel? %>
  <%= render Avo::PanelComponent.new(title: item.name, description: item.description, index: index, view: view) do |c| %>
    <% c.body do %>
      <div class="divide-y">
        <% item.items.each_with_index do |field, index| %>
          <%= render field.hydrate(resource: @resource, model: @resource.model, user: resource.user, view: view).component_for_view(view).new(field: field, resource: @resource, index: index, form: form) %>
        <% end %>
      </div>
    <% end %>
  <% end %>
<% elsif item.is_tab_group? %>
  <%= render tab_group_component %>
<% elsif item.is_field? %>
  <%= render field_component %>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
avo-2.11.1.pre.3 app/components/avo/item_switcher_component.html.erb
avo-2.11.1 app/components/avo/item_switcher_component.html.erb
avo-2.11.1.pre.2 app/components/avo/item_switcher_component.html.erb
avo-2.11.1.pre.1 app/components/avo/item_switcher_component.html.erb
avo-2.11.0 app/components/avo/item_switcher_component.html.erb
avo-2.10.3.pre.1 app/components/avo/item_switcher_component.html.erb
avo-2.10.2 app/components/avo/item_switcher_component.html.erb
avo-2.10.0 app/components/avo/item_switcher_component.html.erb