first version of confined sidebar render

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-11-20 15:56:52 +08:00
1 parent b4a2737407
commit c6894be962
18 files changed
+353 -158

No files matched your search

+11 -4
View File
@@ -10,8 +10,8 @@ module OrbitApp
@@registrations << DataSheet.new(name,&block)
end
def new_from_module_app(name,base_path,arg)
@@registrations << DataSheet.new(name,arg,:base_path=>base_path)
def new_from_module_app(name,base_path,*args)
@@registrations << DataSheet.new(name,args,:base_path=>base_path)
end
def find_by_key(key)
@@ -35,14 +35,21 @@ module OrbitApp
attr_reader :name
attr_reader :base_path
def name
if @name.is_a? Proc
@name.call
else
@name
end
end
def initialize(name,partial=nil,*args ,&block)
@base_path = args[0][:base_path]
@name = name
@name = partial[0][:i18n].nil? ? name : lambda{ I18n.t(partial[0][:i18n]) }
@partial_path = ''
unless partial.nil?
@partial_path = partial[:path]
@partial_path = partial[0][:path]
end
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?