Class: Cms::SectionNodesController
Instance Method Summary
collapse
Methods included from PageHelper
#able_to?, #cms_toolbar, #container, #container_has_block?, #current_page, #page_title, #render_breadcrumbs, #render_portlet
Methods included from PathHelper
#cms_connectable_path, #cms_index_path_for, #cms_index_url_for, #cms_new_path_for, #cms_new_url_for, #edit_cms_connectable_path
#handle_access_denied, #handle_server_error, included
Instance Method Details
#index ⇒ Object
4
5
6
7
|
# File 'app/controllers/cms/section_nodes_controller.rb', line 4
def index
@toolbar_tab = :sitemap
@section = Section.root.first
end
|
#move_after ⇒ Object
11
12
13
|
# File 'app/controllers/cms/section_nodes_controller.rb', line 11
def move_after
move(:after)
end
|
#move_before ⇒ Object
8
9
10
|
# File 'app/controllers/cms/section_nodes_controller.rb', line 8
def move_before
move(:before)
end
|
#move_to_beginning ⇒ Object
14
15
16
|
# File 'app/controllers/cms/section_nodes_controller.rb', line 14
def move_to_beginning
move_to(:beginning)
end
|
#move_to_end ⇒ Object
17
18
19
|
# File 'app/controllers/cms/section_nodes_controller.rb', line 17
def move_to_end
move_to(:end)
end
|
#move_to_root ⇒ Object
20
21
22
23
24
25
|
# File 'app/controllers/cms/section_nodes_controller.rb', line 20
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
|