Sha256: 75facb0242a16ef8e421237361212a66fcd3704a4f3cc2d602e50a579b395f65

Contents?: true

Size: 1.55 KB

Versions: 27

Compression:

Stored size: 1.55 KB

Contents

<% if @actions.count > 0 %>
  <div class="relative z-40 js-actions-dropdown" data-controller="toggle-panel actions-picker">
    <%= a_button class: "focus:outline-none",
      color: 'sky',
      'data-action': "click->toggle-panel#togglePanel",
      'data-actions-dropdown-button': @resource.model_key do
    %>
      <%= svg 'arrow-left', class: 'h-4 mr-1 transform -rotate-90' %> <%= t 'avo.actions' %>
    <% end %>
    <div
      class="absolute block inset-auto right-0 top-full bg-white min-w-300px mt-2 py-4 z-20 shadow-context rounded-xl overflow-hidden hidden"
      data-toggle-panel-target="panel"
    >
      <%
        @actions.each_with_index do |action, index|
          path = action_name == 'show' ?
            "#{@resource.record_path}/actions/#{action.param_id}" :
            "#{@resource.records_path}/actions/#{action.param_id}"
          if action_name == 'show' || action.standalone
            disabled = false
          else
            disabled = true
          end
      %>
        <%= link_to path,
          'data-turbo-frame': 'actions_show',
          'data-action': 'click->actions-picker#visitAction',
          'data-actions-picker-target': action.standalone ? 'standaloneAction' : 'resourceAction',
          class: "flex items-center w-full py-2 px-4 font-bold text-gray-700 hover:text-white hover:bg-blue-500 #{disabled ? 'text-gray-500' : 'text-gray-700'}",
          'data-disabled': disabled do %>
          <%= svg 'play', class: 'h-5 mr-1 inline' %> <%= action.action_name %>
        <% end %>
      <% end %>
    </div>
  </div>
<% end %>

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
avo-1.25.2 app/views/avo/base/_actions.html.erb
avo-1.25.1 app/views/avo/base/_actions.html.erb
avo-1.25.0 app/views/avo/base/_actions.html.erb
avo-1.24.2 app/views/avo/base/_actions.html.erb
avo-1.24.1 app/views/avo/base/_actions.html.erb
avo-1.24.0 app/views/avo/base/_actions.html.erb
avo-1.23.0 app/views/avo/base/_actions.html.erb
avo-1.22.4 app/views/avo/base/_actions.html.erb
avo-1.22.3 app/views/avo/base/_actions.html.erb
avo-1.22.2 app/views/avo/base/_actions.html.erb
avo-1.22.1 app/views/avo/base/_actions.html.erb
avo-1.22.1.pre.2 app/views/avo/base/_actions.html.erb
avo-1.22.1.pre.1 app/views/avo/base/_actions.html.erb
avo-1.22.0 app/views/avo/base/_actions.html.erb
avo-1.21.1.pre.1 app/views/avo/base/_actions.html.erb
avo-1.21.0 app/views/avo/base/_actions.html.erb
avo-1.20.2.pre.2 app/views/avo/base/_actions.html.erb
avo-1.20.2.pre.1 app/views/avo/base/_actions.html.erb
avo-1.21.0.pre.1 app/views/avo/base/_actions.html.erb
avo-1.20.1 app/views/avo/base/_actions.html.erb