Class: Cms::SectionNodesController
Instance Method Summary
collapse
Methods included from PageHelper
#able_to?, #cms_content_editor, #cms_toolbar, #container, #container_has_block?, #current_page, #page_title, #render_breadcrumbs, #render_portlet
Methods included from PathHelper
#attachment_path_for, #cms_connectable_path, #cms_index_path_for, #cms_index_url_for, #cms_new_path_for, #cms_new_url_for, #cms_sortable_column_path, #edit_cms_connectable_path, #engine_for, #link_to_usages, #path_elements_for
#handle_access_denied, #handle_server_error, #with_format
Instance Method Details
#index ⇒ Object
7
8
9
10
11
12
13
14
15
|
# File 'app/controllers/cms/section_nodes_controller.rb', line 7
def index
@toolbar_tab = :sitemap
@modifiable_sections = current_user.modifiable_sections
@public_sections = Group.guest.sections.all
@sitemap = Section.sitemap
@root_section_node = @sitemap.keys.first
@section = @root_section_node.node
end
|
#move_after ⇒ Object
21
22
23
|
# File 'app/controllers/cms/section_nodes_controller.rb', line 21
def move_after
move(:after)
end
|
#move_before ⇒ Object
17
18
19
|
# File 'app/controllers/cms/section_nodes_controller.rb', line 17
def move_before
move(:before)
end
|
#move_to_beginning ⇒ Object
25
26
27
|
# File 'app/controllers/cms/section_nodes_controller.rb', line 25
def move_to_beginning
move_to(:beginning)
end
|
#move_to_end ⇒ Object
29
30
31
|
# File 'app/controllers/cms/section_nodes_controller.rb', line 29
def move_to_end
move_to(:end)
end
|
#move_to_root ⇒ Object
33
34
35
36
37
38
|
# File 'app/controllers/cms/section_nodes_controller.rb', line 33
def move_to_root
@section_node = SectionNode.find(params[:id])
@root = Section.root.find(params[:section_id])
@section_node.move_to(@root, 0)
render :json => {:success => true, :message => "'#{@section_node.node.name}' was moved to '#{@root.name}'"}
end
|