apply view

This commit is contained in:
Fu Matthew committed 2013-01-10 18:00:58 +08:00
1 parent 08adb887c5
commit ca51ebc08c
17 files changed
+172 -45

No files matched your search

+25
View File
@@ -21,7 +21,32 @@ module Admin::PagePartsHelper
options_for_select(options, (local_item[:widget_field][i][1] if (local_item && !local_item[:widget_field].blank? && !local_item[:widget_field][i].blank?)) )
end
def tag_checked_value(part,radio_value)
part and (part[:tag] == radio_value) ? true : false
end
def category_checked_value(part,radio_value)
part and (part[:tag] == radio_value) ? true : false
end
def style_checked_value(part,radio_value)
part and (part.widget_style == radio_value) ? true : false
end
def nil_radio_button(part,tag_or_cate)
content_tag :label,:class=>"radio inline" do
op = radio_button("page_part", tag_or_cate, nil, :checked => eval("#{tag_or_cate}_checked_value(part,nil)"))
op << I18n.t("default_widget.no_value")
end
end
def show_default_widget_setting_panel
binding.pry
false
end
def show_custom_widget_setting_panel
end
end