Sha256: b44ff1b6bcb63d970fbcb42e7698dcafa823dfef03cd4d95ee527d2b96a2014d

Contents?: true

Size: 1.19 KB

Versions: 22

Compression:

Stored size: 1.19 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] %>

      <%= panel(title: resource_panel[:name]) do |component| %>
        <% component.with :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 %>

        <% component.with :body do %>
          <% @resource.get_fields.each_with_index do |field, index| %>
            <%= edit_field field, index, @resource, form unless field.computed %>
          <% end %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
</div>

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
avo-1.1.0 app/components/avo/views/resource_edit_component.html.erb
avo-1.1.0.pre.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.0.5 app/components/avo/views/resource_edit_component.html.erb
avo-1.0.4 app/components/avo/views/resource_edit_component.html.erb
avo-1.0.2 app/components/avo/views/resource_edit_component.html.erb
avo-1.0.1 app/components/avo/views/resource_edit_component.html.erb
avo-1.0.0 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta15 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta14 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta13 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta12 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta11 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta10 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta9 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta8 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta7 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta6 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta5 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta4 app/components/avo/views/resource_edit_component.html.erb
avo-0.5.0.beta3 app/components/avo/views/resource_edit_component.html.erb