Sha256: 93a08462226fe17ebcba4d47dad535b9e57fb62339a528d9a2190027721ca89e
Contents?: true
Size: 912 Bytes
Versions: 11
Compression:
Stored size: 912 Bytes
Contents
module Godmin module Helpers module BatchActions def batch_action_link(name, options) return unless include_batch_action_link?(options) link_to( translate_scoped("batch_actions.labels.#{name}", default: name.to_s.titleize), @resource_class, method: :patch, class: "btn btn-default hidden", data: { behavior: "batch-actions-action-link", confirm: options[:confirm] ? translate_scoped("batch_actions.confirm_message") : false, value: name } ) end private def include_batch_action_link?(options) (options[:only].nil? && options[:except].nil?) || (options[:only] && options[:only].include?(@resource_service.scope.to_sym)) || (options[:except] && !options[:except].include?(@resource_service.scope.to_sym)) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems