Commit dae629e5 authored by Phil Hughes's avatar Phil Hughes

fix some inconsistencies with the breadcrumbs

parent a10cc220
...@@ -14,7 +14,8 @@ export default () => { ...@@ -14,7 +14,8 @@ export default () => {
topLevelLinks.forEach(el => addTooltipToEl(el)); topLevelLinks.forEach(el => addTooltipToEl(el));
$expander.closest('.dropdown') $expander.closest('.dropdown')
.on('show.bs.dropdown hide.bs.dropdown', () => { .on('show.bs.dropdown hide.bs.dropdown', (e) => {
$expander.toggleClass('open'); $('.js-breadcrumbs-collapsed-expander', e.currentTarget).toggleClass('open')
.tooltip('hide');
}); });
}; };
...@@ -330,6 +330,7 @@ header.navbar-gitlab-new { ...@@ -330,6 +330,7 @@ header.navbar-gitlab-new {
.breadcrumbs-list { .breadcrumbs-list {
display: flex; display: flex;
flex-wrap: wrap;
margin-bottom: 0; margin-bottom: 0;
> li { > li {
...@@ -338,11 +339,7 @@ header.navbar-gitlab-new { ...@@ -338,11 +339,7 @@ header.navbar-gitlab-new {
position: relative; position: relative;
&:not(:last-child) { &:not(:last-child) {
margin-right: 10px; margin-right: 20px;
}
&:not(:first-child) {
margin-left: 10px;
} }
> a { > a {
......
...@@ -22,7 +22,7 @@ module GroupsHelper ...@@ -22,7 +22,7 @@ module GroupsHelper
full_title += if show_new_nav? full_title += if show_new_nav?
breadcrumb_list_item group_title_link(parent, hidable: false) breadcrumb_list_item group_title_link(parent, hidable: false)
else else
group_title_link(parent, hidable: true) "#{group_title_link(parent, hidable: true)} <span class='hidable'> / </span>".html_safe
end end
end end
end end
......
...@@ -126,12 +126,21 @@ module IssuablesHelper ...@@ -126,12 +126,21 @@ module IssuablesHelper
end end
def issuable_meta(issuable, project, text) def issuable_meta(issuable, project, text)
output = content_tag(:strong, class: "identifier") do output = ""
concat("#{text} ")
concat(to_url_reference(issuable)) unless show_new_nav?
output << content_tag(:strong, class: "identifier") do
concat("#{text} ")
concat(to_url_reference(issuable))
end
end end
output << " opened #{time_ago_with_tooltip(issuable.created_at)} by ".html_safe opened_text = if show_new_nav?
"Opened"
else
" opened"
end
output << "#{opened_text} #{time_ago_with_tooltip(issuable.created_at)} by ".html_safe
output << content_tag(:strong) do output << content_tag(:strong) do
author_output = link_to_member(project, issuable.author, size: 24, mobile_classes: "hidden-xs", tooltip: true) author_output = link_to_member(project, issuable.author, size: 24, mobile_classes: "hidden-xs", tooltip: true)
author_output << link_to_member(project, issuable.author, size: 24, by_username: true, avatar: false, mobile_classes: "hidden-sm hidden-md hidden-lg") author_output << link_to_member(project, issuable.author, size: 24, by_username: true, avatar: false, mobile_classes: "hidden-sm hidden-md hidden-lg")
...@@ -141,7 +150,7 @@ module IssuablesHelper ...@@ -141,7 +150,7 @@ module IssuablesHelper
output << content_tag(:span, (issuable.task_status if issuable.tasks?), id: "task_status", class: "hidden-xs hidden-sm") output << content_tag(:span, (issuable.task_status if issuable.tasks?), id: "task_status", class: "hidden-xs hidden-sm")
output << content_tag(:span, (issuable.task_status_short if issuable.tasks?), id: "task_status_short", class: "hidden-md hidden-lg") output << content_tag(:span, (issuable.task_status_short if issuable.tasks?), id: "task_status_short", class: "hidden-md hidden-lg")
output output.html_safe
end end
def issuable_todo(issuable) def issuable_todo(issuable)
......
...@@ -81,7 +81,7 @@ module ProjectsHelper ...@@ -81,7 +81,7 @@ module ProjectsHelper
end end
end end
"#{namespace_link} #{project_link}".html_safe "#{namespace_link} #{('/' unless show_new_nav?)} #{project_link}".html_safe
end end
def remove_project_message(project) def remove_project_message(project)
......
- breadcrumb_link = breadcrumb_title_link
- hide_top_links = @hide_top_links || false - hide_top_links = @hide_top_links || false
%nav.breadcrumbs{ role: "navigation" } %nav.breadcrumbs{ role: "navigation", class: [container_class, @content_class] }
.breadcrumbs-container{ class: [container_class, @content_class] } .breadcrumbs-container
- if defined?(@new_sidebar) - if defined?(@new_sidebar)
= button_tag class: 'toggle-mobile-nav', type: 'button' do = button_tag class: 'toggle-mobile-nav', type: 'button' do
%span.sr-only Open sidebar %span.sr-only Open sidebar
......
- @no_container = true - @no_container = true
- breadcrumb_title "Commit #{@commit.short_id}" - add_to_breadcrumbs "Commit", project_commits_path(@project)
- breadcrumb_title @commit.short_id
- container_class = !fluid_layout && diff_view == :inline ? 'container-limited' : '' - container_class = !fluid_layout && diff_view == :inline ? 'container-limited' : ''
- limited_container_width = fluid_layout ? '' : 'limit-container-width' - limited_container_width = fluid_layout ? '' : 'limit-container-width'
- @content_class = limited_container_width - @content_class = limited_container_width
......
- @no_container = true - @no_container = true
- breadcrumb_title "Enviroment '#{@environment.name}'" - add_to_breadcrumbs "Environments", project_environments_path(@project)
- breadcrumb_title @environment.name
- page_title "Environments" - page_title "Environments"
= render "projects/pipelines/head" = render "projects/pipelines/head"
......
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
- breadcrumb_title "Issues #{@issue.to_reference}" - add_to_breadcrumbs "Issues", project_issues_path(@project)
- breadcrumb_title @issue.to_reference
- page_title "#{@issue.title} (#{@issue.to_reference})", "Issues" - page_title "#{@issue.title} (#{@issue.to_reference})", "Issues"
- page_description @issue.description - page_description @issue.description
- page_card_attributes @issue.card_attributes - page_card_attributes @issue.card_attributes
......
- @no_container = true - @no_container = true
- breadcrumb_title "Jobs ##{@build.id}" - add_to_breadcrumbs "Jobs", project_jobs_path(@project)
- breadcrumb_title "##{@build.id}"
- page_title "#{@build.name} (##{@build.id})", "Jobs" - page_title "#{@build.name} (##{@build.id})", "Jobs"
= render "projects/pipelines/head" = render "projects/pipelines/head"
......
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
- breadcrumb_title "Merge Requests #{@merge_request.to_reference}" - add_to_breadcrumbs "Merge Requests", project_merge_requests_path(@project)
- breadcrumb_title @merge_request.to_reference
- page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests" - page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests"
- page_description @merge_request.description - page_description @merge_request.description
- page_card_attributes @merge_request.card_attributes - page_card_attributes @merge_request.card_attributes
......
- @no_container = true - @no_container = true
- breadcrumb_title "Milestone #{@milestone.title}" - add_to_breadcrumbs "Milestones", project_milestones_path(@project)
- breadcrumb_title @milestone.title
- page_title @milestone.title, "Milestones" - page_title @milestone.title, "Milestones"
- page_description @milestone.description - page_description @milestone.description
= render "shared/mr_head" = render "shared/mr_head"
......
- @no_container = true - @no_container = true
- breadcrumb_title "Pipelines ##{@pipeline.id}" - add_to_breadcrumbs "Pipelines", project_pipelines_path(@project)
- breadcrumb_title "##{@pipeline.id}"
- page_title "Pipeline" - page_title "Pipeline"
= render "projects/pipelines/head" = render "projects/pipelines/head"
......
- @content_class = "limit-container-width limited-inner-width-container" unless fluid_layout - @content_class = "limit-container-width limited-inner-width-container" unless fluid_layout
- breadcrumb_title "Snippet #{@snippet.to_reference}" - add_to_breadcrumbs "Snippets", dashboard_snippets_path
- breadcrumb_title @snippet.to_reference
- page_title "#{@snippet.title} (#{@snippet.to_reference})", "Snippets" - page_title "#{@snippet.title} (#{@snippet.to_reference})", "Snippets"
= render 'shared/snippets/header' = render 'shared/snippets/header'
......
- @no_container = true - @no_container = true
- breadcrumb_title "Tags #{@tag.name}" - add_to_breadcrumbs "Tags", project_tags_path(@project)
- breadcrumb_title @tag.name
- page_title @tag.name, "Tags" - page_title @tag.name, "Tags"
= render "projects/commits/head" = render "projects/commits/head"
......
...@@ -3,10 +3,14 @@ ...@@ -3,10 +3,14 @@
%span.sr-only %span.sr-only
= visibility_level_label(@snippet.visibility_level) = visibility_level_label(@snippet.visibility_level)
= visibility_level_icon(@snippet.visibility_level, fw: false) = visibility_level_icon(@snippet.visibility_level, fw: false)
%strong.item-title - unless show_new_nav?
Snippet #{@snippet.to_reference} %strong.item-title
Snippet #{@snippet.to_reference}
%span.creator %span.creator
authored - if show_new_nav?
Authored
- else
authored
= time_ago_with_tooltip(@snippet.created_at, placement: 'bottom', html_class: 'snippet_updated_ago') = time_ago_with_tooltip(@snippet.created_at, placement: 'bottom', html_class: 'snippet_updated_ago')
by #{link_to_member(@project, @snippet.author, size: 24, author_class: "author item-title", avatar_class: "hidden-xs")} by #{link_to_member(@project, @snippet.author, size: 24, author_class: "author item-title", avatar_class: "hidden-xs")}
......
- @hide_top_links = true - @hide_top_links = true
- @content_class = "limit-container-width limited-inner-width-container" unless fluid_layout - @content_class = "limit-container-width limited-inner-width-container" unless fluid_layout
- add_to_breadcrumbs "Snippets", dashboard_snippets_path
- breadcrumb_title @snippet.to_reference
- page_title "#{@snippet.title} (#{@snippet.to_reference})", "Snippets" - page_title "#{@snippet.title} (#{@snippet.to_reference})", "Snippets"
= render 'shared/snippets/header' = render 'shared/snippets/header'
......
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