diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-10-04 12:10:07 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-10-04 18:48:30 +0200 |
commit | 56e3b4b1811e1d79c1afb27da83d4a50284c91e6 (patch) | |
tree | 1911910c4c22bcd651d68186b2090c320ea162ad | |
parent | b8e47d72637167be5a225fe20b5f893c43b9a885 (diff) | |
download | gitlab-ce-dm-consistent-page-breadcrumb-titles.tar.gz |
Make page and breadcrumb titles more consistent across the boarddm-consistent-page-breadcrumb-titles
25 files changed, 52 insertions, 71 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 3769a2cde33..590ef63e862 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -134,8 +134,6 @@ class GroupsController < Groups::ApplicationController def determine_layout if [:new, :create].include?(action_name.to_sym) 'application' - elsif [:edit, :update, :projects].include?(action_name.to_sym) - 'group_settings' else 'group' end diff --git a/app/controllers/projects/settings/integrations_controller.rb b/app/controllers/projects/settings/integrations_controller.rb index 1ff08cce8cb..542ff6412c6 100644 --- a/app/controllers/projects/settings/integrations_controller.rb +++ b/app/controllers/projects/settings/integrations_controller.rb @@ -4,7 +4,6 @@ module Projects include ServiceParams before_action :authorize_admin_project! - layout "project_settings" def show @hooks = @project.hooks diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a738ca9f361..f0223c15646 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -297,8 +297,6 @@ class ProjectsController < Projects::ApplicationController def determine_layout if [:new, :create].include?(action_name.to_sym) 'application' - elsif [:edit, :update].include?(action_name.to_sym) - 'project_settings' else 'project' end diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index 15606dd30fd..9be5967da41 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -1,4 +1,6 @@ - breadcrumb_title "General Settings" +- page_title "General Settings" + .panel.panel-default.prepend-top-default .panel-heading Group settings diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml index 8d2bc810a7d..da0c2fd6531 100644 --- a/app/views/groups/projects.html.haml +++ b/app/views/groups/projects.html.haml @@ -1,4 +1,5 @@ -- breadcrumb_title "Projects" +- breadcrumb_title "Projects Settings" +- page_title "Projects Settings" .panel.panel-default.prepend-top-default .panel-heading diff --git a/app/views/groups/settings/ci_cd/show.html.haml b/app/views/groups/settings/ci_cd/show.html.haml index 472da2a6a72..2749f42ef05 100644 --- a/app/views/groups/settings/ci_cd/show.html.haml +++ b/app/views/groups/settings/ci_cd/show.html.haml @@ -1,4 +1,4 @@ - breadcrumb_title "CI / CD Settings" -- page_title "CI / CD" +- page_title "CI / CD Settings" = render 'ci/variables/index' diff --git a/app/views/layouts/group_settings.html.haml b/app/views/layouts/group_settings.html.haml deleted file mode 100644 index 66b115e36de..00000000000 --- a/app/views/layouts/group_settings.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -- page_title "Settings" -- nav "group" - -= render template: "layouts/group" diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 8765b814405..1470af78daa 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -215,57 +215,49 @@ %strong.fly-out-top-item-name #{ _('Snippets') } + = nav_link(controller: :project_members) do + = link_to project_settings_members_path(@project), title: 'Members' do + .nav-icon-container + = sprite_icon('users') + %span.nav-item-name + Members + - if project_nav_tab? :settings - = nav_link(path: %w[projects#edit project_members#index integrations#show services#edit repository#show ci_cd#show pages#show]) do - = link_to edit_project_path(@project), class: 'shortcuts-tree' do + = nav_link(path: %w[projects#edit integrations#show services#edit repository#show ci_cd#show pages#show]) do + = link_to edit_project_path(@project) do .nav-icon-container = sprite_icon('settings') %span.nav-item-name Settings %ul.sidebar-sub-level-items - - can_edit = can?(current_user, :admin_project, @project) - - if can_edit - = nav_link(path: %w[projects#edit project_members#index integrations#show services#edit repository#show ci_cd#show pages#show], html_options: { class: "fly-out-top-item" } ) do - = link_to edit_project_path(@project) do - %strong.fly-out-top-item-name - #{ _('Settings') } - %li.divider.fly-out-top-item - = nav_link(path: %w[projects#edit]) do - = link_to edit_project_path(@project), title: 'General' do - %span - General - = nav_link(controller: :project_members) do - = link_to project_project_members_path(@project), title: 'Members' do + = nav_link(path: %w[projects#edit integrations#show services#edit repository#show ci_cd#show pages#show], html_options: { class: "fly-out-top-item" } ) do + = link_to edit_project_path(@project) do + %strong.fly-out-top-item-name + #{ _('Settings') } + %li.divider.fly-out-top-item + = nav_link(path: %w[projects#edit]) do + = link_to edit_project_path(@project), title: 'General' do + %span + General + = nav_link(controller: [:integrations, :services, :hooks, :hook_logs]) do + = link_to project_settings_integrations_path(@project), title: 'Integrations' do + %span + Integrations + = nav_link(controller: :repository) do + = link_to project_settings_repository_path(@project), title: 'Repository' do %span - Members - - if can_edit - = nav_link(controller: [:integrations, :services, :hooks, :hook_logs]) do - = link_to project_settings_integrations_path(@project), title: 'Integrations' do + Repository + - if @project.feature_available?(:builds, current_user) + = nav_link(controller: :ci_cd) do + = link_to project_settings_ci_cd_path(@project), title: 'CI / CD' do %span - Integrations - = nav_link(controller: :repository) do - = link_to project_settings_repository_path(@project), title: 'Repository' do + CI / CD + - if @project.pages_available? + = nav_link(controller: :pages) do + = link_to project_pages_path(@project), title: 'Pages' do %span - Repository - - if @project.feature_available?(:builds, current_user) - = nav_link(controller: :ci_cd) do - = link_to project_settings_ci_cd_path(@project), title: 'CI / CD' do - %span - CI / CD - - if @project.pages_available? - = nav_link(controller: :pages) do - = link_to project_pages_path(@project), title: 'Pages' do - %span - Pages - - - else - = nav_link(path: %w[members#show]) do - = link_to project_settings_members_path(@project), title: 'Members', class: 'shortcuts-tree' do - .nav-icon-container - = sprite_icon('users') - %span.nav-item-name - Members + Pages = render 'shared/sidebar_toggle_button' diff --git a/app/views/layouts/project_settings.html.haml b/app/views/layouts/project_settings.html.haml deleted file mode 100644 index 4bc94bd132d..00000000000 --- a/app/views/layouts/project_settings.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -- page_title "Settings" -- nav "project" - -= render template: "layouts/project" diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index e45861ac08d..ffd9a7e8ee7 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -1,5 +1,6 @@ - @no_container = true - project_duration = age_map_duration(@blame_groups, @project) +- breadcrumb_title _("Files") - page_title "Blame", @blob.path, @ref %div{ class: container_class } diff --git a/app/views/projects/blob/show.html.haml b/app/views/projects/blob/show.html.haml index c4712bf3736..99f396fb476 100644 --- a/app/views/projects/blob/show.html.haml +++ b/app/views/projects/blob/show.html.haml @@ -1,4 +1,4 @@ -- breadcrumb_title "Repository" +- breadcrumb_title _("Files") - @no_container = true - page_title @blob.path, @ref diff --git a/app/views/projects/compare/index.html.haml b/app/views/projects/compare/index.html.haml index 3ad0166e9cd..551452e8435 100644 --- a/app/views/projects/compare/index.html.haml +++ b/app/views/projects/compare/index.html.haml @@ -1,6 +1,6 @@ - @no_container = true - breadcrumb_title "Compare Revisions" -- page_title "Compare" +- page_title "Compare Revisions" %div{ class: container_class } .sub-header-block diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml index f87f1d476f5..5e1f8220af8 100644 --- a/app/views/projects/compare/show.html.haml +++ b/app/views/projects/compare/show.html.haml @@ -1,5 +1,5 @@ - @no_container = true -- add_to_breadcrumbs "Compare Revisions", project_compare_index_path(@project) +- breadcrumb_title "Compare Revisions" - page_title "#{params[:from]}...#{params[:to]}" %div{ class: container_class } diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 8ae4fd94146..affe80d0951 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -1,5 +1,5 @@ - breadcrumb_title "General Settings" -- page_title "General" +- page_title "General Settings" - @content_class = "limit-container-width" unless fluid_layout - expanded = Rails.env.test? diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml index 2e85f608823..6f96b7d6068 100644 --- a/app/views/projects/environments/index.html.haml +++ b/app/views/projects/environments/index.html.haml @@ -1,6 +1,5 @@ - @no_container = true - page_title "Environments" -- add_to_breadcrumbs("Pipelines", project_pipelines_path(@project)) - content_for :page_specific_javascripts do = page_specific_javascript_bundle_tag('common_vue') diff --git a/app/views/projects/find_file/show.html.haml b/app/views/projects/find_file/show.html.haml index a3467eb6f05..e042989fbc2 100644 --- a/app/views/projects/find_file/show.html.haml +++ b/app/views/projects/find_file/show.html.haml @@ -1,3 +1,4 @@ +- breadcrumb_title _("Files") - page_title "Find File", @ref .file-finder-holder.tree-holder.clearfix.js-file-finder{ 'data-file-find-url': "#{escape_javascript(project_files_path(@project, @ref, @options.merge(format: :json)))}", 'data-find-tree-url': escape_javascript(project_tree_path(@project, @ref)), 'data-blob-url-template': escape_javascript(project_blob_path(@project, @id || @commit.id)) } diff --git a/app/views/projects/pipelines/charts.html.haml b/app/views/projects/pipelines/charts.html.haml index ba55bc23add..561d18ba61b 100644 --- a/app/views/projects/pipelines/charts.html.haml +++ b/app/views/projects/pipelines/charts.html.haml @@ -1,6 +1,6 @@ - @no_container = true - breadcrumb_title "CI / CD Charts" -- page_title _("Charts"), _("Pipelines") +- page_title _("CI/CD Charts") - content_for :page_specific_javascripts do = page_specific_javascript_bundle_tag('common_d3') = page_specific_javascript_bundle_tag('graphs') diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 62455d0d40d..1568eb258ea 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -1,6 +1,5 @@ - @content_class = "limit-container-width" unless fluid_layout - page_title "CI / CD Settings" -- page_title "CI / CD" - expanded = Rails.env.test? diff --git a/app/views/projects/settings/integrations/show.html.haml b/app/views/projects/settings/integrations/show.html.haml index 2f1a548e119..555a36ef39e 100644 --- a/app/views/projects/settings/integrations/show.html.haml +++ b/app/views/projects/settings/integrations/show.html.haml @@ -1,5 +1,5 @@ - @content_class = "limit-container-width" unless fluid_layout - breadcrumb_title "Integrations Settings" -- page_title 'Integrations' +- page_title 'Integrations Settings' = render 'projects/hooks/index' = render 'projects/services/index' diff --git a/app/views/projects/settings/repository/show.html.haml b/app/views/projects/settings/repository/show.html.haml index 517d51993d2..4e8c1345a67 100644 --- a/app/views/projects/settings/repository/show.html.haml +++ b/app/views/projects/settings/repository/show.html.haml @@ -1,5 +1,5 @@ - breadcrumb_title "Repository Settings" -- page_title "Repository" +- page_title "Repository Settings" - @content_class = "limit-container-width" unless fluid_layout - content_for :page_specific_javascripts do diff --git a/app/views/projects/snippets/new.html.haml b/app/views/projects/snippets/new.html.haml index 1359a815429..347ef2de689 100644 --- a/app/views/projects/snippets/new.html.haml +++ b/app/views/projects/snippets/new.html.haml @@ -1,6 +1,5 @@ -- add_to_breadcrumbs "Snippets", project_snippets_path(@project) -- breadcrumb_title "New" -- page_title "New Snippets" +- breadcrumb_title "Snippets" +- page_title "New Snippet" %h3.page-title New Snippet diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml index 27d58d4c0e8..aeb89728ca9 100644 --- a/app/views/projects/tags/index.html.haml +++ b/app/views/projects/tags/index.html.haml @@ -1,7 +1,6 @@ - @no_container = true - @sort ||= sort_value_recently_updated - page_title "Tags" -- add_to_breadcrumbs("Repository", project_tree_path(@project)) .flex-list{ class: container_class } .top-area.adjust diff --git a/app/views/projects/tree/show.html.haml b/app/views/projects/tree/show.html.haml index 0cc6674842a..58dd901fdd3 100644 --- a/app/views/projects/tree/show.html.haml +++ b/app/views/projects/tree/show.html.haml @@ -1,5 +1,5 @@ - @no_container = true -- breadcrumb_title _("Repository") +- breadcrumb_title _("Files") - @content_class = "limit-container-width" unless fluid_layout - page_title @path.presence || _("Files"), @ref diff --git a/app/views/shared/boards/_show.html.haml b/app/views/shared/boards/_show.html.haml index ee8ad8e3999..3481e31120b 100644 --- a/app/views/shared/boards/_show.html.haml +++ b/app/views/shared/boards/_show.html.haml @@ -2,7 +2,7 @@ - @no_container = true - @content_class = "issue-boards-content" - breadcrumb_title "Issue Board" -- page_title "Boards" +- page_title "Issue Board" - content_for :page_specific_javascripts do = webpack_bundle_tag 'common_vue' diff --git a/app/views/snippets/edit.html.haml b/app/views/snippets/edit.html.haml index 18ebeb78f87..0e7477046e5 100644 --- a/app/views/snippets/edit.html.haml +++ b/app/views/snippets/edit.html.haml @@ -1,3 +1,4 @@ +- breadcrumb_title @snippet.to_reference - page_title "Edit", "#{@snippet.title} (#{@snippet.to_reference})", "Snippets" %h3.page-title Edit Snippet |