BigW Consortium Gitlab

_default.html.haml 3.57 KB
Newer Older
1
%header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class }
2
  %a{ href: "#content-body", tabindex: "1", class: "sr-only gl-accessibility" } Skip to content
3
  %div{ class: "container-fluid" }
4
    .header-content
5
      %button.side-nav-toggle{ type: 'button', "aria-label" => "Toggle global navigation" }
6 7
        %span.sr-only Toggle navigation
        = icon('bars')
8 9
      %button.navbar-toggle{type: 'button'}
        %span.sr-only Toggle navigation
10
        = icon('ellipsis-v')
11

12
      .navbar-collapse.collapse
13
        %ul.nav.navbar-nav
14
          %li.hidden-sm.hidden-xs
15
            = render 'layouts/search' unless current_controller?(:search)
16
          %li.visible-sm.visible-xs
17
            = link_to search_path, title: 'Search', aria: { label: "Search" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
18
              = icon('search')
19 20 21
          - if current_user
            - if session[:impersonator_id]
              %li.impersonation
22
                = link_to admin_impersonation_path, method: :delete, title: "Stop Impersonation", aria: { label: 'Stop Impersonation' }, data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do
23 24 25
                  = icon('user-secret fw')
            - if current_user.is_admin?
              %li
26
                = link_to admin_root_path, title: 'Admin Area', aria: { label: "Admin Area" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
27
                  = icon('wrench fw')
28
            %li
29
              = link_to dashboard_todos_path, title: 'Todos', aria: { label: "Todos" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
Jacob Schatz committed
30
                = icon('bell fw')
31
                %span.badge.todos-pending-count{ class: ("hidden" if todos_pending_count == 0) }
32
                  = todos_pending_count
33 34 35 36 37
            - if Gitlab::Sherlock.enabled?
              %li
                = link_to sherlock_transactions_path, title: 'Sherlock Transactions',
                  data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
                  = icon('tachometer fw')
38 39 40
            %li.header-user.dropdown
              = link_to current_user, class: "header-user-dropdown-toggle", data: { toggle: "dropdown" } do
                = image_tag avatar_icon(current_user, 26), width: 26, height: 26, class: "header-user-avatar"
41
                = icon('caret-down')
42 43 44
              .dropdown-menu-nav.dropdown-menu-align-right
                %ul
                  %li
45
                    = link_to "Profile", current_user, class: 'profile-link', aria: { label: "Profile" }, data: { user: current_user.username }
46
                  %li
47
                    = link_to "Profile Settings", profile_path, aria: { label: "Profile Settings" }
48 49
                  %li
                    = link_to "Help", help_path, aria: { label: "Help" }
50 51
                  %li.divider
                  %li
52
                    = link_to "Sign out", destroy_user_session_path, method: :delete, class: "sign-out-link", aria: { label: "Sign out" }
53
          - else
54 55 56
            %li
              %div
                = link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in btn-success'
57

58

59 60
      %h1.title= title

61
      .header-logo
62
        = link_to root_path, class: 'home', title: 'Dashboard', id: 'logo' do
63 64
          = brand_header_logo

65 66
      = yield :header_content

67
= render 'shared/outdated_browser'
68

69
- if @project && !@project.empty_repo?
70 71 72
  - if ref = @ref || @project.repository.root_ref
    :javascript
      var findFileURL = "#{namespace_project_find_file_path(@project.namespace, @project, ref)}";