2015-04-22 09:48:39 -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
|
2015-06-15 18:53:50 -04:00
|
|
|
%button.navbar-toggle{type: 'button'}
|
2015-06-01 09:45:36 -04:00
|
|
|
%span.sr-only Toggle navigation
|
|
|
|
= icon('bars')
|
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
|
|
|
|
%span.badge.todos-pending-count
|
|
|
|
= todos_pending_count
|
|
|
|
- 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')
|
2015-09-02 16:28:40 -04:00
|
|
|
%li
|
2016-03-01 13:31:52 -05:00
|
|
|
= link_to destroy_user_session_path, class: 'logout', method: :delete, title: 'Sign out', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
|
|
|
|
= icon('sign-out')
|
|
|
|
- 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-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)}";
|