%header.navbar.navbar-static-top.navbar-gitlab
  .navbar-inner
    .container
      %div.app_logo
        %span.separator
        = link_to root_path, class: "home has_bottom_tooltip", title: "Dashboard" do
          %h1 GITLAB
        %span.separator
      %h1.title= title

      %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
        %span.sr-only Toggle navigation
        %i.icon-reorder

      .navbar-collapse.collapse
        %ul.nav.navbar-nav
          %li.hidden-sm.hidden-xs
            = render "layouts/search"
          %li.visible-sm.visible-xs
            = link_to search_path, title: "Search", class: 'has_bottom_tooltip', 'data-original-title' => 'Search area' do
              %i.icon-search
          %li
            = link_to help_path, title: 'Help', class: 'has_bottom_tooltip',
               'data-original-title' => 'Help'  do
              %i.icon-question-sign
          %li
            = link_to explore_root_path, title: "Explore", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
              %i.icon-globe
          %li
            = link_to user_snippets_path(current_user), title: "My snippets", class: 'has_bottom_tooltip', 'data-original-title' => 'My snippets' do
              %i.icon-paste
          - if current_user.is_admin?
            %li
              = link_to admin_root_path, title: "Admin area", class: 'has_bottom_tooltip', 'data-original-title' => 'Admin area' do
                %i.icon-cogs
          - if current_user.can_create_project?
            %li
              = link_to new_project_path, title: "New project", class: 'has_bottom_tooltip', 'data-original-title' => 'New project'  do
                %i.icon-plus
          %li
            = link_to profile_path, title: "Profile settings", class: 'has_bottom_tooltip', 'data-original-title' => 'Profile settings"'  do
              %i.icon-user
          %li
            = link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout'  do
              %i.icon-signout
          %li.hidden-xs
            = link_to current_user, class: "profile-pic", id: 'profile-pic' do
              = image_tag avatar_icon(current_user.email, 26), alt: 'User activity'
