Sha256: a94b780251ac5a60d8b6ee2ad1a8b385f560e703b699cb7293ae18f30d2c93c9

Contents?: true

Size: 1.21 KB

Versions: 6

Compression:

Stored size: 1.21 KB

Contents

<div>
  <% @resource.panels.each do |resource_panel| %>
    <%= form_with model: @resource.model, url: helpers.resources_path(resource: @resource, via_relation_class: params[:via_relation_class], via_relation: params[:via_relation], via_resource_id: params[:via_resource_id]), local: true, multipart: true do |form| %>
      <%= render Avo::PanelComponent.new(title: resource_panel[:name], display_breadcrumbs: true) do |c| %>
        <% c.tools do %>
          <div class="flex justify-end space-x-2">
            <%= a_link back_path do %>
              <%= svg 'arrow-left' %> <%= t('avo.cancel').capitalize %>
            <% end %>

            <% if can_see_the_save_button? %>
              <%= a_button color: 'green', spinner: true, type: :submit do %>
                <%= svg 'save' %> <%= t('avo.save').capitalize %>
              <% end %>
            <% end %>
          </div>
        <% end %>

        <% c.body do %>
          <% @resource.get_fields.each_with_index do |field, index| %>
            <%= render field.component_for_view(:edit).new(field: field, resource: @resource, index: index, form: form) unless field.computed %>
          <% end %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
</div>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
avo-1.19.1.pre.9 app/components/avo/views/resource_new_component.html.erb
avo-1.19.1.pre.8 app/components/avo/views/resource_new_component.html.erb
avo-1.19.1.pre.7 app/components/avo/views/resource_new_component.html.erb
avo-1.19.1.pre.6 app/components/avo/views/resource_new_component.html.erb
avo-1.19.1.pre.5 app/components/avo/views/resource_new_component.html.erb
avo-1.19.1.pre.4 app/components/avo/views/resource_new_component.html.erb