Sha256: e61df8e344ab060c29ca1198f127b2ce7ca4c229f39eebc10a15a2d73d540a98
Contents?: true
Size: 1.25 KB
Versions: 6
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
6 entries across 6 versions & 1 rubygems