Class: Marty::TagGrid

Inherits:
Grid
  • Object
show all
Defined in:
app/components/marty/tag_grid.rb

Constant Summary

Constants included from Permissions

Permissions::ALL_ROLES, Permissions::REQ_ROLES

Instance Method Summary collapse

Methods inherited from Grid

#class_can?, #configure_form_window, #get_json_sorter, #has_search_action?

Methods included from Permissions

#can_perform_action?, #can_perform_actions, #current_user_roles, #has_any_perm?, #has_marty_permissions

Instance Method Details

#configure(c) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/components/marty/tag_grid.rb', line 6

def configure(c)
  super

  c.header       = false
  c.model        = "Marty::Tag"
  c.multi_select = false

  c.attributes ||= [:name, :created_dt, :user__name, :comment]

  c.store_config.merge!({sorters: [{property: :created_dt,
                                    direction: 'DESC'}]})
end

#default_bbarObject



45
46
47
# File 'app/components/marty/tag_grid.rb', line 45

def default_bbar
  [:add_in_form]
end

#default_context_menuObject



49
50
51
# File 'app/components/marty/tag_grid.rb', line 49

def default_context_menu
  []
end

#default_form_itemsObject



53
54
55
# File 'app/components/marty/tag_grid.rb', line 53

def default_form_items
  [:comment]
end