Revert ff82391b7d0d17c17568ed21176b8b0112a34e31^..HEAD

This commit is contained in:
Matthew Kaito Juyuan Fu committed 2011-10-20 10:06:06 +08:00
1 parent ff82391b7d
commit cb07a35cc9
97 files changed
+1037 -79

No files matched your search

@@ -28,6 +28,7 @@ class Admin::PagePartsController < ApplicationController
@partial = 'edit_text'
@part_locale = params[:part_locale] || I18n.locale.to_s
when 'module'
@plugins=[{:module=>"Blog",:widgets=>[{:name=>"Blog",:path=>"panel/blog/widget_latest_post"},{:name=>"Blog",:path=>"panel/blog/widget_index"}]}]
when 'snippet'
end
end
+21
View File
@@ -6,6 +6,25 @@ class ApplicationController < ActionController::Base
helper :all
before_filter :set_locale, :set_site
def get_all_app_engines
ary = ["vender/plugins/NewBlog"]
app_engines = ary.collect{|t|
Rails::Engine.find t
}
app_engines.each{ |t|
# t.
}
end
def flaten_controller
ary=[]
Find.find(File.join(Rails.root , 'vendor/plugins/')) { |name|
require_dependency(name) if /_controller\.rb$/ =~ name
ary << name
}
ary
end
# Find the parent for the given item
def find_parent_item
@parent_item = Item.first(:conditions => { :id => BSON::ObjectId(params[:parent_id]) }) rescue nil
@@ -78,4 +97,6 @@ class ApplicationController < ActionController::Base
Item.first(:conditions => {:parent_id => nil})
end
end