daily commit
This commit is contained in:
1 parent
0cc616f988
commit
979df9ac80
20 files changed
+179
-132
No files matched your search
@@ -36,20 +36,35 @@ module Admin::PagePartsHelper
|
||||
end
|
||||
|
||||
def tag_checked_value(part,radio_value)
|
||||
part and (part[:tag] == radio_value.to_s) ? true : false
|
||||
if radio_value.blank?
|
||||
part[:tag].blank?? true : false
|
||||
else
|
||||
part and (part[:tag] == radio_value.to_s) ? true : false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def category_checked_value(part,radio_value)
|
||||
part and (part[:category] == radio_value.to_s) ? true : false
|
||||
if radio_value.blank?
|
||||
part[:category].blank?? true : false
|
||||
else
|
||||
part and (part[:category] == radio_value.to_s) ? true : false
|
||||
end
|
||||
end
|
||||
|
||||
def style_checked_value(part,radio_value)
|
||||
case part
|
||||
when Page
|
||||
(part.frontend_style == radio_value) ? true : false
|
||||
if part.frontend_style.nil? && radio_value == "typeA"
|
||||
true
|
||||
else
|
||||
(part.frontend_style == radio_value) ? true : false
|
||||
end
|
||||
when PagePart
|
||||
(part.widget_style == radio_value) ? true : false
|
||||
if part.widget_style.nil? && radio_value == "typeA"
|
||||
true
|
||||
else
|
||||
(part.widget_style == radio_value) ? true : false
|
||||
end
|
||||
when nil
|
||||
false
|
||||
end
|
||||
@@ -69,7 +84,7 @@ module Admin::PagePartsHelper
|
||||
end
|
||||
|
||||
def show_default_widget_setting_panel
|
||||
if @module_app.has_default_widget? && (!@user_choose.nil? && @user_choose== 'default_widget') #&& @part.widget_path == 'default_widget'
|
||||
if @module_app && @module_app.has_default_widget? && (!@user_choose.nil? && @user_choose== 'default_widget') #&& @part.widget_path == 'default_widget'
|
||||
true
|
||||
else
|
||||
false
|
||||
|
||||
Reference in new issue
Block a user