<div class="navbar navbar-default navbar-outer">
  <div class="navbar-header">
    <div class="container">
      <div class="navbar-brand">
        <!--[if IE]><div class='logo-small'> <![endif]-->
        <%= image_tag("foreman.png") %>
        <!--[if IE]></div> <![endif]-->
        <%= link_to "Foreman", main_app.root_path %>
      </div>

      <%= render 'home/user_dropdown' if SETTINGS[:login] && User.current %>
    </div>
  </div>
</div>

<div class="navbar navbar-default navbar-inner navbar-fixed-top persist-header">
  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-menu">
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
  </button>
  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-admin">
    <span class="glyphicon glyphicon-cog"></span>
  </button>
  <div class="container">
    <!-- menu -->
    <%= content_tag :div,nil, :id=>'current_tab', :data=>{:controller=>controller_name, :action=>action_name} %>
    <% if User.current %>
      <% cache(TopbarSweeper.fragment_name) do %>
        <ul class="nav navbar-nav navbar-menu navbar-collapse collapse" id="menu">
          <%= render "home/org_switcher" %>
          <%= render_menu :top_menu %>
        </ul>
        <ul class="nav navbar-nav navbar-admin navbar-right navbar-collapse collapse" id="menu2">
          <%= render_menu :admin_menu %>
        </ul>
      <% end %>
    <% end %>
  </div>
</div>
