Fix item looking for widget when no front end
This commit is contained in:
parent
6d1f919bb7
commit
9e9620c04a
|
@ -36,12 +36,11 @@ helper Admin::PagePartsHelper
|
|||
|
||||
if @item.module_app
|
||||
@module_app = @item.module_app
|
||||
|
||||
@frontend_path = @item.app_frontend_url ? @item.app_frontend_url : @module_app.widgets.keys[0]
|
||||
@frontend_path = @item.app_frontend_url
|
||||
|
||||
if @module_app && @module_app.widgets && @module_app.widgets.any?{|b| b.class == Array}
|
||||
@frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank?
|
||||
end
|
||||
if @module_app && @module_app.widgets && @module_app.widgets.any?{|b| b.class == Array}
|
||||
@frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank?
|
||||
end
|
||||
|
||||
case @item.module_app.key
|
||||
when 'announcement'
|
||||
|
@ -59,7 +58,7 @@ helper Admin::PagePartsHelper
|
|||
end
|
||||
else
|
||||
@categories = nil
|
||||
@module_app = @module_apps[0]
|
||||
@module_app = @module_apps[0]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue