Commit 9fcc28d4 authored by Phil Hughes's avatar Phil Hughes

moved declaration of `breadcrumb_title` into `page_title` method

`breadcrumb_title` is then overriden when needed
parent ab6c8935
...@@ -4,6 +4,10 @@ module PageLayoutHelper ...@@ -4,6 +4,10 @@ module PageLayoutHelper
@page_title.push(*titles.compact) if titles.any? @page_title.push(*titles.compact) if titles.any?
if show_new_nav? && titles.any? && !defined?(@breadcrumb_title)
@breadcrumb_title = @page_title.first
end
# Segments are seperated by middot # Segments are seperated by middot
@page_title.join(" \u00b7 ") @page_title.join(" \u00b7 ")
end end
......
- @breadcrumb_title = "Appearance"
- page_title "Appearance" - page_title "Appearance"
%h3.page-title %h3.page-title
......
- @breadcrumb_title = "Settings"
- page_title "Settings" - page_title "Settings"
%h3.page-title Settings %h3.page-title Settings
......
- page_title "Edit", @application.name, "Applications" - page_title "Edit", @application.name, "Applications"
- @breadcrumb_title = "Applications"
%h3.page-title Edit application %h3.page-title Edit application
- @url = admin_application_path(@application) - @url = admin_application_path(@application)
= render 'form', application: @application = render 'form', application: @application
- page_title "New Application" - page_title "New Application"
- @breadcrumb_title = "Applications"
%h3.page-title New application %h3.page-title New application
- @url = admin_applications_path - @url = admin_applications_path
= render 'form', application: @application = render 'form', application: @application
- @breadcrumb_title = "System Hooks"
- page_title 'System Hooks' - page_title 'System Hooks'
%h3.page-title %h3.page-title
System hooks System hooks
......
- @breadcrumb_title = "Service Templates"
- page_title "Service Templates" - page_title "Service Templates"
%h3.page-title Service templates %h3.page-title Service templates
%p.light Service template allows you to set default values for project services %p.light Service template allows you to set default values for project services
......
- @breadcrumb_title = "Activity"
- @hide_top_links = true - @hide_top_links = true
- @no_container = true - @no_container = true
......
- @breadcrumb_title = "Issues"
- @hide_top_links = true - @hide_top_links = true
- page_title "Issues" - page_title "Issues"
- header_title "Issues", issues_dashboard_path(assignee_id: current_user.id) - header_title "Issues", issues_dashboard_path(assignee_id: current_user.id)
......
- @breadcrumb_title = "Merge Requests"
- @hide_top_links = true - @hide_top_links = true
- page_title "Merge Requests" - page_title "Merge Requests"
- header_title "Merge Requests", merge_requests_dashboard_path(assignee_id: current_user.id) - header_title "Merge Requests", merge_requests_dashboard_path(assignee_id: current_user.id)
......
- @no_container = true - @no_container = true
- @hide_top_links = true - @hide_top_links = true
- @breadcrumb_title = "Projects"
= content_for :meta_tags do = content_for :meta_tags do
= auto_discovery_link_tag(:atom, dashboard_projects_url(rss_url_options), title: "All activity") = auto_discovery_link_tag(:atom, dashboard_projects_url(rss_url_options), title: "All activity")
......
- @breadcrumb_title = "Activity"
= content_for :meta_tags do = content_for :meta_tags do
= auto_discovery_link_tag(:atom, group_url(@group, rss_url_options), title: "#{@group.name} activity") = auto_discovery_link_tag(:atom, group_url(@group, rss_url_options), title: "#{@group.name} activity")
......
- @breadcrumb_title = "Settings"
= render "groups/settings_head" = render "groups/settings_head"
.panel.panel-default.prepend-top-default .panel.panel-default.prepend-top-default
.panel-heading .panel-heading
......
- @breadcrumb_title = "Members"
- page_title "Members" - page_title "Members"
.project-members-page.prepend-top-default .project-members-page.prepend-top-default
......
- @breadcrumb_title = "Issues"
- page_title "Issues" - page_title "Issues"
- group_issues_exists = group_issues(@group).exists? - group_issues_exists = group_issues(@group).exists?
= render "head_issues" = render "head_issues"
......
- @breadcrumb_title = "Merge Requests"
- page_title "Merge Requests" - page_title "Merge Requests"
- if show_new_nav? && current_user - if show_new_nav? && current_user
......
- @breadcrumb_title = "Account"
- page_title "Account" - page_title "Account"
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
= render 'profiles/head' = render 'profiles/head'
......
- @breadcrumb_title = "Authentication log"
- page_title "Authentication log" - page_title "Authentication log"
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
= render 'profiles/head' = render 'profiles/head'
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
- add_to_breadcrumbs("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"
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
= render 'profiles/head' = render 'profiles/head'
......
- @no_container = true - @no_container = true
- @breadcrumb_title = "Activity"
- if show_new_nav? - if show_new_nav?
- add_to_breadcrumbs("Project", project_path(@project)) - add_to_breadcrumbs("Project", project_path(@project))
......
- @no_container = true - @no_container = true
- @content_class = "issue-boards-content" - @content_class = "issue-boards-content"
- @breadcrumb_title = "Board"
- page_title "Boards" - page_title "Boards"
- if show_new_nav? - if show_new_nav?
......
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
- @breadcrumb_title = "Settings"
= render "projects/settings/head" = render "projects/settings/head"
.project-edit-container .project-edit-container
......
- @no_container = true - @no_container = true
- @breadcrumb_title = "Charts"
- page_title "Charts" - page_title "Charts"
- if show_new_nav? - if show_new_nav?
- add_to_breadcrumbs("Repository", project_tree_path(@project)) - add_to_breadcrumbs("Repository", project_tree_path(@project))
......
- @no_container = true - @no_container = true
- @breadcrumb_title = "Contributors"
- page_title "Contributors" - page_title "Contributors"
- 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')
......
- @breadcrumb_title = "Graph"
- page_title "Graph", @ref - page_title "Graph", @ref
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_bundle_tag('network') = page_specific_javascript_bundle_tag('network')
......
- @no_container = true - @no_container = true
- @breadcrumb_title = "Charts"
- page_title _("Charts"), _("Pipelines") - page_title _("Charts"), _("Pipelines")
- if show_new_nav? - if show_new_nav?
- add_to_breadcrumbs("Pipelines", project_pipelines_path(@project)) - add_to_breadcrumbs("Pipelines", project_pipelines_path(@project))
......
- @breadcrumb_title = "Members"
- page_title "Members" - page_title "Members"
- if show_new_nav? - if show_new_nav?
......
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
- @breadcrumb_title = "Pipelines"
- page_title "Pipelines" - page_title "Pipelines"
- if show_new_nav? - if show_new_nav?
......
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