diff options
16 files changed, 34 insertions, 15 deletions
diff --git a/app/controllers/admin/blog/categories_controller.rb b/app/controllers/admin/blog/categories_controller.rb index ddce1c8..09fa802 100644 --- a/app/controllers/admin/blog/categories_controller.rb +++ b/app/controllers/admin/blog/categories_controller.rb @@ -1,5 +1,7 @@ class Admin::Blog::CategoriesController < Admin::BaseController - crudify :blog_category, :title_attribute => :name, :order => 'created_at DESC' + crudify :blog_category, + :title_attribute => :name, + :order => 'created_at DESC' end diff --git a/app/controllers/admin/blog/comments_controller.rb b/app/controllers/admin/blog/comments_controller.rb index ba9593a..33b3463 100644 --- a/app/controllers/admin/blog/comments_controller.rb +++ b/app/controllers/admin/blog/comments_controller.rb @@ -1,6 +1,8 @@ class Admin::Blog::CommentsController < Admin::BaseController - crudify :blog_comment, :title_attribute => :name, :order => 'created_at DESC' + crudify :blog_comment, + :title_attribute => :name, + :order => 'created_at DESC' def index @blog_comments = BlogComment.unmoderated diff --git a/app/controllers/admin/blog/posts_controller.rb b/app/controllers/admin/blog/posts_controller.rb index 2acde56..402748e 100644 --- a/app/controllers/admin/blog/posts_controller.rb +++ b/app/controllers/admin/blog/posts_controller.rb @@ -1,7 +1,11 @@ class Admin::Blog::PostsController < Admin::BaseController - crudify :blog_post, :title_attribute => :title, :order => 'created_at DESC' - before_filter :find_all_categories, :only => [:new, :edit, :create, :update] + crudify :blog_post, + :title_attribute => :title, + :order => 'created_at DESC' + + before_filter :find_all_categories, + :only => [:new, :edit, :create, :update] protected def find_all_categories diff --git a/generators/refinery_blog/refinery_blog_generator.rb b/generators/refinery_blog/refinery_blog_generator.rb index 304ea39..137ecab 100644 --- a/generators/refinery_blog/refinery_blog_generator.rb +++ b/generators/refinery_blog/refinery_blog_generator.rb @@ -12,6 +12,17 @@ class RefineryBlogGenerator < Rails::Generator::NamedBase def manifest record do |m| + if Rails.version < 3 + matches = Dir[File.expand_path('../../../public/images/**/*', __FILE__)] + matches.reject{|d| !File.directory?(d)}.each do |dir| + m.directory((%w(public) | dir.split('public/').last.split('/')).join('/')) + end + matches.reject{|f| File.directory?(f)}.each do |image| + path = (%w(public) | image.split('public/').last.split('/'))[0...-1].join('/') + m.template "../../../#{path}/#{image.split('/').last}", "#{path}/#{image.split('/').last}" + end + end + m.template('seed.rb', 'db/seeds/refinerycms_blog.rb') m.migration_template('migration.rb', 'db/migrate', diff --git a/public/images/refinerycms-blog/icons/cog.png b/public/images/refinerycms-blog/icons/cog.png Binary files differnew file mode 100644 index 0000000..67de2c6 --- /dev/null +++ b/public/images/refinerycms-blog/icons/cog.png diff --git a/public/images/refinerycms-blog/icons/comment.png b/public/images/refinerycms-blog/icons/comment.png Binary files differnew file mode 100644 index 0000000..7bc9233 --- /dev/null +++ b/public/images/refinerycms-blog/icons/comment.png diff --git a/public/images/refinerycms-blog/icons/comment_cross.png b/public/images/refinerycms-blog/icons/comment_cross.png Binary files differnew file mode 100644 index 0000000..6f8102d --- /dev/null +++ b/public/images/refinerycms-blog/icons/comment_cross.png diff --git a/public/images/refinerycms-blog/icons/comment_tick.png b/public/images/refinerycms-blog/icons/comment_tick.png Binary files differnew file mode 100644 index 0000000..bcb3ae4 --- /dev/null +++ b/public/images/refinerycms-blog/icons/comment_tick.png diff --git a/public/images/refinerycms-blog/icons/comments.png b/public/images/refinerycms-blog/icons/comments.png Binary files differnew file mode 100644 index 0000000..39433cf --- /dev/null +++ b/public/images/refinerycms-blog/icons/comments.png diff --git a/public/images/refinerycms-blog/icons/folder.png b/public/images/refinerycms-blog/icons/folder.png Binary files differnew file mode 100644 index 0000000..784e8fa --- /dev/null +++ b/public/images/refinerycms-blog/icons/folder.png diff --git a/public/images/refinerycms-blog/icons/folder_add.png b/public/images/refinerycms-blog/icons/folder_add.png Binary files differnew file mode 100644 index 0000000..529fe8f --- /dev/null +++ b/public/images/refinerycms-blog/icons/folder_add.png diff --git a/public/images/refinerycms-blog/icons/folder_edit.png b/public/images/refinerycms-blog/icons/folder_edit.png Binary files differnew file mode 100644 index 0000000..ad669cc --- /dev/null +++ b/public/images/refinerycms-blog/icons/folder_edit.png diff --git a/public/images/refinerycms-blog/icons/page.png b/public/images/refinerycms-blog/icons/page.png Binary files differnew file mode 100644 index 0000000..03ddd79 --- /dev/null +++ b/public/images/refinerycms-blog/icons/page.png diff --git a/public/images/refinerycms-blog/icons/page_add.png b/public/images/refinerycms-blog/icons/page_add.png Binary files differnew file mode 100644 index 0000000..d5bfa07 --- /dev/null +++ b/public/images/refinerycms-blog/icons/page_add.png diff --git a/public/images/refinerycms-blog/icons/page_copy.png b/public/images/refinerycms-blog/icons/page_copy.png Binary files differnew file mode 100644 index 0000000..195dc6d --- /dev/null +++ b/public/images/refinerycms-blog/icons/page_copy.png diff --git a/public/stylesheets/refinerycms-blog.css b/public/stylesheets/refinerycms-blog.css index 7068160..cc6f582 100644 --- a/public/stylesheets/refinerycms-blog.css +++ b/public/stylesheets/refinerycms-blog.css @@ -1,33 +1,33 @@ .comments_icon { - background-image: url('/images/refinery/icons/comments.png'); + background-image: url('/images/refinerycms-blog/icons/comments.png'); } .comment_icon { - background-image: url('/images/refinery/icons/comment.png'); + background-image: url('/images/refinerycms-blog/icons/comment.png'); } .comment_cross_icon { - background-image: url('/images/refinery/icons/comment_cross.png'); + background-image: url('/images/refinerycms-blog/icons/comment_cross.png'); } .comment_tick_icon { - background-image: url('/images/refinery/icons/comment_tick.png'); + background-image: url('/images/refinerycms-blog/icons/comment_tick.png'); } .folder_icon { - background-image: url('/images/refinery/icons/folder.png'); + background-image: url('/images/refinerycms-blog/icons/folder.png'); } .folder_add_icon { - background-image: url('/images/refinery/icons/folder_add.png'); + background-image: url('/images/refinerycms-blog/icons/folder_add.png'); } .folder_edit_icon { - background-image: url('/images/refinery/icons/folder_edit.png'); + background-image: url('/images/refinerycms-blog/icons/folder_edit.png'); } .settings_icon { - background-image: url('/images/refinery/icons/cog.png'); + background-image: url('/images/refinerycms-blog/icons/cog.png'); } .page_icon { - background-image: url('/images/refinery/icons/page.png'); + background-image: url('/images/refinerycms-blog/icons/page.png'); } .page_copy_icon { - background-image: url('/images/refinery/icons/page_copy.png'); + background-image: url('/images/refinerycms-blog/icons/page_copy.png'); } .page_add_icon { - background-image: url('/images/refinery/icons/page_add.png'); + background-image: url('/images/refinerycms-blog/icons/page_add.png'); }
\ No newline at end of file |