diff --git a/app/helpers/default_widget_helper.rb b/app/helpers/default_widget_helper.rb index 32fccb209..3536525ca 100644 --- a/app/helpers/default_widget_helper.rb +++ b/app/helpers/default_widget_helper.rb @@ -3,6 +3,13 @@ module DefaultWidgetHelper I18n.t("#{@page_part.module_app.key}.default_widget.#{field}") end + def get_top_hot_class(row_data) + class_attr = [] + class_attr << 'data_is_hot' if( row_data.is_hot? rescue false ) + class_attr << 'data_is_top' if( row_data.is_top? rescue false) + return class_attr.join(" ") + end + def link_to_field(row_data,field, switch, options=nil) method_ary = @page_part.module_app.widget_fields_link_method field = field.to_sym diff --git a/app/views/default_widget/_typeA.html.erb b/app/views/default_widget/_typeA.html.erb index d419554d4..910d23b6a 100644 --- a/app/views/default_widget/_typeA.html.erb +++ b/app/views/default_widget/_typeA.html.erb @@ -9,7 +9,7 @@ <% @data.each do |row_data| %> -