Upgrades and fixes, maintenance
This commit is contained in:
@@ -7,8 +7,8 @@ module ProductCategoryDecorator
|
||||
|
||||
def visible_on
|
||||
sum = week_days.sum
|
||||
return content_tag(:span, '', class: 'icon-eye-close icon-white') if sum.zero?
|
||||
return content_tag(:span, '', class: 'icon-refresh icon-white') if sum == 7 && full_day
|
||||
return content_tag(:span, '', class: 'product-category-visible-never') if sum.zero?
|
||||
return content_tag(:span, '', class: 'product-category-visible-always') if sum == 7 && full_day
|
||||
day_names = I18n.t('date.day_names')
|
||||
days = week_days.map.with_index{|v,i| v == 1 ? day_names[i] : nil}.compact
|
||||
days << days.shift if week_days.first == 1 && supplier.week_starts_on_monday?
|
||||
|
||||
Reference in New Issue
Block a user