diff options
author | Phil Hughes <me@iamphill.com> | 2017-07-07 23:50:34 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-07-07 23:50:34 +0300 |
commit | 8e9ae78007010afb967cdf01f29568744d4c8c7a (patch) | |
tree | fb2d49fc5be3808bf2a8b5874210aa9f1237e21d | |
parent | 59195b98d3dfef31915c901e86f91cec74d5fbfa (diff) |
rename method
23 files changed, 23 insertions, 23 deletions
diff --git a/app/helpers/breadcrumbs_helper.rb b/app/helpers/breadcrumbs_helper.rb index eb8df3bc1ea..6eb1060ed4c 100644 --- a/app/helpers/breadcrumbs_helper.rb +++ b/app/helpers/breadcrumbs_helper.rb @@ -1,5 +1,5 @@ module BreadcrumbsHelper - def breadcrumbs_extra_links(text, link) + def add_to_breadcrumbs(text, link) @breadcrumbs_extra_links ||= [] @breadcrumbs_extra_links.push({ text: text, diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml index 5e4bf4297e0..326a87f579f 100644 --- a/app/views/profiles/two_factor_auths/show.html.haml +++ b/app/views/profiles/two_factor_auths/show.html.haml @@ -1,6 +1,6 @@ - page_title 'Two-Factor Authentication', 'Account' - if show_new_nav? - - breadcrumbs_extra_links("Account", profile_account_path) + - add_to_breadcrumbs("Account", profile_account_path) - else - header_title "Two-Factor Authentication", profile_two_factor_auth_path - @breadcrumb_title = "Two-Factor Authentication" diff --git a/app/views/projects/activity.html.haml b/app/views/projects/activity.html.haml index 23eb1b5290c..dc79be269c6 100644 --- a/app/views/projects/activity.html.haml +++ b/app/views/projects/activity.html.haml @@ -2,7 +2,7 @@ - @breadcrumb_title = "Activity" - if show_new_nav? - - breadcrumbs_extra_links("Project", project_path(@project)) + - add_to_breadcrumbs("Project", project_path(@project)) - page_title "Activity" = render "projects/head" diff --git a/app/views/projects/boards/_show.html.haml b/app/views/projects/boards/_show.html.haml index cb916059afb..49a92240f91 100644 --- a/app/views/projects/boards/_show.html.haml +++ b/app/views/projects/boards/_show.html.haml @@ -4,7 +4,7 @@ - page_title "Boards" - if show_new_nav? - - breadcrumbs_extra_links("Issues", project_issues_path(@project)) + - add_to_breadcrumbs("Issues", project_issues_path(@project)) - content_for :page_specific_javascripts do = webpack_bundle_tag 'common_vue' diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml index 01442dc517e..f18a37ba499 100644 --- a/app/views/projects/branches/index.html.haml +++ b/app/views/projects/branches/index.html.haml @@ -3,7 +3,7 @@ = render "projects/commits/head" - if show_new_nav? - - breadcrumbs_extra_links("Repository", project_tree_path(@project)) + - add_to_breadcrumbs("Repository", project_tree_path(@project)) %div{ class: container_class } .top-area.adjust diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index a949ceefd6e..61724e99bf2 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -5,7 +5,7 @@ = auto_discovery_link_tag(:atom, project_commits_url(@project, @ref, rss_url_options), title: "#{@project.name}:#{@ref} commits") - if show_new_nav? - - breadcrumbs_extra_links("Repository", project_tree_path(@project)) + - add_to_breadcrumbs("Repository", project_tree_path(@project)) = content_for :sub_nav do = render "head" diff --git a/app/views/projects/compare/index.html.haml b/app/views/projects/compare/index.html.haml index b245a91dc33..05de21e8dbf 100644 --- a/app/views/projects/compare/index.html.haml +++ b/app/views/projects/compare/index.html.haml @@ -1,7 +1,7 @@ - @no_container = true - page_title "Compare" - if show_new_nav? - - breadcrumbs_extra_links("Repository", project_tree_path(@project)) + - add_to_breadcrumbs("Repository", project_tree_path(@project)) = render "projects/commits/head" %div{ class: container_class } diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml index e23fa6068a6..42a21d33013 100644 --- a/app/views/projects/compare/show.html.haml +++ b/app/views/projects/compare/show.html.haml @@ -1,7 +1,7 @@ - @no_container = true - page_title "#{params[:from]}...#{params[:to]}" - if show_new_nav? - - breadcrumbs_extra_links("Repository", project_tree_path(@project)) + - add_to_breadcrumbs("Repository", project_tree_path(@project)) = render "projects/commits/head" %div{ class: container_class } diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index f13499a5c11..aa5b6348bed 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -1,7 +1,7 @@ - @no_container = true - page_title "Cycle Analytics" - if show_new_nav? - - breadcrumbs_extra_links("Project", project_path(@project)) + - add_to_breadcrumbs("Project", project_path(@project)) - content_for :page_specific_javascripts do = page_specific_javascript_bundle_tag('common_vue') = page_specific_javascript_bundle_tag('cycle_analytics') diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml index 595c444f7ea..d0f723af5bf 100644 --- a/app/views/projects/environments/index.html.haml +++ b/app/views/projects/environments/index.html.haml @@ -3,7 +3,7 @@ = render "projects/pipelines/head" - if show_new_nav? - - breadcrumbs_extra_links("Pipelines", project_pipelines_path(@project)) + - 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/graphs/charts.html.haml b/app/views/projects/graphs/charts.html.haml index 9f21655a11e..36920260ae8 100644 --- a/app/views/projects/graphs/charts.html.haml +++ b/app/views/projects/graphs/charts.html.haml @@ -2,7 +2,7 @@ - @breadcrumb_title = "Charts" - page_title "Charts" - if show_new_nav? - - breadcrumbs_extra_links("Repository", project_tree_path(@project)) + - add_to_breadcrumbs("Repository", project_tree_path(@project)) - 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/graphs/show.html.haml b/app/views/projects/graphs/show.html.haml index 13161d6da22..2d37963fb7d 100644 --- a/app/views/projects/graphs/show.html.haml +++ b/app/views/projects/graphs/show.html.haml @@ -6,7 +6,7 @@ = page_specific_javascript_bundle_tag('graphs') - if show_new_nav? - - breadcrumbs_extra_links("Repository", project_tree_path(@project)) + - add_to_breadcrumbs("Repository", project_tree_path(@project)) = render 'projects/commits/head' diff --git a/app/views/projects/jobs/index.html.haml b/app/views/projects/jobs/index.html.haml index f4fe56036b1..d78891546f7 100644 --- a/app/views/projects/jobs/index.html.haml +++ b/app/views/projects/jobs/index.html.haml @@ -3,7 +3,7 @@ = render "projects/pipelines/head" - if show_new_nav? - - breadcrumbs_extra_links("Pipelines", project_pipelines_path(@project)) + - add_to_breadcrumbs("Pipelines", project_pipelines_path(@project)) %div{ class: container_class } .top-area diff --git a/app/views/projects/network/show.html.haml b/app/views/projects/network/show.html.haml index 1cb9ce25d2e..314914fd7b2 100644 --- a/app/views/projects/network/show.html.haml +++ b/app/views/projects/network/show.html.haml @@ -3,7 +3,7 @@ - content_for :page_specific_javascripts do = page_specific_javascript_bundle_tag('network') - if show_new_nav? - - breadcrumbs_extra_links("Repository", project_tree_path(@project)) + - add_to_breadcrumbs("Repository", project_tree_path(@project)) = render "projects/commits/head" = render "head" %div{ class: container_class } diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml index 5f9518e5102..652d52d6814 100644 --- a/app/views/projects/pipeline_schedules/index.html.haml +++ b/app/views/projects/pipeline_schedules/index.html.haml @@ -11,7 +11,7 @@ - content_for :breadcrumbs_extra do = link_to _('New schedule'), new_namespace_project_pipeline_schedule_path(@project.namespace, @project), class: 'btn btn-create' - - breadcrumbs_extra_links("Pipelines", project_pipelines_path(@project)) + - add_to_breadcrumbs("Pipelines", project_pipelines_path(@project)) = render "projects/pipelines/head" diff --git a/app/views/projects/pipeline_schedules/new.html.haml b/app/views/projects/pipeline_schedules/new.html.haml index f7db2498148..115c43a0aec 100644 --- a/app/views/projects/pipeline_schedules/new.html.haml +++ b/app/views/projects/pipeline_schedules/new.html.haml @@ -3,7 +3,7 @@ - page_title _("New Pipeline Schedule") - if show_new_nav? - - breadcrumbs_extra_links("Pipelines", project_pipelines_path(@project)) + - add_to_breadcrumbs("Pipelines", project_pipelines_path(@project)) %h3.page-title = _("Schedule a new pipeline") diff --git a/app/views/projects/pipelines/charts.html.haml b/app/views/projects/pipelines/charts.html.haml index ef949ad4443..7cc43501497 100644 --- a/app/views/projects/pipelines/charts.html.haml +++ b/app/views/projects/pipelines/charts.html.haml @@ -2,7 +2,7 @@ - @breadcrumb_title = "Charts" - page_title _("Charts"), _("Pipelines") - if show_new_nav? - - breadcrumbs_extra_links("Pipelines", project_pipelines_path(@project)) + - add_to_breadcrumbs("Pipelines", project_pipelines_path(@project)) - 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/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index e8f0a8ab24a..74b10574da0 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -2,7 +2,7 @@ - page_title "Members" - if show_new_nav? - - breadcrumbs_extra_links("Settings", edit_project_path(@project)) + - add_to_breadcrumbs("Settings", edit_project_path(@project)) .row.prepend-top-default .col-lg-12 diff --git a/app/views/projects/services/edit.html.haml b/app/views/projects/services/edit.html.haml index 4179d2dc8a4..3d1d62b886a 100644 --- a/app/views/projects/services/edit.html.haml +++ b/app/views/projects/services/edit.html.haml @@ -2,7 +2,7 @@ - page_title @service.title, "Services" - if show_new_nav? - - breadcrumbs_extra_links("Settings", edit_project_path(@project)) + - add_to_breadcrumbs("Settings", edit_project_path(@project)) = render "projects/settings/head" = render 'form' diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 8ca15861025..3f118f8933d 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -3,7 +3,7 @@ - page_title "Pipelines" - if show_new_nav? - - breadcrumbs_extra_links("Settings", edit_project_path(@project)) + - add_to_breadcrumbs("Settings", edit_project_path(@project)) = render "projects/settings/head" diff --git a/app/views/projects/settings/integrations/show.html.haml b/app/views/projects/settings/integrations/show.html.haml index 3bbbc0af017..149da96d3f6 100644 --- a/app/views/projects/settings/integrations/show.html.haml +++ b/app/views/projects/settings/integrations/show.html.haml @@ -1,7 +1,7 @@ - @content_class = "limit-container-width" unless fluid_layout - page_title 'Integrations' - if show_new_nav? - - breadcrumbs_extra_links("Settings", edit_project_path(@project)) + - add_to_breadcrumbs("Settings", edit_project_path(@project)) = render "projects/settings/head" = 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 516b126f029..41080b81bdc 100644 --- a/app/views/projects/settings/repository/show.html.haml +++ b/app/views/projects/settings/repository/show.html.haml @@ -2,7 +2,7 @@ - @content_class = "limit-container-width" unless fluid_layout - if show_new_nav? - - breadcrumbs_extra_links("Settings", edit_project_path(@project)) + - add_to_breadcrumbs("Settings", edit_project_path(@project)) = render "projects/settings/head" diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml index 805cc960c54..00000e0667c 100644 --- a/app/views/projects/tags/index.html.haml +++ b/app/views/projects/tags/index.html.haml @@ -4,7 +4,7 @@ = render "projects/commits/head" - if show_new_nav? - - breadcrumbs_extra_links("Repository", project_tree_path(@project)) + - add_to_breadcrumbs("Repository", project_tree_path(@project)) .flex-list{ class: container_class } .top-area.adjust |