Sha256: a94fdea11e30e4d047f42d3330c4dbec9c91a43591b48b2c5a6d0b697f37bd6c

Contents?: true

Size: 1.27 KB

Versions: 67

Compression:

Stored size: 1.27 KB

Contents

<div data-model-id="<%= @resource.model.id %>">
  <% @resource.panels.each do |resource_panel| %>
    <%= form_with model: @resource.model, url: helpers.resource_path(@resource.model), method: :put, multipart: true do |form| %>
      <%= hidden_field_tag :referrer, back_path if params[:via_resource_class] %>

      <%= 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 %>
              <%= helpers.svg 'arrow-left' %> <%= t('avo.cancel').capitalize %>
            <% end %>

            <% if @resource.authorization.authorize_action :update, raise_exception: false %>
              <%= a_button color: 'green', variant: 'outlined', type: :submit do %>
                <%= helpers.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

67 entries across 67 versions & 1 rubygems

Version Path
avo-1.8.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.8.0 app/components/avo/views/resource_edit_component.html.erb
avo-1.7.3 app/components/avo/views/resource_edit_component.html.erb
avo-1.7.3.pre.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.7.2 app/components/avo/views/resource_edit_component.html.erb
avo-1.7.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.7.0 app/components/avo/views/resource_edit_component.html.erb
avo-1.6.4.pre.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.6.3.pre.3 app/components/avo/views/resource_edit_component.html.erb
avo-1.6.3.pre.2 app/components/avo/views/resource_edit_component.html.erb
avo-1.6.3.pre.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.6.2.pre.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.6.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.6.0 app/components/avo/views/resource_edit_component.html.erb
avo-1.5.5 app/components/avo/views/resource_edit_component.html.erb
avo-1.5.4 app/components/avo/views/resource_edit_component.html.erb
avo-1.5.3 app/components/avo/views/resource_edit_component.html.erb
avo-1.5.2 app/components/avo/views/resource_edit_component.html.erb
avo-1.5.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.5.0 app/components/avo/views/resource_edit_component.html.erb