GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

_default.html.haml 4.27 KB
Newer Older
Clement Ho's avatar
Clement Ho committed
1
%header.navbar.navbar-gitlab.qa-navbar.navbar-expand-sm
2
  %a.sr-only.gl-accessibility{ href: "#content-body", tabindex: "1" } Skip to content
3
  .container-fluid
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
4
    .header-content
5 6 7 8
      .title-container
        %h1.title
          = link_to root_path, title: 'Dashboard', id: 'logo' do
            = brand_header_logo
9 10
            - logo_text = brand_header_logo_type
            - if logo_text.present?
Clement Ho's avatar
Clement Ho committed
11
              %span.logo-text.d-none.d-sm-block
12
                = logo_text
13

14 15 16 17
        - if current_user
          = render "layouts/nav/dashboard"
        - else
          = render "layouts/nav/explore"
18

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
19
      .navbar-collapse.collapse
20
        %ul.nav.navbar-nav
21 22
          - if current_user
            = render 'layouts/header/new_dropdown'
23
          - if header_link?(:search)
24
            %li.nav-item.d-none.d-sm-none.d-md-block
25
              = render 'layouts/search' unless current_controller?(:search)
26
            %li.nav-item.d-inline-block.d-sm-none.d-md-none
Clement Ho's avatar
Clement Ho committed
27
              = link_to search_path, title: 'Search', aria: { label: "Search" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
28 29 30
                = sprite_icon('search', size: 16)

          - if header_link?(:issues)
Clement Ho's avatar
Clement Ho committed
31
            = nav_link(path: 'dashboard#issues', html_options: { class: "user-counter" }) do
32
              = link_to assigned_issues_dashboard_path, title: 'Issues', class: 'dashboard-shortcuts-issues', aria: { label: "Issues" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
33
                = sprite_icon('issues', size: 16)
34
                - issues_count = assigned_issuables_count(:issues)
Clement Ho's avatar
Clement Ho committed
35
                %span.badge.badge-pill.issues-count{ class: ('hidden' if issues_count.zero?) }
36
                  = number_with_delimiter(issues_count)
37
          - if header_link?(:merge_requests)
Clement Ho's avatar
Clement Ho committed
38
            = nav_link(path: 'dashboard#merge_requests', html_options: { class: "user-counter" }) do
39
              = link_to assigned_mrs_dashboard_path, title: 'Merge requests', class: 'dashboard-shortcuts-merge_requests', aria: { label: "Merge requests" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
40
                = sprite_icon('git-merge', size: 16)
41
                - merge_requests_count = assigned_issuables_count(:merge_requests)
Clement Ho's avatar
Clement Ho committed
42
                %span.badge.badge-pill.merge-requests-count{ class: ('hidden' if merge_requests_count.zero?) }
43
                  = number_with_delimiter(merge_requests_count)
44
          - if header_link?(:todos)
Clement Ho's avatar
Clement Ho committed
45
            = nav_link(controller: 'dashboard/todos', html_options: { class: "user-counter" }) do
46
              = link_to dashboard_todos_path, title: 'Todos', aria: { label: "Todos" }, class: 'shortcuts-todos', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
47
                = sprite_icon('todo-done', size: 16)
Clement Ho's avatar
Clement Ho committed
48
                %span.badge.badge-pill.todos-count{ class: ('hidden' if todos_pending_count.zero?) }
49
                  = todos_count_format(todos_pending_count)
50
          - if header_link?(:user_dropdown)
51
            %li.nav-item.header-user.dropdown
52
              = link_to current_user, class: user_dropdown_class, data: { toggle: "dropdown" } do
Clement Ho's avatar
Clement Ho committed
53
                = image_tag avatar_icon_for_user(current_user, 23), width: 23, height: 23, class: "header-user-avatar qa-user-avatar"
54
                = sprite_icon('angle-down', css_class: 'caret-down')
Clement Ho's avatar
Clement Ho committed
55
              .dropdown-menu.dropdown-menu-right
56
                = render 'layouts/header/current_user_dropdown'
57
          - if header_link?(:admin_impersonation)
58 59
            %li.nav-item.impersonation
              = link_to admin_impersonation_path, class: 'nav-link impersonation-btn', method: :delete, title: "Stop impersonation", aria: { label: 'Stop impersonation' }, data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do
60 61
                = icon('user-secret')
          - if header_link?(:sign_in)
62
            %li.nav-item
63
              %div
64
                = link_to "Sign in", omniauth_authorize_path(:user, :cas3), method: :post, class: 'btn btn-sign-in', "data-no-turbolink" => "true"
65

66
      %button.navbar-toggler.d-block.d-sm-none{ type: 'button' }
67
        %span.sr-only Toggle navigation
68 69
        = sprite_icon('more', size: 12, css_class: 'more-icon js-navbar-toggle-right')
        = sprite_icon('close', size: 12, css_class: 'close-icon js-navbar-toggle-left')