Module: Netzke::Grid::Actions

Extended by:
ActiveSupport::Concern
Included in:
Base, Tree::Base
Defined in:
lib/netzke/grid/actions.rb

Instance Method Summary collapse

Instance Method Details

#has_add_action?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/netzke/grid/actions.rb', line 47

def has_add_action?
  allowed_to?(:create)
end

#has_add_in_form_action?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/netzke/grid/actions.rb', line 51

def has_add_in_form_action?
  allowed_to?(:create) && config.editing == :both
end

#has_apply_action?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/netzke/grid/actions.rb', line 63

def has_apply_action?
  config.edits_inline && (allowed_to?(:create) || allowed_to?(:update))
end

#has_delete_action?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/netzke/grid/actions.rb', line 67

def has_delete_action?
  allowed_to?(:delete)
end

#has_edit_action?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/netzke/grid/actions.rb', line 55

def has_edit_action?
  allowed_to?(:update)
end

#has_edit_in_form_action?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/netzke/grid/actions.rb', line 59

def has_edit_in_form_action?
  allowed_to?(:update) && config.editing == :both
end

#has_search_action?Boolean

Returns:

  • (Boolean)


71
72
73
# File 'lib/netzke/grid/actions.rb', line 71

def has_search_action?
  true
end