From d6eda842a9094929423a0c43f3db76c0621603bf Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 17 Dec 2014 12:44:36 +0200 Subject: [PATCH] Sidenav for profile area Signed-off-by: Dmitriy Zaporozhets --- app/views/layouts/nav/_profile.html.haml | 30 ++++++++++++++++++------ app/views/layouts/navless.html.haml | 2 +- app/views/layouts/profile.html.haml | 18 ++++++++------ 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/app/views/layouts/nav/_profile.html.haml b/app/views/layouts/nav/_profile.html.haml index 1de5ee99cf4..05ba20e3611 100644 --- a/app/views/layouts/nav/_profile.html.haml +++ b/app/views/layouts/nav/_profile.html.haml @@ -1,26 +1,42 @@ -%ul +%ul.nav-sidebar.navbar-collapse.collapse = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do = link_to profile_path, title: "Profile" do + %i.fa.fa-user Profile = nav_link(controller: :accounts) do - = link_to "Account", profile_account_path + = link_to profile_account_path do + %i.fa.fa-gear + Account = nav_link(controller: :emails) do = link_to profile_emails_path do + %i.fa.fa-envelope-o Emails %span.count= current_user.emails.count + 1 - unless current_user.ldap_user? = nav_link(controller: :passwords) do - = link_to "Password", edit_profile_password_path + = link_to edit_profile_password_path do + %i.fa.fa-lock + Password = nav_link(controller: :notifications) do - = link_to "Notifications", profile_notifications_path + = link_to profile_notifications_path do + %i.fa.fa-inbox + Notifications + = nav_link(controller: :keys) do = link_to profile_keys_path do + %i.fa.fa-key SSH Keys %span.count= current_user.keys.count = nav_link(path: 'profiles#design') do - = link_to "Design", design_profile_path + = link_to design_profile_path do + %i.fa.fa-image + Design = nav_link(controller: :groups) do - = link_to "Groups", profile_groups_path + = link_to profile_groups_path do + %i.fa.fa-group + Groups = nav_link(path: 'profiles#history') do - = link_to "History", history_profile_path + = link_to history_profile_path do + %i.fa.fa-history + History diff --git a/app/views/layouts/navless.html.haml b/app/views/layouts/navless.html.haml index 2c5fffe384f..7f452e84b01 100644 --- a/app/views/layouts/navless.html.haml +++ b/app/views/layouts/navless.html.haml @@ -1,7 +1,7 @@ !!! 5 %html{ lang: "en"} = render "layouts/head", title: @title - %body{class: "#{app_theme} application", :'data-page' => body_data_page} + %body{class: "#{app_theme} sidenav application", :'data-page' => body_data_page} = render "layouts/broadcast" = render "layouts/head_panel", title: @title .container.navless-container diff --git a/app/views/layouts/profile.html.haml b/app/views/layouts/profile.html.haml index 1d0ab84d26f..f20f4ea1283 100644 --- a/app/views/layouts/profile.html.haml +++ b/app/views/layouts/profile.html.haml @@ -1,12 +1,16 @@ !!! 5 %html{ lang: "en"} = render "layouts/head", title: "Profile" - %body{class: "#{app_theme} profile", :'data-page' => body_data_page} + %body{class: "#{app_theme} sidenav profile", :'data-page' => body_data_page} = render "layouts/broadcast" = render "layouts/head_panel", title: "Profile" - %nav.main-nav.navbar-collapse.collapse - .container= render 'layouts/nav/profile' - .container - .content - = render "layouts/flash" - = yield + .page-with-sidebar + .sidebar-wrapper + = render 'layouts/nav/profile' + .content-wrapper + .container-fluid + .content + = render "layouts/flash" + .clearfix + = yield + = yield :embedded_scripts