Sha256: 29d100d71fb5b8fae2ce9500c638f44fbd91e44ac991919e015306a741dd3a38

Contents?: true

Size: 863 Bytes

Versions: 14

Compression:

Stored size: 863 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] << "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

14 entries across 14 versions & 2 rubygems

Version Path
yousty-activeadmin-1.0.17.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.16.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.15.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.14.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.13.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.12.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.11.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.10.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.9.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.8.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
activeadmin-1.0.0.pre1 lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.7.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.6.pre lib/active_admin/batch_actions/views/batch_action_popover.rb
yousty-activeadmin-1.0.5.pre lib/active_admin/batch_actions/views/batch_action_popover.rb