Class: Releaf::Content::Nodes::IndexBuilder
- Inherits:
-
Builders::IndexBuilder
- Object
- Builders::IndexBuilder
- Releaf::Content::Nodes::IndexBuilder
show all
- Includes:
- Builders::Toolbox, Builders::Tree
- Defined in:
- app/builders/releaf/content/nodes/index_builder.rb
Instance Method Summary
collapse
#body_classes, #build_tree, #empty_body, #root_level, #section_body, #sort_tree, #sorted_tree, #tree, #tree_level, #tree_resource, #tree_resource_children, #tree_resource_collapser, #tree_resource_name, #tree_resource_name_button
Instance Method Details
16
17
18
|
# File 'app/builders/releaf/content/nodes/index_builder.rb', line 16
def
false
end
|
20
21
22
|
# File 'app/builders/releaf/content/nodes/index_builder.rb', line 20
def resource_creation_button
button(t("Create new resource"), "plus", class: %w(primary ajaxbox), href: url_for(controller: controller.controller_name, action: "content_type_dialog"))
end
|
#tree_resource_blocks(resource, level, expanded) ⇒ Object
6
7
8
|
# File 'app/builders/releaf/content/nodes/index_builder.rb', line 6
def tree_resource_blocks(resource, level, expanded)
[tree_resource_toolbox(resource)] + super
end
|
10
11
12
13
14
|
# File 'app/builders/releaf/content/nodes/index_builder.rb', line 10
def tree_resource_toolbox(resource)
tag(:div, class: "only-icon toolbox-cell") do
toolbox(resource[:node], index_path: index_path)
end
end
|