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

rename method

parent 59195b98
module BreadcrumbsHelper
def breadcrumbs_extra_links(text, link)
def add_to_breadcrumbs(text, link)
@breadcrumbs_extra_links ||= []
@breadcrumbs_extra_links.push({
text: text,
......
- 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"
......
......@@ -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"
......
......@@ -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'
......
......@@ -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
......
......@@ -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"
......
- @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 }
......
- @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 }
......
- @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')
......
......@@ -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')
......
......@@ -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')
......
......@@ -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'
......
......@@ -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
......
......@@ -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 }
......
......@@ -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"
......
......@@ -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")
......
......@@ -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')
......
......@@ -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
......
......@@ -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'
......@@ -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"
......
- @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'
......@@ -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"
......
......@@ -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
......
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