<%#= image_tag "git.png", :height => 40, :class => "left" %> <%#= link_to "gitlab", root_path, :id => "logo" %> <%= text_field_tag "search", nil, :placeholder => "Search" %>
<%= link_to truncate(@project.name, :length => 20), project_path(@project), :class => "current button" if @project && !@project.new_record? %> <%= link_to 'Dashboard', dashboard_path, :class => current_page?(dashboard_path) ? "current button" : "button" %> <%= link_to 'Projects', projects_path, :class => current_page?(projects_path) ? "current button" : "button" %> <%= link_to('Admin', admin_root_path, :class => admin_namespace? ? "current button" : "button" ) if current_user.is_admin? %> <%= link_to profile_path, :class => ((controller.controller_name == "keys" || controller.controller_name == "profile") ? "current button" : "button") do %> <%= image_tag gravatar_icon(current_user.email) %> <%= current_user.name.split(" ").first %> <% end %> <%= link_to 'Logout', destroy_user_session_path, :style => "border-left: 1px solid #666;", :class => "button", :method => :delete %>
<% if current_user %> <%= javascript_tag do %> $(function() { $("#search" ).autocomplete({ source: <%= raw search_autocomplete_source %>, select: function(event, ui) { location.href = ui.item.url } }); }); <% end %> <% end %>