Sha256: 1070e1e0877f014edb8d143dde100fbe93759117bbda3ead1bc6a49b36ab7d82
Contents?: true
Size: 1.58 KB
Versions: 1
Compression:
Stored size: 1.58 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: 'primary', size: :xl, 'data-action': "click->toggle-panel#togglePanel", 'data-actions-dropdown-button': @resource.model_key do %> <%= svg 'arrow-circle-right', 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-semibold 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
avo-1.22.0.pre.1 | app/views/avo/base/_actions.html.erb |