Sha256: 642ac2b8376182de9b75ad22e3c0bb431a2e66bfe467d29a92fafde2c99cb9ff

Contents?: true

Size: 1.57 KB

Versions: 21

Compression:

Stored size: 1.57 KB

Contents

<%= turbo_frame_tag "actions_show" do %>
  <div
    data-controller="action"
    data-no-confirmation="<%= @action.no_confirmation %>"
    data-action-target="controllerDiv"
    data-resource-name="<%= @resource.model_key %>"
    data-resource-id="<%= params[:id] %>"
    class="hidden text-slate-800"
  >
    <%= form_with model: @model,
      scope: 'fields',
      url: "#{@resource.records_path}/actions/#{@action.param_id}",
      local: true,
      data: @action.class.form_data_attributes do |form|
    %>
    <%= render Avo::ModalComponent.new do |c| %>
      <% c.heading do %>
        <%= @action.action_name %>
      <% end %>
      <div class="flex-1 flex">
        <%= @action.message %>
      </div>
      <%= form.hidden_field :resource_ids, value: params[:resource_ids], 'data-action-target': 'resourceIds' %>
      <% if @action.get_fields.present? %>
        <div class="mt-4">
          <% @action.get_fields.each_with_index do |field, index| %>
            <%= render field.component_for_view(:edit).new field: field, resource: @resource, index: index, form: form, displayed_in_modal: true %>
          <% end %>
        </div>
      <% end %>
      <% c.controls do %>
        <%= a_button data: { action: 'click->modal#close' }, size: :sm do %>
          <%= @action.cancel_button_label %>
        <% end %>
        <%= a_button type: :submit,
            color: :green,
            size: :sm,
            data: @action.class.submit_button_data_attributes do %>
          <%= @action.confirm_button_label %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
</div>
<% end %>

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
avo-2.5.2.pre.7 app/views/avo/actions/show.html.erb
avo-2.5.2.pre.2 app/views/avo/actions/show.html.erb
avo-2.5.2.pre.1 app/views/avo/actions/show.html.erb
avo-2.5.1 app/views/avo/actions/show.html.erb
avo-2.5.0 app/views/avo/actions/show.html.erb
avo-2.4.1 app/views/avo/actions/show.html.erb
avo-2.4.0 app/views/avo/actions/show.html.erb
avo-2.3.1.pre.6 app/views/avo/actions/show.html.erb
avo-2.3.1.pre.5 app/views/avo/actions/show.html.erb
avo-2.3.1.pre.4 app/views/avo/actions/show.html.erb
avo-2.3.1.pre.3 app/views/avo/actions/show.html.erb
avo-2.3.1.pre.2 app/views/avo/actions/show.html.erb
avo-2.3.1.pre.1 app/views/avo/actions/show.html.erb
avo-2.3.0 app/views/avo/actions/show.html.erb
avo-2.2.2 app/views/avo/actions/show.html.erb
avo-2.2.1 app/views/avo/actions/show.html.erb
avo-2.2.0 app/views/avo/actions/show.html.erb
avo-2.1.2.pre2 app/views/avo/actions/show.html.erb
avo-2.1.2.pre1 app/views/avo/actions/show.html.erb
avo-2.1.1 app/views/avo/actions/show.html.erb