2011-10-28 13:41:39 +02:00
|
|
|
<!-- Page Header -->
|
|
|
|
<header>
|
|
|
|
<h1 class="logo">
|
|
|
|
<a href="/">GITLAB</a></h1>
|
|
|
|
<div class="login-top">
|
|
|
|
<%= link_to profile_path, :class => "pic" do %>
|
|
|
|
<%= image_tag gravatar_icon(current_user.email) %>
|
|
|
|
<% end %>
|
|
|
|
<%= link_to profile_path, :class => "username" do %>
|
|
|
|
<%= current_user.name %>
|
|
|
|
<% end %>
|
|
|
|
<%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %>
|
2011-11-01 21:51:20 +01:00
|
|
|
</div>
|
|
|
|
<div class="search">
|
|
|
|
<%= text_field_tag "search", nil, :placeholder => "Search", :class => "search-input" %>
|
|
|
|
</div>
|
2011-10-28 13:41:39 +02:00
|
|
|
<!-- .login-top -->
|
|
|
|
<nav>
|
2011-11-01 21:56:58 +01:00
|
|
|
<%= link_to dashboard_path, :class => current_page?(root_path) ? "current dashboard" : "dashboard" do %>
|
2011-10-28 13:41:39 +02:00
|
|
|
<span></span>Dashboard
|
|
|
|
<% end %>
|
|
|
|
<%= link_to projects_path, :class => current_page?(projects_path) ? "current project" : "project" do %>
|
|
|
|
<span></span>Projects
|
|
|
|
<% end %>
|
2011-11-02 21:14:03 +01:00
|
|
|
<%= link_to((current_user.is_admin? ? admin_root_path : "#"), :class => (admin_namespace? ? "current admin" : "admin")) do %>
|
2011-10-28 13:41:39 +02:00
|
|
|
<span></span>Admin
|
2011-11-02 21:14:03 +01:00
|
|
|
<% end %>
|
2011-10-28 13:41:39 +02:00
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
<!-- eo Page Header -->
|
|
|
|
|
|
|
|
<div id="header-panel" style="display:none">
|
2011-10-08 23:36:38 +02:00
|
|
|
<div class="container">
|
|
|
|
<div class="span-24">
|
|
|
|
<div class="span-10">
|
|
|
|
<span class="search-holder">
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="right">
|
|
|
|
<%= link_to truncate(@project.name, :length => 20), project_path(@project), :class => "current button" if @project && !@project.new_record? %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% 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 %>
|