!!!

%html{:lang => "fr", "xml:lang" => "fr", :xmlns => "http://www.w3.org/1999/xhtml"}
  %head
    %title=@title.to_s+" "
    
    
    %meta{ :"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8" }
    %meta{ :"name" => "Description", :content => @description }
    %meta{ :"name" => "Keywords", :content => @keywords }  
    

    = javascript_include_tag "public"
    
    = csrf_meta_tag 
    
    = stylesheet_link_tag 'public' 
    = stylesheet_link_tag '/fonts/Stylograph/stylesheet.css' 
    <script src="//use.typekit.net/ipv8wby.js"></script>
    <script>try{Typekit.load();}catch(e){}</script>
    
    =javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false&region=FR"
    
  %body

  
    -if flash[:error] or flash[:notice] or flash[:alert] 
      .flash
      
        =flash[:error]
        =flash[:notice]
        =flash[:alert]

    
    .top
      .socials
        =link_to image_tag("/Facebook.png"), "https://www.facebook.com/pages/Le-Centaure-Gite-de-Groupe-Labellisé-GITE-de-France-2-Epis/107423902644462", :target => "_blank"
        =link_to image_tag("/Google-Plus.png"), "https://plus.google.com/u/0/b/111014664384126562241/+LECENTAUREgîteetcentredevacancesRéaumont/posts", :target => "_blank"
      =link_to image_tag("/logo.png", :id => "logo"), "/"
      
      #menu

        -MenuItem.where(:parent_id => nil, :enabled => true, :visible => true, :menu_id => Menu.find_by_slug("principal").id).order(:position).each do |menu_item|
          -description = ""
          -description = menu_item.menu_content.description if menu_item.menu_content and menu_item.menu_content_type == "Page"
          =link_to sanitize("#{menu_item.name}"),menu_item_path(:url => menu_item.url), :class => menu_item.slug.to_s+"_menu"+(" active" if @menu_item and (@menu_item == menu_item or @menu_item.ancestors.include?(menu_item))).to_s

  
    
    -if @menu_item and @menu_item.slug == "index"
      .slider_container
        .slider




          .slides
            %ul.slides-container
    
              %li
                =image_tag "/slide_1.jpg"
  
              %li
                =image_tag "/slide_2.jpg"

    
    #main
      
      .middle
        -if @menu_item and @menu_item.parent_id
          -if @menu_item.ancestors.reverse[0]
            -first_level_menu = @menu_item.ancestors.reverse[0]
  
        -elsif @menu_item
    
          -first_level_menu = @menu_item
    
        -if !first_level_menu or first_level_menu.children.size > 0
        
        
          #sidebar
       
        
            =yield :sidebar
        
          #corps{:class => (@menu_item.slug if @menu_item)}
        
        
          
            -if @auth or !@menu_item
              =yield
        
        
          
          
          
              -if @menu_item and @menu_item.comments_allowed
    
        
                %h2 Messages
                #comments
                  
                  =render :partial => "public/comments/comment", :collection => @menu_item.comments.recents
    
                #comment_form.background_opacity.padding_20
                  =render :partial => "public/comments/form", :locals => {:commentable_type => "MenuItem", :commentable_id => @menu_item.id}
              
            
            -else
              %h1 Pour des raisons de sécurité...
              %h2 Cette page nécessite une authentification.
            
              %p 
                Merci de bien vouloir saisir le mot de passe qui vous a été fourni lors de votre inscription :
                %br
              
              =form_tag do
                =password_field_tag :pass
                =submit_tag "S'authentifier"
          
        -else
          
        
      
      
        
          -if @auth or !@menu_item
            .large_corps=yield
      
      
        
        
        
            -if @menu_item and @menu_item.comments_allowed
  
      
              %h2 Messages
              #comments
                %h2 Commentaires
                =render :partial => "public/comments/comment", :collection => @menu_item.comments.recents
  
              #comment_form.background_opacity.padding_20
                =render :partial => "public/comments/form", :locals => {:commentable_type => "MenuItem", :commentable_id => @menu_item.id}
            
          
          -else
            %h1 Pour des raisons de sécurité...
            %h2 Cette page nécessite une authentification.
          
            %p 
              Merci de bien vouloir saisir le mot de passe qui vous a été fourni lors de votre inscription :
              %br
            
            =form_tag do
              =password_field_tag :pass
              =submit_tag "S'authentifier"
        
          
          
      
    
      
      
      
        .clear
       
      
      .bottom
        .row
          .columns.span_4
            %h4 Le Centaure, centre de vacances en Isère
            %p Le Centaure est agréé par l’éducation nationale et par la Direction Départementale de la Cohésion Sociale (DDCS), la Fédération Française dÉquitation (FFE) et la PMI.
          .columns.span_4
            %h4 Infos pratiques
            %ul
              -MenuItem.where(:parent_id => nil, :enabled => true, :visible => true, :menu_id => Menu.find_by_slug("infos").id).order(:position).each do |menu_item|
                -description = ""
                -description = menu_item.menu_content.description if menu_item.menu_content and menu_item.menu_content_type == "Page"
                %li=link_to sanitize("#{menu_item.name}"),menu_item_path(:url => menu_item.url), :class => menu_item.slug.to_s+"_menu"+(" active" if @menu_item and (@menu_item == menu_item or @menu_item.ancestors.include?(menu_item))).to_s
          
          
              
          
          .columns.span_4
            %h4 Ressources
            %ul
              -MenuItem.where(:parent_id => nil, :enabled => true, :visible => true, :menu_id => Menu.find_by_slug("reserved").id).order(:position).each do |menu_item|
                -description = ""
                -description = menu_item.menu_content.description if menu_item.menu_content and menu_item.menu_content_type == "Page"
                %li=link_to sanitize("#{menu_item.name}"),menu_item_path(:url => menu_item.url), :class => menu_item.slug.to_s+"_menu"+(" active" if @menu_item and (@menu_item == menu_item or @menu_item.ancestors.include?(menu_item))).to_s
            
          
          .clear
    =link_to image_tag("/nb.png"), "http://nicolasbally.com", :target => "_blank", :id => "nb"
  

    

    
    
  

