diff options
author | Hiroyuki Sato <sathiroyuki@gmail.com> | 2017-07-23 21:26:02 +0900 |
---|---|---|
committer | Hiroyuki Sato <sathiroyuki@gmail.com> | 2017-07-23 21:26:02 +0900 |
commit | 9b25bbc45d4e6602452e230506601ff0ed8ba84a (patch) | |
tree | 95f7326e4162a325a5e7c7304c33f18194b52cbe /app/views/layouts/header/_default.html.haml | |
parent | 839018d2d4e3e899b1fa06a43d093a0fdceced42 (diff) | |
parent | b92d5135d8522e1370636799d74b51f9a37d0b2f (diff) | |
download | gitlab-ce-9b25bbc45d4e6602452e230506601ff0ed8ba84a.tar.gz |
Merge branch 'master' into 1827-prevent-concurrent-editing-wiki
Conflicts:
app/controllers/projects/wikis_controller.rb
app/views/projects/wikis/edit.html.haml
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
Diffstat (limited to 'app/views/layouts/header/_default.html.haml')
-rw-r--r-- | app/views/layouts/header/_default.html.haml | 70 |
1 files changed, 42 insertions, 28 deletions
diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index 6f4f2dbea3a..bc3293fd100 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -1,4 +1,5 @@ %header.navbar.navbar-gitlab{ class: nav_header_class } + .navbar-border %a.sr-only.gl-accessibility{ href: "#content-body", tabindex: "1" } Skip to content .container-fluid .header-content @@ -11,9 +12,13 @@ = render 'layouts/nav/dashboard' - else = render 'layouts/nav/explore' - %button.navbar-toggle{ type: 'button' } - %span.sr-only Toggle navigation - = icon('ellipsis-v') + + .header-logo + = link_to root_path, class: 'home', title: 'Dashboard', id: 'logo' do + = brand_header_logo + + .title-container.js-title-container + %h1.title{ class: ('initializing' if @has_group_title) }= title .navbar-collapse.collapse %ul.nav.navbar-nav @@ -25,55 +30,64 @@ - if current_user - if session[:impersonator_id] %li.impersonation - = link_to admin_impersonation_path, method: :delete, title: "Stop Impersonation", aria: { label: 'Stop Impersonation' }, data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do + = link_to admin_impersonation_path, method: :delete, title: "Stop impersonation", aria: { label: 'Stop impersonation' }, data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do = icon('user-secret fw') - - if current_user.is_admin? + - if current_user.admin? %li - = link_to admin_root_path, title: 'Admin Area', aria: { label: "Admin Area" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = link_to admin_root_path, title: 'Admin area', aria: { label: "Admin area" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = icon('wrench fw') - %li - = link_to dashboard_todos_path, title: 'Todos', aria: { label: "Todos" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do - = icon('bell fw') - %span.badge.todos-pending-count{ class: ("hidden" if todos_pending_count == 0) } - = todos_count_format(todos_pending_count) - - if current_user.can_create_project? - %li - = link_to new_project_path, title: 'New project', aria: { label: "New project" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do - = icon('plus fw') + = render 'layouts/header/new_dropdown' - if Gitlab::Sherlock.enabled? %li = link_to sherlock_transactions_path, title: 'Sherlock Transactions', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = icon('tachometer fw') + %li + = link_to assigned_issues_dashboard_path, title: 'Issues', aria: { label: "Issues" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = icon('hashtag fw') + - issues_count = assigned_issuables_count(:issues) + %span.badge.issues-count{ class: ('hidden' if issues_count.zero?) } + = number_with_delimiter(issues_count) + %li + = link_to assigned_mrs_dashboard_path, title: 'Merge requests', aria: { label: "Merge requests" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = custom_icon('mr_bold') + - merge_requests_count = assigned_issuables_count(:merge_requests) + %span.badge.merge-requests-count{ class: ('hidden' if merge_requests_count.zero?) } + = number_with_delimiter(merge_requests_count) + %li + = link_to dashboard_todos_path, title: 'Todos', aria: { label: "Todos" }, class: 'shortcuts-todos', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = icon('check-circle fw') + %span.badge.todos-count{ class: ('hidden' if todos_pending_count.zero?) } + = todos_count_format(todos_pending_count) %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" = icon('caret-down') .dropdown-menu-nav.dropdown-menu-align-right %ul + %li.current-user + .user-name.bold + = current_user.name + @#{current_user.username} + %li.divider %li - = link_to "Profile", current_user, class: 'profile-link', aria: { label: "Profile" }, data: { user: current_user.username } + = link_to "Profile", current_user, class: 'profile-link', data: { user: current_user.username } %li - = link_to "Settings", profile_path, aria: { label: "Settings" } + = link_to "Settings", profile_path + %li + = link_to "Turn on new navigation", profile_preferences_path(anchor: "new-navigation") %li.divider %li - = link_to "Sign out", destroy_user_session_path, method: :delete, class: "sign-out-link", aria: { label: "Sign out" } + = link_to "Sign out", destroy_user_session_path, method: :delete, class: "sign-out-link" - else %li %div = link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in btn-success' - .header-logo - = link_to root_path, class: 'home', title: 'Dashboard', id: 'logo' do - = brand_header_logo - - %h1.title= title + %button.navbar-toggle{ type: 'button' } + %span.sr-only Toggle navigation + = icon('ellipsis-v') = yield :header_content = render 'shared/outdated_browser' - -- if @project && !@project.empty_repo? - - if ref = @ref || @project.repository.root_ref - :javascript - var findFileURL = "#{namespace_project_find_file_path(@project.namespace, @project, ref)}"; |