Sha256: d32c2d202cfd3452a59cb0e9163426c687df30e7be90c70232bd2e84cf375228

Contents?: true

Size: 1.52 KB

Versions: 11

Compression:

Stored size: 1.52 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_class.model_name.route_key %>"
    data-resource-id="<%= params[:id] %>"
    class="hidden text-blue-gray-800"
  >
    <%= form_with model: @model, scope: 'fields', url: "#{Avo.configuration.root_path}/resources/#{@resource.model_class.model_name.route_key}/actions/#{@action.param_id}", data: {'turbo-frame': '_top', 'action-target': 'form'} do |form| %>
      <%= render Avo::ModalComponent.new do |c| %>
        <% c.heading do %>
          <%= @action.action_name %>
        <% end %>

        <div class="flex-1 flex items-center justify-center px-8 text-lg mt-8 mb-12">
          <%= @action.message %>
        </div>

        <%= form.hidden_field :resource_ids, value: params[:resource_ids], 'data-action-target': 'resourceIds' %>

        <% if @action.get_fields.present? %>
          <% @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 %>
        <% end %>

        <% c.controls do %>
          <%= a_button @action.cancel_button_label, 'data-action': 'click->modal#close', size: :sm %>
          <%= a_button @action.confirm_button_label, type: :submit, color: :green, size: :sm %>
        <% end %>
      <% end %>
    <% end %>
  </div>
<% end %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
avo-1.7.2 app/views/avo/actions/show.html.erb
avo-1.7.1 app/views/avo/actions/show.html.erb
avo-1.7.0 app/views/avo/actions/show.html.erb
avo-1.6.4.pre.1 app/views/avo/actions/show.html.erb
avo-1.6.3.pre.3 app/views/avo/actions/show.html.erb
avo-1.6.3.pre.2 app/views/avo/actions/show.html.erb
avo-1.6.3.pre.1 app/views/avo/actions/show.html.erb
avo-1.6.2.pre.1 app/views/avo/actions/show.html.erb
avo-1.6.1 app/views/avo/actions/show.html.erb
avo-1.6.0 app/views/avo/actions/show.html.erb
avo-1.5.5 app/views/avo/actions/show.html.erb