diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2016-04-07 21:20:16 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2016-04-07 21:20:16 +0000 |
commit | f2b7cd443566f6ceefcbecbd52c8484afe264402 (patch) | |
tree | 5d83db1c0eeefb4e7a94178b972d8f5c43b9f758 /app/views | |
parent | 4361cc395cb5b9574286dee09ac55e49f394e50e (diff) | |
download | gitlab-ce-f2b7cd443566f6ceefcbecbd52c8484afe264402.tar.gz |
Revert "Merge branch 'new-navigation-prototype' into 'master'"
This reverts merge request !3494
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/_collapse_button.html.haml | 4 | ||||
-rw-r--r-- | app/views/layouts/_page.html.haml | 18 | ||||
-rw-r--r-- | app/views/layouts/nav/_admin.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/nav/_dashboard.html.haml | 5 | ||||
-rw-r--r-- | app/views/layouts/nav/_group.html.haml | 10 | ||||
-rw-r--r-- | app/views/layouts/nav/_profile.html.haml | 8 | ||||
-rw-r--r-- | app/views/layouts/nav/_project.html.haml | 17 |
7 files changed, 47 insertions, 17 deletions
diff --git a/app/views/layouts/_collapse_button.html.haml b/app/views/layouts/_collapse_button.html.haml new file mode 100644 index 00000000000..2ed51d87ca1 --- /dev/null +++ b/app/views/layouts/_collapse_button.html.haml @@ -0,0 +1,4 @@ +- if nav_menu_collapsed? + = link_to icon('angle-right'), '#', class: 'toggle-nav-collapse', title: "Open/Close" +- else + = link_to icon('angle-left'), '#', class: 'toggle-nav-collapse', title: "Open/Close" diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index 9be36273c7d..c799e9c588d 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -1,7 +1,5 @@ .page-with-sidebar{ class: "#{page_sidebar_class} #{page_gutter_class}" } = render "layouts/broadcast" - .expand-nav - = link_to icon('bars'), '#', class: 'toggle-nav-collapse', title: "Open sidebar" .sidebar-wrapper.nicescroll{ class: nav_sidebar_class } .header-logo %a#logo @@ -10,19 +8,15 @@ .gitlab-text-container %h3 GitLab - - primary_sidebar = current_user ? 'dashboard' : 'explore' - - - if defined?(sidebar) && sidebar && sidebar != primary_sidebar - .complex-sidebar - .nav-primary - = render "layouts/nav/#{primary_sidebar}" - .nav-secondary - = render "layouts/nav/#{sidebar}" + - if defined?(sidebar) && sidebar + = render "layouts/nav/#{sidebar}" + - elsif current_user + = render 'layouts/nav/dashboard' - else - = render "layouts/nav/#{primary_sidebar}" + = render 'layouts/nav/explore' .collapse-nav - = link_to icon('angle-left'), '#', class: 'toggle-nav-collapse', title: "Hide sidebar" + = render partial: 'layouts/collapse_button' - if current_user = link_to current_user, class: 'sidebar-user', title: "Profile" do = image_tag avatar_icon(current_user, 60), alt: 'Profile', class: 'avatar avatar s36' diff --git a/app/views/layouts/nav/_admin.html.haml b/app/views/layouts/nav/_admin.html.haml index 22d1d4d8597..280a1b93729 100644 --- a/app/views/layouts/nav/_admin.html.haml +++ b/app/views/layouts/nav/_admin.html.haml @@ -95,7 +95,7 @@ Spam Logs %span.count= number_with_delimiter(SpamLog.count(:all)) - = nav_link(controller: :application_settings) do + = nav_link(controller: :application_settings, html_options: { class: 'separate-item'}) do = link_to admin_application_settings_path, title: 'Settings' do = icon('cogs fw') %span diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml index f1052eadf81..5cef652da14 100644 --- a/app/views/layouts/nav/_dashboard.html.haml +++ b/app/views/layouts/nav/_dashboard.html.haml @@ -15,12 +15,12 @@ = icon('dashboard fw') %span Activity - = nav_link(path: ['dashboard/groups#index', 'explore/groups#index']) do + = nav_link(controller: :groups) do = link_to dashboard_groups_path, title: 'Groups' do = icon('group fw') %span Groups - = nav_link(path: 'dashboard#milestones') do + = nav_link(controller: :milestones) do = link_to dashboard_milestones_path, title: 'Milestones' do = icon('clock-o fw') %span @@ -48,6 +48,7 @@ %span Help + %li.separate-item = nav_link(controller: :profile) do = link_to profile_path, title: 'Profile Settings', data: {placement: 'bottom'} do = icon('user fw') diff --git a/app/views/layouts/nav/_group.html.haml b/app/views/layouts/nav/_group.html.haml index 0b7de9633ec..55940741dc0 100644 --- a/app/views/layouts/nav/_group.html.haml +++ b/app/views/layouts/nav/_group.html.haml @@ -1,4 +1,12 @@ %ul.nav.nav-sidebar + = nav_link do + = link_to root_path, title: 'Go to dashboard', class: 'back-link' do + = icon('caret-square-o-left fw') + %span + Go to dashboard + + %li.separate-item + = nav_link(path: 'groups#show', html_options: {class: 'home'}) do = link_to group_path(@group), title: 'Home' do = icon('group fw') @@ -34,7 +42,7 @@ %span Members - if can?(current_user, :admin_group, @group) - = nav_link do + = nav_link(html_options: { class: "separate-item" }) do = link_to edit_group_path(@group), title: 'Settings' do = icon ('cogs fw') %span diff --git a/app/views/layouts/nav/_profile.html.haml b/app/views/layouts/nav/_profile.html.haml index cc119fd64e6..3b9d31a6fc5 100644 --- a/app/views/layouts/nav/_profile.html.haml +++ b/app/views/layouts/nav/_profile.html.haml @@ -1,4 +1,12 @@ %ul.nav.nav-sidebar + = nav_link do + = link_to root_path, title: 'Go to dashboard', class: 'back-link' do + = icon('caret-square-o-left fw') + %span + Go to dashboard + + %li.separate-item + = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do = link_to profile_path, title: 'Profile Settings' do = icon('user fw') diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml index d0f82b5f57f..86b46e8c75e 100644 --- a/app/views/layouts/nav/_project.html.haml +++ b/app/views/layouts/nav/_project.html.haml @@ -1,4 +1,19 @@ %ul.nav.nav-sidebar + - if @project.group + = nav_link do + = link_to group_path(@project.group), title: 'Go to group', class: 'back-link' do + = icon('caret-square-o-left fw') + %span + Go to group + - else + = nav_link do + = link_to root_path, title: 'Go to dashboard', class: 'back-link' do + = icon('caret-square-o-left fw') + %span + Go to dashboard + + %li.separate-item + = nav_link(path: 'projects#show', html_options: {class: 'home'}) do = link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do = icon('bookmark fw') @@ -98,7 +113,7 @@ Snippets - if project_nav_tab? :settings - = nav_link(html_options: {class: "#{project_tab_class}"}) do + = nav_link(html_options: {class: "#{project_tab_class} separate-item"}) do = link_to edit_project_path(@project), title: 'Settings' do = icon('cogs fw') %span |