Commit 8e9ae780 authored by Phil Hughes's avatar Phil Hughes

rename method

parent 59195b98
module BreadcrumbsHelper module BreadcrumbsHelper
def breadcrumbs_extra_links(text, link) def add_to_breadcrumbs(text, link)
@breadcrumbs_extra_links ||= [] @breadcrumbs_extra_links ||= []
@breadcrumbs_extra_links.push({ @breadcrumbs_extra_links.push({
text: text, text: text,
......
- page_title 'Two-Factor Authentication', 'Account' - page_title 'Two-Factor Authentication', 'Account'
- if show_new_nav? - if show_new_nav?
- breadcrumbs_extra_links("Account", profile_account_path) - add_to_breadcrumbs("Account", profile_account_path)
- else - else
- header_title "Two-Factor Authentication", profile_two_factor_auth_path - header_title "Two-Factor Authentication", profile_two_factor_auth_path
- @breadcrumb_title = "Two-Factor Authentication" - @breadcrumb_title = "Two-Factor Authentication"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- @breadcrumb_title = "Activity" - @breadcrumb_title = "Activity"
- if show_new_nav? - if show_new_nav?
- breadcrumbs_extra_links("Project", project_path(@project)) - add_to_breadcrumbs("Project", project_path(@project))
- page_title "Activity" - page_title "Activity"
= render "projects/head" = render "projects/head"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- page_title "Boards" - page_title "Boards"
- if show_new_nav? - 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 - content_for :page_specific_javascripts do
= webpack_bundle_tag 'common_vue' = webpack_bundle_tag 'common_vue'
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
= render "projects/commits/head" = render "projects/commits/head"
- if show_new_nav? - if show_new_nav?
- breadcrumbs_extra_links("Repository", project_tree_path(@project)) - add_to_breadcrumbs("Repository", project_tree_path(@project))
%div{ class: container_class } %div{ class: container_class }
.top-area.adjust .top-area.adjust
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
= auto_discovery_link_tag(:atom, project_commits_url(@project, @ref, rss_url_options), title: "#{@project.name}:#{@ref} commits") = auto_discovery_link_tag(:atom, project_commits_url(@project, @ref, rss_url_options), title: "#{@project.name}:#{@ref} commits")
- if show_new_nav? - 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 = content_for :sub_nav do
= render "head" = render "head"
......
- @no_container = true - @no_container = true
- page_title "Compare" - page_title "Compare"
- if show_new_nav? - 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 "projects/commits/head"
%div{ class: container_class } %div{ class: container_class }
......
- @no_container = true - @no_container = true
- page_title "#{params[:from]}...#{params[:to]}" - page_title "#{params[:from]}...#{params[:to]}"
- if show_new_nav? - 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 "projects/commits/head"
%div{ class: container_class } %div{ class: container_class }
......
- @no_container = true - @no_container = true
- page_title "Cycle Analytics" - page_title "Cycle Analytics"
- if show_new_nav? - if show_new_nav?
- breadcrumbs_extra_links("Project", project_path(@project)) - add_to_breadcrumbs("Project", project_path(@project))
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_bundle_tag('common_vue') = page_specific_javascript_bundle_tag('common_vue')
= page_specific_javascript_bundle_tag('cycle_analytics') = page_specific_javascript_bundle_tag('cycle_analytics')
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
= render "projects/pipelines/head" = render "projects/pipelines/head"
- if show_new_nav? - 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 - content_for :page_specific_javascripts do
= page_specific_javascript_bundle_tag('common_vue') = page_specific_javascript_bundle_tag('common_vue')
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- @breadcrumb_title = "Charts" - @breadcrumb_title = "Charts"
- page_title "Charts" - page_title "Charts"
- if show_new_nav? - 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 - content_for :page_specific_javascripts do
= page_specific_javascript_bundle_tag('common_d3') = page_specific_javascript_bundle_tag('common_d3')
= page_specific_javascript_bundle_tag('graphs') = page_specific_javascript_bundle_tag('graphs')
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
= page_specific_javascript_bundle_tag('graphs') = page_specific_javascript_bundle_tag('graphs')
- if show_new_nav? - 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 'projects/commits/head'
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
= render "projects/pipelines/head" = render "projects/pipelines/head"
- if show_new_nav? - if show_new_nav?
- breadcrumbs_extra_links("Pipelines", project_pipelines_path(@project)) - add_to_breadcrumbs("Pipelines", project_pipelines_path(@project))
%div{ class: container_class } %div{ class: container_class }
.top-area .top-area
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_bundle_tag('network') = page_specific_javascript_bundle_tag('network')
- if show_new_nav? - 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 "projects/commits/head"
= render "head" = render "head"
%div{ class: container_class } %div{ class: container_class }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- content_for :breadcrumbs_extra do - content_for :breadcrumbs_extra do
= link_to _('New schedule'), new_namespace_project_pipeline_schedule_path(@project.namespace, @project), class: 'btn btn-create' = 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" = render "projects/pipelines/head"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- page_title _("New Pipeline Schedule") - page_title _("New Pipeline Schedule")
- if show_new_nav? - if show_new_nav?
- breadcrumbs_extra_links("Pipelines", project_pipelines_path(@project)) - add_to_breadcrumbs("Pipelines", project_pipelines_path(@project))
%h3.page-title %h3.page-title
= _("Schedule a new pipeline") = _("Schedule a new pipeline")
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- @breadcrumb_title = "Charts" - @breadcrumb_title = "Charts"
- page_title _("Charts"), _("Pipelines") - page_title _("Charts"), _("Pipelines")
- if show_new_nav? - 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 - content_for :page_specific_javascripts do
= page_specific_javascript_bundle_tag('common_d3') = page_specific_javascript_bundle_tag('common_d3')
= page_specific_javascript_bundle_tag('graphs') = page_specific_javascript_bundle_tag('graphs')
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- page_title "Members" - page_title "Members"
- if show_new_nav? - if show_new_nav?
- breadcrumbs_extra_links("Settings", edit_project_path(@project)) - add_to_breadcrumbs("Settings", edit_project_path(@project))
.row.prepend-top-default .row.prepend-top-default
.col-lg-12 .col-lg-12
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- page_title @service.title, "Services" - page_title @service.title, "Services"
- if show_new_nav? - 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/settings/head"
= render 'form' = render 'form'
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- page_title "Pipelines" - page_title "Pipelines"
- if show_new_nav? - 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/settings/head"
......
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
- page_title 'Integrations' - page_title 'Integrations'
- if show_new_nav? - 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/settings/head"
= render 'projects/hooks/index' = render 'projects/hooks/index'
= render 'projects/services/index' = render 'projects/services/index'
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
- if show_new_nav? - 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/settings/head"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= render "projects/commits/head" = render "projects/commits/head"
- if show_new_nav? - 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 } .flex-list{ class: container_class }
.top-area.adjust .top-area.adjust
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment