Sha256: bc82110dd36dc685ed0b96f114f64d555ab46f754da205d5d63ffbb71c11288f

Contents?: true

Size: 871 Bytes

Versions: 62

Compression:

Stored size: 871 Bytes

Contents

require 'active_admin/views/components/action_list_popover'

module ActiveAdmin
  module BatchActions
    # Build an BatchActionPopover
    class BatchActionPopover < ActiveAdmin::Views::ActionListPopover
      builder_method :batch_action_popover

      def build(options = {}, &block)
        options[:id] ||= "batch_actions_popover"
        super(options)
      end

      def action(batch_action, options = {})
        options[:class] ||= []
        options[:class] += %w(batch_action)
        options.merge! "data-action" => batch_action.sym,
                       "data-confirm" => batch_action.confirm

        title = I18n.t("active_admin.batch_actions.labels.#{batch_action.sym}", :default => batch_action.title)
        label = I18n.t("active_admin.batch_actions.action_label", :title => title)

        super(label, "#", options)
      end

    end
  end
end

Version data entries

62 entries across 62 versions & 4 rubygems

Version Path
activeadmin-0.6.6 lib/active_admin/batch_actions/views/batch_action_popover.rb
activeadmin-0.6.5 lib/active_admin/batch_actions/views/batch_action_popover.rb
activeadmin-0.6.4 lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.4.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.3.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.2.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
activeadmin-0.6.3 lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.1.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.0.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
activeadmin-0.6.2 lib/active_admin/batch_actions/views/batch_action_popover.rb
activeadmin-0.6.1 lib/active_admin/batch_actions/views/batch_action_popover.rb
aa-rails4-0.6.0 lib/active_admin/batch_actions/views/batch_action_popover.rb
lalala-4.0.0.dev.141 vendor/deps/active_admin/lib/active_admin/batch_actions/views/batch_action_popover.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/lib/active_admin/batch_actions/views/batch_action_popover.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/lib/active_admin/batch_actions/views/batch_action_popover.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/lib/active_admin/batch_actions/views/batch_action_popover.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/lib/active_admin/batch_actions/views/batch_action_popover.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/lib/active_admin/batch_actions/views/batch_action_popover.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/lib/active_admin/batch_actions/views/batch_action_popover.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/lib/active_admin/batch_actions/views/batch_action_popover.rb