Ajout des horaires d'ouvertures + prettyphoto pour messages
This commit is contained in:
parent
f634d89dfc
commit
380c24055a
@ -27,7 +27,7 @@ class Public::MenuItemsController < ApplicationController
|
|||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
redirect_to "/404.html"
|
redirect_to "/", :notice => "La page que vous demandez n'a pas pu être trouvée.<br /><br />Vous avez donc été redirigé sur notre page d'accueil"
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,18 @@
|
|||||||
|
-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;"}
|
#slider{:style => "width:979px;height:309px;"}
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,9 +37,21 @@
|
|||||||
=menu_item_link(menu_item)
|
=menu_item_link(menu_item)
|
||||||
>
|
>
|
||||||
=@menu_item.name
|
=@menu_item.name
|
||||||
|
|
||||||
-if flash[:notice]
|
-if flash[:notice]
|
||||||
#flash_notice= raw flash[:notice]
|
#flash_notice=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>
|
||||||
|
|
||||||
=render @menu_item.menu_content.blocks[0]
|
=render @menu_item.menu_content.blocks[0]
|
||||||
.clear
|
.clear
|
||||||
|
|
||||||
|
@ -1,12 +1,34 @@
|
|||||||
#contact_block
|
#contact_block
|
||||||
#horaires.content
|
#horaires.content
|
||||||
Nous vous accueillons :
|
Horaire d'ouverture pour cette semaine :
|
||||||
%br
|
%br
|
||||||
="- Le matin de 8h30 à 12h15 et L'après midi de 14h15 à 19h"
|
-if (Date.today.cweek).to_i%2 == 0
|
||||||
|
=render :partial => "/public/shared/even"
|
||||||
|
-else
|
||||||
|
=render :partial => "/public/shared/odd"
|
||||||
%br
|
%br
|
||||||
="Alternance une semaine sur deux : "
|
|
||||||
%br
|
|
||||||
="- La pharmacie est fermée le samedi à partir de 12h15 ainsi que le lundi suivant."
|
|
||||||
|
=link_to "Horaires pour la semaine prochaine", "#next_week", :rel => "prettyPhoto", :title => ""
|
||||||
|
|
||||||
|
#next_week{:style => "display:none"}
|
||||||
|
%div{:style => "padding:1px"}
|
||||||
|
%h2 Horaires d'ouverture pour la semaine prochaine
|
||||||
|
%p
|
||||||
|
du lundi
|
||||||
|
=l Date.today.next_week, :format => :long
|
||||||
|
au dimanche
|
||||||
|
=l Date.today.next_week.end_of_week, :format => :long
|
||||||
|
=":"
|
||||||
|
|
||||||
|
%p
|
||||||
|
-if (Date.today.cweek).to_i%2 == 0
|
||||||
|
=render :partial => "/public/shared/odd"
|
||||||
|
-else
|
||||||
|
=render :partial => "/public/shared/even"
|
||||||
|
|
||||||
|
|
||||||
#garde.content
|
#garde.content
|
||||||
Pour connaître la pharmacie de garde :
|
Pour connaître la pharmacie de garde :
|
||||||
%br
|
%br
|
||||||
|
4
app/views/public/shared/_even.html.haml
Normal file
4
app/views/public/shared/_even.html.haml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
=raw"- du <strong>mardi</strong> au vendredi : 8h30 à 12h15 et 14h15 à 19h"
|
||||||
|
%br
|
||||||
|
=raw"- le samedi : 8h30 à 12h15 <strong>et 14h15 à 18h</strong>"
|
||||||
|
%br
|
4
app/views/public/shared/_odd.html.haml
Normal file
4
app/views/public/shared/_odd.html.haml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
="- du lundi au vendredi : 8h30 à 12h15 et 14h15 à 19h"
|
||||||
|
%br
|
||||||
|
="- le samedi : 8h30 à 12h15"
|
||||||
|
%br
|
Loading…
x
Reference in New Issue
Block a user