From 28639a1971980fcec2874357334f5789bada9b11 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 22 Apr 2015 20:10:38 +0300 Subject: [PATCH] For navless pages render dashboard nav Signed-off-by: Dmitriy Zaporozhets --- app/views/layouts/_empty_head_panel.html.haml | 5 ++++ app/views/layouts/_page.html.haml | 30 +++++++++---------- app/views/layouts/devise.html.haml | 6 +--- app/views/layouts/navless.html.haml | 5 +--- 4 files changed, 21 insertions(+), 25 deletions(-) create mode 100644 app/views/layouts/_empty_head_panel.html.haml diff --git a/app/views/layouts/_empty_head_panel.html.haml b/app/views/layouts/_empty_head_panel.html.haml new file mode 100644 index 00000000000..b81c2d0364b --- /dev/null +++ b/app/views/layouts/_empty_head_panel.html.haml @@ -0,0 +1,5 @@ +%header.navbar.navbar-fixed-top.navbar-gitlab + .navbar-inner + .container + %h4.center + = image_tag 'logo-white.png', width: 32, height: 32 diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index 422966cdc55..19da8771c54 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -1,20 +1,18 @@ -- if defined?(sidebar) - .page-with-sidebar{ class: nav_sidebar_class } - = render "layouts/broadcast" - .sidebar-wrapper +.page-with-sidebar{ class: nav_sidebar_class } + = render "layouts/broadcast" + .sidebar-wrapper + - if defined?(sidebar) = render(sidebar) - .collapse-nav - = render partial: 'layouts/collapse_button' - .content-wrapper - .container-fluid - .content - = render "layouts/flash" - .clearfix - = yield -- else - .container.navless-container - .content - = yield + - else + = render 'layouts/nav/dashboard' + .collapse-nav + = render partial: 'layouts/collapse_button' + .content-wrapper + .container-fluid + .content + = render "layouts/flash" + .clearfix + = yield = yield :embedded_scripts diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml index 183c5a1e20a..5a59c9fd59a 100644 --- a/app/views/layouts/devise.html.haml +++ b/app/views/layouts/devise.html.haml @@ -2,11 +2,7 @@ %html{ lang: "en"} = render "layouts/head" %body.ui_mars.login-page.application - %header.navbar.navbar-fixed-top.navbar-gitlab - .navbar-inner - .container - %h4.center - = image_tag 'logo-white.png', width: 32, height: 32 + = render "layouts/empty_head_panel" = render "layouts/broadcast" .container.navless-container .content diff --git a/app/views/layouts/navless.html.haml b/app/views/layouts/navless.html.haml index 4d0278251a6..10a0fcea2f8 100644 --- a/app/views/layouts/navless.html.haml +++ b/app/views/layouts/navless.html.haml @@ -4,7 +4,4 @@ %body{class: "#{app_theme} application", :'data-page' => body_data_page} = render "layouts/broadcast" = render "layouts/head_panel", title: defined?(@title_url) ? link_to(@title, @title_url) : @title - .container.navless-container - .content - = render "layouts/flash" - = yield + = render 'layouts/page'