Sha256: ce7c9fd22bbfdacd3b8694c508675a5c5f7aa677cf98c96607e65808dafbc464

Contents?: true

Size: 998 Bytes

Versions: 6

Compression:

Stored size: 998 Bytes

Contents

# frozen_string_literal: true

require 'activeadmin'
require 'activeadmin/views/activeadmin_form'
require 'activeadmin_blaze_theme/version'
# require 'formtastic/inputs/blaze_array_input'
require 'formtastic/inputs/blaze_toggle_input'

module ActiveAdminBlazeTheme
  module Rails
    class Engine < ::Rails::Engine
    end
  end
end

ActiveAdmin::Views::IndexAsTable::IndexTableFor::TableActions.class_eval do
  def item(*args)
    cl = args[2][:class]
    if cl.include? 'view_link'
      args[0] = '<span class="icon-eye"></span> '.html_safe + args[0]
      args[2][:class] += ' c-button c-button--info u-xsmall'
    elsif cl.include? 'edit_link'
      args[0] = '<span class="icon-pencil"></span> '.html_safe + args[0]
      args[2][:class] += ' c-button c-button--info u-xsmall'
    elsif cl.include? 'delete_link'
      args[0] = '<span class="icon-bin"></span> '.html_safe + args[0]
      args[2][:class] += ' c-button c-button--error u-xsmall'
    end
    text_node link_to(*args)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activeadmin_blaze_theme-1.1.0 lib/activeadmin_blaze_theme.rb
activeadmin_blaze_theme-1.0.0 lib/activeadmin_blaze_theme.rb
activeadmin_blaze_theme-0.7.10 lib/activeadmin_blaze_theme.rb
activeadmin_blaze_theme-0.7.8 lib/activeadmin_blaze_theme.rb
activeadmin_blaze_theme-0.7.6 lib/activeadmin_blaze_theme.rb
activeadmin_blaze_theme-0.7.4 lib/activeadmin_blaze_theme.rb