partial is rendered when editing a page part

This commit is contained in:
Harry Bomrah 2013-11-07 17:19:18 +08:00 committed by saurabhbhatia
parent 4353b481c7
commit d17953ab86
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,9 @@ class Admin::PagePartsController < OrbitBackendController
@class_options = LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]} @class_options = LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]}
@partial = 'default_widget' @partial = 'default_widget'
else else
@frontend_styles = @module_app.widgets[params[:val]]["style"] rescue nil
# @frontend_styles = @module_app.widgets[params[:val]]["style"] rescue nil
@frontend_styles = @module_app.widgets[@part.widget_path]["style"] rescue nil
@partial = 'custom_widget' if @frontend_styles.present? @partial = 'custom_widget' if @frontend_styles.present?
end end
end end