fix widget and fronted setting interface. checked with Spen

This commit is contained in:
Matt K. Fu committed 2013-04-17 14:16:24 +08:00
1 parent dc5f24ab22
commit 425a320c02
9 files changed
+20 -17

No files matched your search

+9 -2
View File
@@ -20,10 +20,17 @@ class ModuleApp
end
scope :for_frontend_select,where(:key.in => OrbitApp::Module::FrontendUtility.all.keys).excludes(widgets: nil).where(enable_frontend: true).order_by(:title, :asc)
scope :for_widget_select,where(:key.in=>OrbitApp::Module::WidgetUtility.all.keys).order_by(:title, :asc)
# scope :for_frontend_select,
scope :standard_sorting ,order_by(:title, :asc)
def self.for_widget_select
where(:key.in=>OrbitApp::Module::WidgetUtility.all.keys).order_by(:title, :asc)
end
def self.for_frontend_select
where(:key.in => OrbitApp::Module::FrontendUtility.all.keys).excludes(widgets: nil).where(enable_frontend: true).order_by(:title, :asc)
end
def enable_frontend?
self[:enable_frontend]
end