2016-06-15 12:23:49 -04:00
|
|
|
%header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class }
|
2015-09-02 12:47:36 -04:00
|
|
|
%div{ class: fluid_layout ? "container-fluid" : "container-fluid" }
|
2015-06-01 09:45:36 -04:00
|
|
|
.header-content
|
2016-05-09 19:53:25 -04:00
|
|
|
%button.side-nav-toggle{type: 'button'}
|
2015-06-01 09:45:36 -04:00
|
|
|
%span.sr-only Toggle navigation
|
|
|
|
= icon('bars')
|
2016-05-09 19:53:25 -04:00
|
|
|
%button.navbar-toggle{type: 'button'}
|
|
|
|
%span.sr-only Toggle navigation
|
2016-06-27 10:06:36 -04:00
|
|
|
= icon('ellipsis-v')
|
2014-01-06 07:34:41 -05:00
|
|
|
|
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)
|
2015-06-01 09:45:36 -04:00
|
|
|
%li.visible-sm.visible-xs
|
2015-12-02 08:05:58 -05:00
|
|
|
= link_to search_path, title: '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
|
2016-04-22 17:19:55 -04:00
|
|
|
= link_to admin_impersonation_path, method: :delete, title: 'Stop Impersonation', data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do
|
2016-03-01 13:31:52 -05:00
|
|
|
= icon('user-secret fw')
|
|
|
|
- if current_user.is_admin?
|
|
|
|
%li
|
|
|
|
= link_to admin_root_path, title: 'Admin Area', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
|
|
|
= icon('wrench fw')
|
2015-06-01 09:45:36 -04:00
|
|
|
%li
|
2016-03-01 13:31:52 -05:00
|
|
|
= link_to dashboard_todos_path, title: 'Todos', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
2016-05-06 11:47:43 -04:00
|
|
|
= icon('bell fw')
|
2016-06-09 11:12:59 -04:00
|
|
|
%span.badge.todos-pending-count{ class: ("hidden" if todos_pending_count == 0) }
|
2016-06-07 04:44:01 -04:00
|
|
|
= todos_pending_count
|
2016-03-01 13:31:52 -05:00
|
|
|
- if current_user.can_create_project?
|
|
|
|
%li
|
|
|
|
= link_to new_project_path, title: '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')
|
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"
|
|
|
|
%span.caret
|
|
|
|
.dropdown-menu-nav.dropdown-menu-align-right
|
|
|
|
%ul
|
|
|
|
%li
|
|
|
|
= link_to "Profile", current_user
|
|
|
|
%li.divider
|
|
|
|
%li
|
2016-06-27 09:31:19 -04:00
|
|
|
= link_to "Sign out", destroy_user_session_path, method: :delete, class: "sign-out-link", title: '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
|
|
|
|
2014-12-15 05:11:38 -05:00
|
|
|
|
2015-06-15 21:12:45 -04:00
|
|
|
%h1.title= title
|
|
|
|
|
2016-06-09 13:37:47 -04:00
|
|
|
.header-logo
|
2016-06-14 17:57:46 -04:00
|
|
|
= link_to root_path, class: 'home', title: 'Dashboard', id: 'logo' do
|
2016-06-09 13:37:47 -04:00
|
|
|
= brand_header_logo
|
|
|
|
|
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)}";
|