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
|
if @item.module_app
|
||||||
@module_app = @item.module_app
|
@module_app = @item.module_app
|
||||||
|
@frontend_path = @item.app_frontend_url
|
||||||
|
|
||||||
@frontend_path = @item.app_frontend_url ? @item.app_frontend_url : @module_app.widgets.keys[0]
|
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?
|
||||||
if @module_app && @module_app.widgets && @module_app.widgets.any?{|b| b.class == Array}
|
end
|
||||||
@frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank?
|
|
||||||
end
|
|
||||||
|
|
||||||
case @item.module_app.key
|
case @item.module_app.key
|
||||||
when 'announcement'
|
when 'announcement'
|
||||||
|
@ -59,7 +58,7 @@ helper Admin::PagePartsHelper
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@categories = nil
|
@categories = nil
|
||||||
@module_app = @module_apps[0]
|
@module_app = @module_apps[0]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue