Fixed page data count

This commit is contained in:
saurabhbhatia committed 2013-12-12 12:49:20 +08:00
1 parent 85778224a1
commit 6c01d517d2
5 files changed
+22 -3

No files matched your search

+10 -1
View File
@@ -28,7 +28,7 @@ module OrbitApp
end
class DataSheet
attr_reader :name,:key,:base_path,:module_label,:data_count, :has_category, :has_tag, :approvable_models, :authorizable_models, :is_approvable, :is_authorizable, :enable_widget_data_count
attr_reader :name,:key,:base_path,:module_label,:data_count, :has_category, :has_tag, :approvable_models, :authorizable_models, :is_approvable, :is_authorizable, :enable_widget_data_count, :enable_page_data_count
def initialize(name, &block)
@name = name
@@ -44,6 +44,7 @@ module OrbitApp
@is_approvable = nil
@is_authorizable = nil
@enable_widget_data_count = true
@enable_page_data_count = true
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
setup_module_app
end
@@ -68,6 +69,10 @@ module OrbitApp
@enable_widget_data_count
end
def get_enable_page_data_count
@enable_page_data_count
end
def get_label_i18n
@module_label
end
@@ -173,6 +178,10 @@ module OrbitApp
@enable_widget_data_count = enable
end
def enable_page_data_count(enable = true)
@enable_page_data_count = enable
end
def approvable_on(klass = 'Category')
@approvable_models << klass
end