Sha256: ae784d1725c16f8187d769465bece7a8dde615c8aea6c4bf1f4549e38bc33904

Contents?: true

Size: 1.5 KB

Versions: 30

Compression:

Stored size: 1.5 KB

Contents

<%= content_tag :div,
  id: helpers.frame_id(@resource),
  data: {
    model_name: @resource.model_name.to_s,
    resource_name: @resource.class.to_s,
    record_id: @resource.record_param,
    selected_resources_name: @resource.model_key,
    selected_resources: [@resource.record_param],
    **@resource.stimulus_data_attributes
  } do %>
  <%= render_cards_component %>
  <%= form_with model: @resource.record,
    scope: @resource.form_scope,
    url: form_url,
    method: form_method,
    local: true,
    html: {
      novalidate: true
    },
    multipart: true do |form| %>
    <%= render Avo::ReferrerParamsComponent.new back_path: back_path %>
    <%= content_tag :div, class: "space-y-12" do %>
      <% @resource.get_items.each_with_index do |item, index| %>
        <%= render Avo::Items::SwitcherComponent.new(
          resource: @resource,
          reflection: @reflection,
          item: item,
          index: index + 1,
          view: @view,
          parent_resource: @parent_resource,
          parent_record: @parent_record,
          form: form,
          parent_component: self,
          actions: @actions
        ) %>
      <% end %>

      <% if Avo.configuration.buttons_on_form_footers %>
        <%= render Avo::PanelComponent.new do |c| %>
          <% c.with_footer_tools do %>
            <% @resource.render_edit_controls.each do |control| %>
              <%= render_control control %>
            <% end %>
          <% end %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
<% end %>

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
avo-3.15.3 app/components/avo/views/resource_edit_component.html.erb
avo-3.15.2 app/components/avo/views/resource_edit_component.html.erb
avo-3.15.1 app/components/avo/views/resource_edit_component.html.erb
avo-3.15.0 app/components/avo/views/resource_edit_component.html.erb
avo-3.14.5 app/components/avo/views/resource_edit_component.html.erb
avo-3.14.4 app/components/avo/views/resource_edit_component.html.erb
avo-3.14.3 app/components/avo/views/resource_edit_component.html.erb
avo-3.14.2 app/components/avo/views/resource_edit_component.html.erb
avo-3.14.1 app/components/avo/views/resource_edit_component.html.erb
avo-3.14.0 app/components/avo/views/resource_edit_component.html.erb
avo-3.13.7 app/components/avo/views/resource_edit_component.html.erb
avo-3.13.6 app/components/avo/views/resource_edit_component.html.erb
avo-3.13.5 app/components/avo/views/resource_edit_component.html.erb
avo-3.13.4 app/components/avo/views/resource_edit_component.html.erb
avo-3.13.3 app/components/avo/views/resource_edit_component.html.erb
avo-3.13.2 app/components/avo/views/resource_edit_component.html.erb
avo-3.13.1 app/components/avo/views/resource_edit_component.html.erb
avo-3.13.0 app/components/avo/views/resource_edit_component.html.erb
avo-3.12.0 app/components/avo/views/resource_edit_component.html.erb
avo-3.11.10 app/components/avo/views/resource_edit_component.html.erb