Class: Pageflow::Admin::GroupedFolderList

Inherits:
ViewComponent
  • Object
show all
Defined in:
app/views/components/pageflow/admin/grouped_folder_list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ViewComponent

builder_method

Instance Attribute Details

#foldersObject (readonly)

Returns the value of attribute folders


6
7
8
# File 'app/views/components/pageflow/admin/grouped_folder_list.rb', line 6

def folders
  @folders
end

Instance Method Details

#build(folders, options = {}) ⇒ Object


8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/views/components/pageflow/admin/grouped_folder_list.rb', line 8

def build(folders, options = {})
  super(options.slice(:class))

  @folders = folders
  @active_id = options[:active_id]

  build_all_link

  if options[:grouped_by_accounts]
    build_folder_list_grouped_by_accounts
  else
    build_folder_list(folders)
  end
end