diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-06-11 09:25:35 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-06-11 09:25:35 +0000 |
commit | 714a60b45c07fe1fd241863230422d2f76e4bcb6 (patch) | |
tree | 07ce850d7e52f757766467b66c593ef855fe34c7 | |
parent | f3cbd4bbb6b9d91c1ff344439fb0c5e6c4e1c786 (diff) | |
parent | a46b4f11d5afbeaec4fa0caed85b395e3d9d428d (diff) | |
download | gitlab-ce-714a60b45c07fe1fd241863230422d2f76e4bcb6.tar.gz |
Merge branch 'nav-offscreen-dz-patch' into 'master'
Improvements to offscreen navigation
Improvements on top of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4579 based on mockups from https://gitlab.com/gitlab-org/gitlab-ce/issues/18417#note_12389766
See merge request !4607
-rw-r--r-- | app/assets/stylesheets/framework/nav.scss | 2 | ||||
-rw-r--r-- | app/views/layouts/_page.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/nav/_group.html.haml | 6 | ||||
-rw-r--r-- | app/views/layouts/nav/_profile.html.haml | 10 | ||||
-rw-r--r-- | app/views/layouts/nav/_project.html.haml | 10 |
5 files changed, 3 insertions, 27 deletions
diff --git a/app/assets/stylesheets/framework/nav.scss b/app/assets/stylesheets/framework/nav.scss index ffdd8e7e0d4..4de89daeb36 100644 --- a/app/assets/stylesheets/framework/nav.scss +++ b/app/assets/stylesheets/framework/nav.scss @@ -69,6 +69,7 @@ } &.sub-nav { + text-align: center; background-color: $background-color; .container-fluid { @@ -250,6 +251,7 @@ background: $background-color; border-bottom: 1px solid $border-color; transition-duration: .3s; + text-align: center; .container-fluid { position: relative; diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index dbf425d46c7..f89e8582792 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -17,7 +17,7 @@ = current_user.username - if defined?(nav) && nav .layout-nav - %div{ class: (container_class) } + .container-fluid = render "layouts/nav/#{nav}" .content-wrapper{ class: "#{layout_nav_class}" } = render "layouts/broadcast" diff --git a/app/views/layouts/nav/_group.html.haml b/app/views/layouts/nav/_group.html.haml index 9cbee0aa363..66361a644dd 100644 --- a/app/views/layouts/nav/_group.html.haml +++ b/app/views/layouts/nav/_group.html.haml @@ -5,36 +5,30 @@ .fade-left = nav_link(path: 'groups#show', html_options: {class: 'home'}) do = link_to group_path(@group), title: 'Home' do - = navbar_icon('group') %span Group = nav_link(path: 'groups#activity') do = link_to activity_group_path(@group), title: 'Activity' do - = navbar_icon('activity') %span Activity = nav_link(controller: [:group, :milestones]) do = link_to group_milestones_path(@group), title: 'Milestones' do - = navbar_icon('milestones') %span Milestones = nav_link(path: 'groups#issues') do = link_to issues_group_path(@group), title: 'Issues' do - = navbar_icon('issues') %span Issues - issues = IssuesFinder.new(current_user, group_id: @group.id, state: 'opened').execute %span.badge.count= number_with_delimiter(issues.count) = nav_link(path: 'groups#merge_requests') do = link_to merge_requests_group_path(@group), title: 'Merge Requests' do - = navbar_icon('mr') %span Merge Requests - merge_requests = MergeRequestsFinder.new(current_user, group_id: @group.id, state: 'opened').execute %span.badge.count= number_with_delimiter(merge_requests.count) = nav_link(controller: [:group_members]) do = link_to group_group_members_path(@group), title: 'Members' do - = navbar_icon('members') %span Members .fade-right diff --git a/app/views/layouts/nav/_profile.html.haml b/app/views/layouts/nav/_profile.html.haml index 09d9f0184be..d4b1f477f3f 100644 --- a/app/views/layouts/nav/_profile.html.haml +++ b/app/views/layouts/nav/_profile.html.haml @@ -2,51 +2,41 @@ .fade-left = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do = link_to profile_path, title: 'Profile Settings' do - = icon('user fw') %span Profile = nav_link(controller: [:accounts, :two_factor_auths]) do = link_to profile_account_path, title: 'Account' do - = icon('gear fw') %span Account - if current_application_settings.user_oauth_applications? = nav_link(controller: 'oauth/applications') do = link_to applications_profile_path, title: 'Applications' do - = icon('cloud fw') %span Applications = nav_link(controller: :emails) do = link_to profile_emails_path, title: 'Emails' do - = icon('envelope-o fw') %span Emails - unless current_user.ldap_user? = nav_link(controller: :passwords) do = link_to edit_profile_password_path, title: 'Password' do - = icon('lock fw') %span Password = nav_link(controller: :notifications) do = link_to profile_notifications_path, title: 'Notifications' do - = icon('inbox fw') %span Notifications = nav_link(controller: :keys) do = link_to profile_keys_path, title: 'SSH Keys' do - = icon('key fw') %span SSH Keys = nav_link(controller: :preferences) do = link_to profile_preferences_path, title: 'Preferences' do - -# TODO (rspeicher): Better icon? - = icon('image fw') %span Preferences = nav_link(path: 'profiles#audit_log') do = link_to audit_log_profile_path, title: 'Audit Log' do - = icon('history fw') %span Audit Log .fade-right diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml index 79cc5c02888..53d1fcc30a6 100644 --- a/app/views/layouts/nav/_project.html.haml +++ b/app/views/layouts/nav/_project.html.haml @@ -24,48 +24,41 @@ .fade-left = nav_link(path: 'projects#show', html_options: {class: 'home'}) do = link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do - = navbar_icon('project') %span Project = nav_link(path: 'projects#activity') do = link_to activity_project_path(@project), title: 'Activity', class: 'shortcuts-project-activity' do - = navbar_icon('activity') %span Activity - if project_nav_tab? :files = nav_link(controller: %w(tree blob blame edit_tree new_tree find_file commit commits compare repositories tags branches releases network)) do = link_to project_files_path(@project), title: 'Code', class: 'shortcuts-tree' do - = icon('code fw') %span Code - if project_nav_tab? :pipelines = nav_link(controller: :pipelines) do = link_to project_pipelines_path(@project), title: 'Pipelines', class: 'shortcuts-pipelines' do - = navbar_icon('pipelines') %span Pipelines - if project_nav_tab? :container_registry = nav_link(controller: %w(container_registry)) do = link_to project_container_registry_path(@project), title: 'Container Registry', class: 'shortcuts-container-registry' do - = icon('hdd-o fw') %span Registry - if project_nav_tab? :graphs = nav_link(controller: %w(graphs)) do = link_to namespace_project_graph_path(@project.namespace, @project, current_ref), title: 'Graphs', class: 'shortcuts-graphs' do - = icon('area-chart fw') %span Graphs - if project_nav_tab? :issues = nav_link(controller: [:issues, :labels, :milestones]) do = link_to url_for_project_issues(@project, only_path: true), title: 'Issues', class: 'shortcuts-issues' do - = navbar_icon('issues') %span Issues - if @project.default_issues_tracker? @@ -74,7 +67,6 @@ - if project_nav_tab? :merge_requests = nav_link(controller: :merge_requests) do = link_to namespace_project_merge_requests_path(@project.namespace, @project), title: 'Merge Requests', class: 'shortcuts-merge_requests' do - = navbar_icon('mr') %span Merge Requests %span.badge.count.merge_counter= number_with_delimiter(@project.merge_requests.opened.count) @@ -82,14 +74,12 @@ - if project_nav_tab? :wiki = nav_link(controller: :wikis) do = link_to get_project_wiki_path(@project), title: 'Wiki', class: 'shortcuts-wiki' do - = navbar_icon('wiki') %span Wiki - if project_nav_tab? :snippets = nav_link(controller: :snippets) do = link_to namespace_project_snippets_path(@project.namespace, @project), title: 'Snippets', class: 'shortcuts-snippets' do - = icon('clipboard fw') %span Snippets |