diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index 837994e99..3c0a9997b 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -148,7 +148,22 @@ include Admin::FrontendWidgetInterface else flash.now[:error] = t('create.error.page') @designs = Design.all.entries - @design = Design.first + @design = Design.find(params[:page][:design]) || Design.first + @themes = @design.themes + @module_apps = ModuleApp.for_frontend_select + @selected={ + :design => params[:page][:design], + :theme=> (Theme.find(params[:page][:theme_id]) rescue nil), + :module_app=> (ModuleApp.find(params[:page][:module_app_id]) rescue nil) ,#@module_apps.first + :app_frontend_url=> params[:page][:app_frontend_url], #@module_apps.first + :category=>params[:page][:category], + :tag=>params[:page][:tag], + :page_frontend_data_count=>params[:page][:page_frontend_data_count], + :frontend_style => params[:page][:frontend_style] + } + @app_frontend_urls = @item.module_app ? select_array_for_app_frontend_urls(@item.module_app.app_pages) : nil + get_categories_and_tags + get_frontend_data_count render :action => "new" end end