-@facebook_img =  "/public_medias/image_file/file/97/large_fotolia_904546_l_0_.jpg"
-@title = "Découvrez les produits labellisés"

-@menu_item = MenuItem.find(109)
-@lang = LangSite.first

-@ancestor_1 = @menu_item.ancestors.reverse[1] if @menu_item
-@ancestor_1 = @original_menu_item if @original_menu_item

-if @menu_item.ancestors.reverse[0] 
  -menu_title = @menu_item.ancestors.reverse[0] 
-else
  -menu_title = @menu_item

-if @menu_item.id != 1
  .menu_item_title
    %h1
      =menu_title.menu_content.lang_pages.find_by_lang_site_id(@lang.id).title
    
    -if @menu_item
      -if @menu_item.parent_id
        -if @menu_item.ancestors.reverse[0]
          -first_level_menu = @menu_item.ancestors.reverse[0]

      -else

        -first_level_menu = @menu_item

      -if first_level_menu.children.size > 0
    
        .sub_menu_bar_container
          .sub_menu_bar
            %ul
              -first_level_menu.children.order(:position).each do |menu_item|

                %li
                  -if @ancestor_1
                    -if @ancestor_1 == menu_item
                      =menu_item_link(menu_item, true)
                    -else
                      =menu_item_link(menu_item, false)
                  -else
                    =menu_item_link(menu_item)
                    


  .menu_item_top.principal{:style => "background-image:url('/public_medias/image_file/file/97/large_fotolia_904546_l_0_.jpg');"}
    %h1 Découvrez les produits labellisés

  %center
    =link_to "En savoir + sur le label", "/fr/jmc/le-label-one-voice.html", :style => "display:inline-block;padding:10px 20px;border: 1px solid orange;margin-top:20px"
  
  
  #label_list
    -if @label_marque
      #label_marque_place
        -if @label_marque.image_file
          .marque_image
            =image_tag @label_marque.image_file.file.large.medium.small
          
        .description{:class => ("with_img" if @label_marque.image_file)}
          %h2=@label_marque.name
          =simple_format @label_marque.description
        .clear
    =render :partial => "public/label_produits/search_form"
    
    
    %table
      %tr
        %th
          Noms produits
        %th
          Marques
        %th.label_entreprise_cel
          Entreprises
        %th
          Catégorie
        %th
          
      =render @label_produits
  
    .pagination= paginate @label_produits

