1.fix parent page 2.add page title
This commit is contained in:
1 parent
38e365e4b5
commit
9f1ba2ae66
9 files changed
+61
-48
No files matched your search
@@ -3,7 +3,7 @@ class Admin::PagesController < ApplicationController
|
||||
layout "admin"
|
||||
|
||||
def index
|
||||
@pages = Page.all( :conditions => { :parent_page_id => "root" } )
|
||||
@pages = Page.all( :conditions => { :parent_page_name => params[:parent] || "root" } )
|
||||
end
|
||||
|
||||
def show
|
||||
@@ -15,7 +15,7 @@ class Admin::PagesController < ApplicationController
|
||||
def new
|
||||
@page = Page.new
|
||||
@page.is_published = true
|
||||
@page.parent_page_id = params[:parent_page_id]
|
||||
@page.parent_page_name = params[:parent_page_name]
|
||||
end
|
||||
|
||||
def edit
|
||||
@@ -27,7 +27,7 @@ class Admin::PagesController < ApplicationController
|
||||
|
||||
if @page.save
|
||||
flash[:notice] = 'Page was successfully created.'
|
||||
redirect_to admin_pages_url
|
||||
redirect_to admin_pages_url( :parent_page_name => @page.parent_page_name )
|
||||
else
|
||||
render :action => "new"
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user