Permalink
Browse files

Merge remote branch 'stevenheidel/master'

  • Loading branch information...
2 parents 832b4d0 + 4cb1615 commit 464c95ea133a0d6c16eac0b7ace48755c7cbfa78 @parndt parndt committed Aug 10, 2010
Showing with 12 additions and 0 deletions.
  1. +7 −0 bin/refinerycms
  2. +5 −0 vendor/plugins/themes/generators/refinery_theme/refinery_theme_generator.rb
View
@@ -17,6 +17,13 @@ else
Pathname.new(File.expand_path(File.dirname(__FILE__) << "/.."))
end
+require refinery_root.join('vendor', 'plugins', 'refinery', 'lib', 'refinery.rb')
+
+if ARGV.include?("-v") or ARGV.include?("--version")
+ puts Refinery::Version
+ exit
+end
+
unless (app_path = ARGV.shift).nil? or app_path.length == 0
# if "" or "." or "./" is specified then get the current directory otherwise accept the specified app_path.
if (app_path.length <= 2 and ((is_current_dir = app_path =~ /(\.(\/)?)/).nil? or is_current_dir < 2))
@@ -28,6 +28,11 @@ def manifest
m.directory "themes/#{theme_name}/views/pages"
m.file "views/pages/show.html.erb", "themes/#{theme_name}/views/pages/show.html.erb"
m.file "views/pages/home.html.erb", "themes/#{theme_name}/views/pages/home.html.erb"
+
+ m.directory "themes/#{theme_name}/views/shared"
+ ["content_page", "footer", "head", "header", "menu", "menu_branch"].each do |partial|
+ m.file "../../../../refinery/app/views/shared/_#{partial}.html.erb","themes/#{theme_name}/views/shared/_#{partial}.html.erb"
+ end
puts 'NOTE: If you want this new theme to be the current theme used, set the "theme"
setting in the Refinery backend to the name of this theme.' unless RAILS_ENV == "test"

0 comments on commit 464c95e

Please sign in to comment.