Create page.

This commit is contained in:
chris2tof committed 2011-06-01 10:24:14 +08:00
1 parent 2522cde2f5
commit ddc7c74436
21 files changed
+163 -83

No files matched your search

+4 -4
View File
@@ -51,15 +51,15 @@ namespace :dev do
layout = Layout.create!( :name => 'root', :description => 'root', :content => File.open("#{RAILS_ROOT}/lib/template/root.layout").read )
layout.layout_parts.create!( :name => 'header', :content => "<r:language_bar /><r:snippet name='nav' />" )
layout.layout_parts.create!( :name => 'header', :content => File.open("#{RAILS_ROOT}/lib/template/nav.snippet").read )
layout.layout_parts.create!( :name => 'main_content' )
layout.layout_parts.create!( :name => 'footer', :content => "<r:snippet name='footer' />" )
layout.layout_parts.create!( :name => 'footer', :content => File.open("#{RAILS_ROOT}/lib/template/footer.snippet").read )
home = Page.create!( :i18n_variable_id => var_10.id, :layout_id => layout.id, :name => 'home', :is_published => true )
home.page_parts.create!( :name => 'main_content', :content => "<r:locale en='This is the homepage' zh_tw='這是首頁' />", :kind => 'text', :i18n_variable_id => var_13.id )
home.page_parts.create!( :name => 'main_content', :content => File.open("#{RAILS_ROOT}/lib/template/home.page").read, :kind => 'text', :i18n_variable_id => var_13.id )
about = Page.create!( :i18n_variable_id => var_11.id, :layout_id => layout.id, :name => 'about', :is_published => true, :parent_id => home.id )
about.page_parts.create!( :name => 'main_content', :content => "<r:locale en='This is about' zh_tw='這是關於' />", :kind => 'text', :i18n_variable_id => var_14.id )
about.page_parts.create!( :name => 'main_content', :content => File.open("#{RAILS_ROOT}/lib/template/about.page").read, :kind => 'text', :i18n_variable_id => var_14.id )
Link.create!( :i18n_variable_id => var_12.id, :name => 'google', :is_published => true, :parent_id => home.id, :url => 'www.google.com' )