!!!
%html{:lang => "fr"}
  %head
    %meta{:charset => "utf-8"}/
    %meta{:content => "IE=Edge,chrome=1", "http-equiv" => "X-UA-Compatible"}/
    %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
    %title= @title || "Admin"
    = csrf_meta_tags
    = stylesheet_link_tag :admin, :media => :all
    <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500italic,500,700,700italic' rel='stylesheet' type='text/css'>
    = javascript_include_tag "admin"
    =javascript_include_tag "https://maps.google.com/maps/api/js?sensor=false&region=FR"
    
 


        
      


%body.admin
  -if !@preview
    #right_bar
      .element
        =link_to "/" do
          .cat#big_cat_clients
            =ic :"home"
          
      .element
        =link_to admin_p_customers_path do
          .cat#big_cat_clients
            =ic :"address-book-o"
            Clients
    
      .element
        =link_to admin_p_customer_sheets_path do
          .cat#big_cat_ventes
            =ic :"shopping-cart"
            Offres
    

      .element
        =link_to admin_i_websites_path do
          .cat#big_cat_web
            =ic :"globe"
            Sites
      .element
        =link_to admin_p_documents_path do
          .cat#big_cat_documents
            =ic :"file-text-o"
            Documents
      .element
        =link_to admin_p_payments_path do
          .cat#big_cat_paiements
            =ic :"eur"
            Paiements
          
      -if false
        .element
          =link_to admin_p_stats_path do
            .cat#big_cat_charts
              =ic :"bar-chart"
              Stats
          
      .bottom
        .element
          =link_to admin_admins_path do
            .cat#big_cat_preferences
              =ic :"cog"
    
          
          

    -if @admin_space
      %script
        =raw '$("#big_cat_'+@admin_space.to_s+'").addClass("active");'
  
        

    %nav#admin_nav.navbar.navbar-default.navbar-inverse{role: "navigation"}
      .container-fluid
      
        .navbar-header
          %button.navbar-toggle{"data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", type: "button"}
            %span.sr-only Toggle navigation
            %span.icon-bar
            %span.icon-bar
            %span.icon-bar

      
        #bs-example-navbar-collapse-1.collapse.navbar-collapse
          %ul.nav.navbar-nav
            -if @admin_space
              =render :partial => "admin/admin_spaces/#{@admin_space.to_s}"
          
              
              
          
       
         
        
          %ul.nav.navbar-nav.navbar-right
            %li.dropdown
              %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
                =current_admin.firstname
                =current_admin.name
                %b.caret
            
              %ul.dropdown-menu
                %li= link_to "Gestion des admins", admin_admins_path
                %li.divider
                %li=link_to "Se déconnecter", admin_admin_auth_path(1), method: :delete
   
            
  
  
          
          
  -else
    #right_bar
      =image_tag("/logo-olwen-technology.png", :style => "margin:10px auto;width:50%;display:block;")
    
    
  = yield
  
  
  
  #flashs= bootstrap_flash
  .clear


    

