
  
%nav#my_account_menu.navbar.navbar-inverse
  .container-fluid
    
    .navbar-header{:class => ("active" if params[:controller] == "public/my_account" and params[:action] == "index")}
      = link_to i(:user)+raw("&nbsp; Mon compte"), public_my_account_path, :class => "navbar-brand"
    %ul.nav.navbar-nav
    
    
      
      %li{:class => ("active" if params[:controller] == "public/my_account" and params[:action] == "edit_infos")}= link_to " Profil", public_edit_infos_path
      %li{:class => ("active" if params[:controller] == "public/credits" and params[:action] == "index")}= link_to "Crédits", public_credits_path
      %li{:class => ("active" if params[:controller] == "public/orders" and params[:action] == "bills")}=link_to "Factures", bills_public_orders_path
      %li{:class => "am "+("active" if params[:controller] == "public/annonce_messages").to_s}

        -nbr = current_annonce_account.inbox_messages.where("readed is null").count
        -if nbr == 0
          =link_to "Messages", public_annonce_messages_path
        -else
          =link_to raw("Messages <span class='badge'>#{nbr}</span>"), public_annonce_messages_path

      %li{:class => ("active" if params[:controller] == "public/my_account" and params[:action] == "filleuls")}= link_to "Affiliés", public_filleuls_path
 
      -if current_annonce_account.credits_boughts(Date.today) > 0
        =#%li{:class => ("active" if params[:controller] == "public/my_account" and params[:action] == "binary")}= link_to "Réseau binaire", public_binary_path
  
        %li{:class => ("active" if (params[:controller] == "public/commissions" and params[:action] == "index") or params[:controller] == "public/annonce_account_ribs")}= link_to "Commissions / virements", public_commissions_path
 