This instance was upgraded to Heptapod 0.31.0 (final) today.

_head_panel.html.haml 1.24 KB
Newer Older
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
1
/ Page Header
2
%header.top_panel_holder
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
3
  .wrapper
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
4
    .top_panel_content
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
5
      %div.app_logo
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
6
        = link_to root_path, :class => "home", :title => "Home" do 
7
8
          %h1 
            GITLAB
9
      %h1.project_name= title
10
11
12
      .search
        = form_tag search_path, :method => :get do |f|
          = text_field_tag "search", nil, :placeholder => "Search", :class => "search-input"
13
14
15
      - if current_user.is_admin?
        = link_to admin_projects_path, :class => "admin_link", :title => "Admin area" do 
          = image_tag "admin.PNG", :width => 16
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
16
17
18
19
20
21
22
      .account-box
        = link_to profile_path, :class => "pic" do
          = image_tag gravatar_icon(current_user.email)
        .account-links
          = link_to profile_path, :class => "username" do
            My profile
          = link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

:javascript
  $(function(){
    $("#search").autocomplete({
      source: #{raw search_autocomplete_source},
      select: function(event, ui) { location.href = ui.item.url }
    });

    $(document).keypress(function(e) {
      if( $(e.target).is(":input") ) return;
        switch(e.which)  {
        case 115:  focusSearch();
        e.preventDefault();
      }
    });
  });