promotions

This commit is contained in:
Nicolas Bally 2012-09-14 12:15:04 +02:00
parent f463b538f7
commit 1f9a37ad60
2 changed files with 4 additions and 13 deletions

View File

@ -44,10 +44,7 @@
-promotion = @home.promotion_1
-if promotion.month.beginning_of_month == Date.today.beginning_of_month
.label=link_to image_tag('front/en-cours.png'), "/pages/promotions.html"
-elsif promotion.month.beginning_of_month == Date.today.next_month.beginning_of_month
.label=link_to image_tag('front/a-venir.png'), "/pages/promotions.html"
.img
=link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html" if promotion.image_file
.title
@ -61,10 +58,7 @@
-promotion = @home.promotion_2
-if promotion.month.beginning_of_month == Date.today.beginning_of_month
.label=link_to image_tag('front/en-cours.png'), "/pages/promotions.html"
-elsif promotion.month.beginning_of_month == Date.today.next_month.beginning_of_month
.label=link_to image_tag('front/a-venir.png'), "/pages/promotions.html"
.img
=link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html" if promotion.image_file
.title
@ -78,10 +72,7 @@
-promotion = @home.promotion_3
-if promotion.month.beginning_of_month == Date.today.beginning_of_month
.label=link_to image_tag('front/en-cours.png'), "/pages/promotions.html"
-elsif promotion.month.beginning_of_month == Date.today.next_month.beginning_of_month
.label=link_to image_tag('front/a-venir.png'), "/pages/promotions.html"
.img
=link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html" if promotion.image_file
.title

View File

@ -2,7 +2,7 @@
.img
=image_tag promotion.image_file.file.square.url if promotion.image_file
=image_tag promotion.image_file.file.large.medium.small.thumb.url if promotion.image_file
.title
%h3=promotion.title