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.18.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.18.0 app/components/avo/views/resource_edit_component.html.erb
avo-1.18.0.pre.3 app/components/avo/views/resource_edit_component.html.erb
avo-1.18.0.pre.2 app/components/avo/views/resource_edit_component.html.erb
avo-1.18.0.pre.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.17.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.17.0 app/components/avo/views/resource_edit_component.html.erb
avo-1.16.4 app/components/avo/views/resource_edit_component.html.erb
avo-1.16.3 app/components/avo/views/resource_edit_component.html.erb
avo-1.16.2 app/components/avo/views/resource_edit_component.html.erb
avo-1.16.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.16.0 app/components/avo/views/resource_edit_component.html.erb
avo-1.15.0 app/components/avo/views/resource_edit_component.html.erb
avo-1.15.0.pre.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.14.0 app/components/avo/views/resource_edit_component.html.erb
avo-1.13.3 app/components/avo/views/resource_edit_component.html.erb
avo-1.13.2 app/components/avo/views/resource_edit_component.html.erb
avo-1.13.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.13.0 app/components/avo/views/resource_edit_component.html.erb
avo-1.12.4 app/components/avo/views/resource_edit_component.html.erb