Sha256: e50ba03fe38fa6926e1c7b51804b78545623ca10e18e99d0d4bc32bdf1aba07d

Contents?: true

Size: 1.25 KB

Versions: 11

Compression:

Stored size: 1.25 KB

Contents

<%
  # headmin/table/actions/action
  #
  # ==== Options
  # * +name</tt> - Name of the bulk action
  # * +url</tt> - URL to send the request to
  # * +method</tt> - HTTP method for the request (defaults to GET)
  # * +confirm</tt> - Message to show in a confirm dialog. Leave blank if no confirm dialog needs to be shown
  #
  # ==== Examples
  #   Basic version.
  #   <%= render "headmin/table/actions/action", name: "export", url: export_admin_products_path %#>
  #
  #   Use a different HTTP method
  #   <%= render "headmin/table/actions/action", name: "export", url: export_admin_products_path, method: :post %#>
  #
  #   Show a confirm dialog before submitting.
  #   <%= render "headmin/table/actions/action", name: "delete", url: destroy_admin_products_path, confirm: "Are you sure you want to delete these products?" %#>

  url = local_assigns.has_key?(:url) ? local_assigns[:url] : request.path
  method = local_assigns.has_key?(:method) ? local_assigns[:method] : "GET"
  confirm = local_assigns.has_key?(:confirm) ? local_assigns[:confirm] : nil
  turbo = confirm ? true : false
%>

<option value="<%= url %>" data-method="<%= method %>" <% if confirm %>data-turbo-confirm="<%= confirm %>"<% end %> <% unless turbo %>data-turbo="false"<%end %>>
  <%= name %>
</option>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
headmin-0.6.3 app/views/headmin/table/actions/_action.html.erb
headmin-0.6.2 app/views/headmin/table/actions/_action.html.erb
headmin-0.6.1 app/views/headmin/table/actions/_action.html.erb
headmin-0.6.0 app/views/headmin/table/actions/_action.html.erb
headmin-0.5.9 app/views/headmin/table/actions/_action.html.erb
headmin-0.5.8 app/views/headmin/table/actions/_action.html.erb
headmin-0.5.7 app/views/headmin/table/actions/_action.html.erb
headmin-0.5.6 app/views/headmin/table/actions/_action.html.erb
headmin-0.5.5 app/views/headmin/table/actions/_action.html.erb
headmin-0.5.4 app/views/headmin/table/actions/_action.html.erb
headmin-0.5.3 app/views/headmin/table/actions/_action.html.erb