Add Page position and parent_page_id

This commit is contained in:
Wen-Tien Chang committed 2009-05-22 14:43:52 +08:00
1 parent 96f186a71b
commit a4c900af4d
6 files changed
+70 -33

No files matched your search

+4 -2
View File
@@ -5,7 +5,7 @@ class Admin::PagesController < ApplicationController
# GET /pages
# GET /pages.xml
def index
@pages = Page.all
@pages = Page.all( :conditions => { :parent_page_id => "root" } )
respond_to do |format|
format.html # index.html.erb
@@ -25,7 +25,9 @@ class Admin::PagesController < ApplicationController
# GET /pages/new.xml
def new
@page = Page.new
@page.is_published = true
@page.parent_page_id = params[:parent_page_id]
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @pages }