gitlabhq/app/views/layouts/_head_panel.html.erb

57 lines
1.8 KiB
Plaintext
Raw Normal View History

<!-- Page Header -->
<header>
2011-11-03 23:37:02 +01:00
<h1 class="logo">
<%= link_to "GITLAB", root_url %>
2011-11-03 23:37:02 +01:00
</h1>
<div class="account-box">
<%= link_to profile_path, :class => "pic" do %>
<%= image_tag gravatar_icon(current_user.email) %>
<% end %>
<div class="account-links">
<%= link_to profile_path, :class => "username" do %>
2011-11-15 09:34:30 +01:00
<%#= current_user.name %>
2011-11-11 17:35:51 +01:00
My profile
2011-11-03 23:37:02 +01:00
<% end %>
<%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %>
2011-11-01 21:51:20 +01:00
</div>
2011-11-03 23:37:02 +01:00
</div><!-- .account-box -->
<div class="search">
<%= text_field_tag "search", nil, :placeholder => "Search", :class => "search-input" %>
</div>
<!-- .login-top -->
2011-12-15 12:18:33 +01:00
<nav class="<%= 'shorter_nav' unless current_user.is_admin? %>">
<%= link_to dashboard_path, :class => "#{'current' if current_page?(root_path)} dashboard" do %>
<span></span>Dashboard
<% end %>
2011-12-15 12:18:33 +01:00
<%= link_to projects_path, :class =>"#{'current' if current_page?(projects_path)} project #{'last_elem' unless current_user.is_admin?}" do %>
<span></span>Projects
<% end %>
2011-12-15 12:18:33 +01:00
<% if current_user.is_admin? %>
<%= link_to((current_user.is_admin? ? admin_root_path : "#"), :class => "#{'current' if admin_namespace?} admin last_elem") do %>
<span></span>Admin
<% end %>
<% end %>
</nav>
2011-11-03 23:37:02 +01:00
</header>
<!-- eo Page Header -->
2011-10-08 23:36:38 +02:00
<% 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 %>
<% if current_user.keys.all.empty? %>
2011-11-17 20:30:57 +01:00
<div id="no_ssh_key_defined" class="big-message error">
<p>No SSH Key is defined. You won't be able to use any Git command!. Click <%=link_to( 'here', keys_path ) %> to add one!
</div>
2011-11-11 17:04:32 +01:00
<% end %>