From 6bc00ce3a32b9afe52be86179a6b078b5c5e1931 Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 29 Oct 2013 11:17:02 +0800 Subject: [PATCH] Use module_app label instead of title --- app/controllers/admin/items_controller.rb | 2 +- app/controllers/admin/page_parts_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/items_controller.rb b/app/controllers/admin/items_controller.rb index 12a2fbebd..bd7c7b4ac 100644 --- a/app/controllers/admin/items_controller.rb +++ b/app/controllers/admin/items_controller.rb @@ -36,7 +36,7 @@ class Admin::ItemsController < OrbitBackendController end modules = ModuleApp.for_frontend_select.inject([]) do |module_apps, module_app| 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"] << [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 '' diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index 7eabe2688..2ca713416 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -59,7 +59,7 @@ class Admin::PagePartsController < OrbitBackendController def get_page_module_json modules = ModuleApp.for_widget_select.inject([]) do |module_apps, module_app| 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["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 ''