boissier_app/app/views/public/home/show.html.haml
2011-07-08 18:33:11 +02:00

114 lines
3.4 KiB
Plaintext

-if flash[:notice]
#flash_notice{:style => "display:none"}=raw(flash[:notice])
<script type="text/javascript">
$.fn.prettyPhoto({
show_title : false,
allow_resize : false,
social_tools : false,
});
="$.prettyPhoto.open('#flash_notice','Information importante');"
</script>
#slider{:style => "width:979px;height:309px;"}
%ul=render :partial => "slide", :collection => @home.slider.slides
.right-arrow
=image_tag "front/fleche-droite.png"
.left-arrow
=image_tag "front/fleche-gauche.png"
#main
.column_1.column
=render :partial => "public/shared/contact_block"
.column_2.column
-block = @home.home_blocks.find_by_slug("left_block")
- if block.cible
-url = block.cible.cible_url
-else
-url = ""
.title=link_to block.title, url
.desc=link_to simple_format(block.description), url
.cible
=link_to image_tag('front/en-savoir-plus-marron.png'), url
.column_3.column
-block = @home.home_blocks.find_by_slug("right_block")
- if block.cible
-url = block.cible.cible_url
-else
-url = ""
.title=link_to block.title, url
.desc=link_to simple_format(block.description), url
.cible
=link_to image_tag('front/en-savoir-plus-marron.png'), url
.clear
#home_promotions
#promotions_header
Promotions
.column_1.column
.cat
Cosmétiques
-if @home.promotion_1
-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
=link_to promotion.title, "/pages/promotions.html"
.description
=link_to simple_format(promotion.description), "/pages/promotions.html"
.column_2.column
.cat
Bébés
-if @home.promotion_2
-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
=link_to promotion.title, "/pages/promotions.html"
.description
=link_to simple_format(promotion.description), "/pages/promotions.html"
.column_3.column
.cat
Hygiène
-if @home.promotion_3
-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
=link_to promotion.title, "/pages/promotions.html"
.description
=link_to simple_format(promotion.description), "/pages/promotions.html"
.clear