2016-11-17 18:46:48 -05:00
|
|
|
%header.navbar.navbar-gitlab{ class: nav_header_class }
|
2016-12-22 06:00:09 -05:00
|
|
|
%a.sr-only.gl-accessibility{ href: "#content-body", tabindex: "1" } Skip to content
|
2016-12-23 04:37:12 -05:00
|
|
|
.container-fluid
|
2015-06-01 09:45:36 -04:00
|
|
|
.header-content
|
2017-02-13 11:57:15 -05:00
|
|
|
.dropdown.global-dropdown
|
|
|
|
%button.global-dropdown-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
|
|
|
|
%span.sr-only Toggle navigation
|
|
|
|
= icon('bars')
|
2017-02-13 17:16:03 -05:00
|
|
|
.dropdown-menu-nav.global-dropdown-menu
|
|
|
|
- if current_user
|
|
|
|
= render 'layouts/nav/dashboard'
|
|
|
|
- else
|
|
|
|
= render 'layouts/nav/explore'
|
2014-01-06 07:34:41 -05:00
|
|
|
|
2017-03-18 08:01:00 -04:00
|
|
|
.header-logo
|
|
|
|
= link_to root_path, class: 'home', title: 'Dashboard', id: 'logo' do
|
|
|
|
= brand_header_logo
|
|
|
|
|
|
|
|
.title-container
|
|
|
|
%h1.title{ class: ('initializing' if @has_group_title) }= title
|
|
|
|
|
2015-06-01 09:45:36 -04:00
|
|
|
.navbar-collapse.collapse
|
2016-03-22 09:56:07 -04:00
|
|
|
%ul.nav.navbar-nav
|
2016-03-08 19:01:33 -05:00
|
|
|
%li.hidden-sm.hidden-xs
|
2016-04-11 19:04:42 -04:00
|
|
|
= render 'layouts/search' unless current_controller?(:search)
|
2017-03-02 05:43:48 -05:00
|
|
|
%li.visible-sm-inline-block.visible-xs-inline-block
|
2016-07-12 09:30:37 -04:00
|
|
|
= link_to search_path, title: 'Search', aria: { label: "Search" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
2015-06-01 09:45:36 -04:00
|
|
|
= icon('search')
|
2016-03-01 13:31:52 -05:00
|
|
|
- if current_user
|
|
|
|
- if session[:impersonator_id]
|
|
|
|
%li.impersonation
|
2017-04-03 19:03:14 -04:00
|
|
|
= link_to admin_impersonation_path, method: :delete, title: "Stop impersonation", aria: { label: 'Stop impersonation' }, data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do
|
2016-03-01 13:31:52 -05:00
|
|
|
= icon('user-secret fw')
|
2017-04-08 22:20:57 -04:00
|
|
|
- if current_user.admin?
|
2016-03-01 13:31:52 -05:00
|
|
|
%li
|
2017-04-03 19:03:14 -04:00
|
|
|
= link_to admin_root_path, title: 'Admin area', aria: { label: "Admin area" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
2016-03-01 13:31:52 -05:00
|
|
|
= icon('wrench fw')
|
2017-03-30 15:14:57 -04:00
|
|
|
- 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')
|
|
|
|
- if Gitlab::Sherlock.enabled?
|
|
|
|
%li
|
|
|
|
= link_to sherlock_transactions_path, title: 'Sherlock Transactions',
|
|
|
|
data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
|
|
|
= icon('tachometer fw')
|
2017-03-29 17:16:57 -04:00
|
|
|
%li
|
|
|
|
= link_to assigned_issues_dashboard_path, title: 'Issues', aria: { label: "Issues" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
|
|
|
= icon('hashtag fw')
|
2017-04-06 14:17:07 -04:00
|
|
|
- issues_count = cached_assigned_issuables_count(current_user, :issues, :opened)
|
|
|
|
%span.badge.issues-count{ class: ('hidden' if issues_count.zero?) }
|
|
|
|
= number_with_delimiter(issues_count)
|
2017-03-29 17:16:57 -04:00
|
|
|
%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')
|
2017-04-06 14:17:07 -04:00
|
|
|
- merge_requests_count = cached_assigned_issuables_count(current_user, :merge_requests, :opened)
|
|
|
|
%span.badge.merge-requests-count{ class: ('hidden' if merge_requests_count.zero?) }
|
|
|
|
= number_with_delimiter(merge_requests_count)
|
2015-06-01 09:45:36 -04:00
|
|
|
%li
|
2017-03-17 06:58:19 -04:00
|
|
|
= link_to dashboard_todos_path, title: 'Todos', aria: { label: "Todos" }, class: 'shortcuts-todos', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
2017-03-29 17:16:57 -04:00
|
|
|
= icon('check-circle fw')
|
2017-04-06 14:17:07 -04:00
|
|
|
%span.badge.todos-count{ class: ('hidden' if todos_pending_count.zero?) }
|
2017-02-21 14:21:49 -05:00
|
|
|
= todos_count_format(todos_pending_count)
|
2016-06-27 07:46:27 -04:00
|
|
|
%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"
|
2016-08-23 12:02:52 -04:00
|
|
|
= icon('caret-down')
|
2016-06-27 07:46:27 -04:00
|
|
|
.dropdown-menu-nav.dropdown-menu-align-right
|
|
|
|
%ul
|
|
|
|
%li
|
2016-07-12 09:30:37 -04:00
|
|
|
= link_to "Profile", current_user, class: 'profile-link', aria: { label: "Profile" }, data: { user: current_user.username }
|
2016-07-05 08:40:29 -04:00
|
|
|
%li
|
2017-01-04 17:05:53 -05:00
|
|
|
= link_to "Settings", profile_path, aria: { label: "Settings" }
|
2016-06-27 07:46:27 -04:00
|
|
|
%li.divider
|
|
|
|
%li
|
2016-07-12 09:30:37 -04:00
|
|
|
= link_to "Sign out", destroy_user_session_path, method: :delete, class: "sign-out-link", aria: { label: "Sign out" }
|
2016-03-01 13:31:52 -05:00
|
|
|
- else
|
2016-03-22 09:56:07 -04:00
|
|
|
%li
|
|
|
|
%div
|
|
|
|
= link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in btn-success'
|
2016-03-01 13:31:52 -05:00
|
|
|
|
2017-03-29 17:16:57 -04:00
|
|
|
%button.navbar-toggle{ type: 'button' }
|
|
|
|
%span.sr-only Toggle navigation
|
|
|
|
= icon('ellipsis-v')
|
|
|
|
|
2016-03-22 07:33:38 -04:00
|
|
|
= yield :header_content
|
|
|
|
|
2014-12-15 05:11:38 -05:00
|
|
|
= render 'shared/outdated_browser'
|
2016-03-17 13:38:35 -04:00
|
|
|
|
2016-01-20 10:50:26 -05:00
|
|
|
- if @project && !@project.empty_repo?
|
2016-03-17 13:38:35 -04:00
|
|
|
- if ref = @ref || @project.repository.root_ref
|
|
|
|
:javascript
|
|
|
|
var findFileURL = "#{namespace_project_find_file_path(@project.namespace, @project, ref)}";
|