Use module_app label instead of title
This commit is contained in:
parent
49c1bff005
commit
6bc00ce3a3
|
@ -36,7 +36,7 @@ class Admin::ItemsController < OrbitBackendController
|
||||||
end
|
end
|
||||||
modules = ModuleApp.for_frontend_select.inject([]) do |module_apps, module_app|
|
modules = ModuleApp.for_frontend_select.inject([]) do |module_apps, module_app|
|
||||||
m = {}
|
m = {}
|
||||||
m["main"] = [module_app.title, module_app.id.to_s]
|
m["main"] = [module_app.label, module_app.id.to_s]
|
||||||
m["sub"] = module_app.app_pages.map{|name, data| [t(data["i18n"]), name]} rescue []
|
m["sub"] = module_app.app_pages.map{|name, data| [t(data["i18n"]), name]} rescue []
|
||||||
m["sub"] << [I18n.t('default_widget.default_widget'),'default_widget'] if module_app.has_default_widget?
|
m["sub"] << [I18n.t('default_widget.default_widget'),'default_widget'] if module_app.has_default_widget?
|
||||||
m["category"] = module_app.categories.map{|category| [category.title, category.id.to_s] } rescue ''
|
m["category"] = module_app.categories.map{|category| [category.title, category.id.to_s] } rescue ''
|
||||||
|
|
|
@ -59,7 +59,7 @@ class Admin::PagePartsController < OrbitBackendController
|
||||||
def get_page_module_json
|
def get_page_module_json
|
||||||
modules = ModuleApp.for_widget_select.inject([]) do |module_apps, module_app|
|
modules = ModuleApp.for_widget_select.inject([]) do |module_apps, module_app|
|
||||||
m = {}
|
m = {}
|
||||||
m["main"] = [module_app.title, module_app.id.to_s]
|
m["main"] = [module_app.label, module_app.id.to_s]
|
||||||
m["sub"] = module_app.widgets.map{|name, data| [t(data["i18n"]), name]} rescue []
|
m["sub"] = module_app.widgets.map{|name, data| [t(data["i18n"]), name]} rescue []
|
||||||
m["category"] = module_app.categories.map{|category| [category.title, category.id.to_s] } rescue ''
|
m["category"] = module_app.categories.map{|category| [category.title, category.id.to_s] } rescue ''
|
||||||
m["tags"] = module_app.tags.map{|tag| [tag.name, tag.id.to_s] } rescue ''
|
m["tags"] = module_app.tags.map{|tag| [tag.name, tag.id.to_s] } rescue ''
|
||||||
|
|
Loading…
Reference in New Issue