Upgrades and fixes, maintenance

This commit is contained in:
2014-06-09 19:07:46 +02:00
parent 78a894759b
commit 0e4993e8a6
23 changed files with 87 additions and 57 deletions
+2 -2
View File
@@ -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?