From a8460f215cc1949b993e774dc00bad0b506abcfa Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Fri, 18 Aug 2017 17:19:23 +0100 Subject: style updates fixed some more breadcrumb titles --- app/helpers/groups_helper.rb | 6 +++--- app/helpers/projects_helper.rb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/helpers') diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 7f43e4106fc..3edeb406b36 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -17,7 +17,7 @@ module GroupsHelper group.ancestors.reverse.each_with_index do |parent, index| if show_new_nav? && index > 0 - add_to_breadcrumb_dropdown(group_title_link(parent, hidable: false), location: :before) + add_to_breadcrumb_dropdown(group_title_link(parent, hidable: false, show_avatar: true), location: :before) else full_title += if show_new_nav? breadcrumb_list_item group_title_link(parent, hidable: false) @@ -83,10 +83,10 @@ module GroupsHelper private - def group_title_link(group, hidable: false) + def group_title_link(group, hidable: false, show_avatar: false) link_to(group_path(group), class: "group-path #{'hidable' if hidable}") do output = - if show_new_nav? && group.try(:avatar_url) + if show_new_nav? && group.try(:avatar_url) || (show_new_nav? && show_avatar) image_tag(group_icon(group), class: "avatar-tile", width: 16, height: 16) else "" diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 867f3fadfb9..5f61dafaae5 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -52,7 +52,7 @@ module ProjectsHelper def project_title(project) namespace_link = if project.group - group_title(project.group) + group_title(project.group, nil, nil) else owner = project.namespace.owner link_to(simple_sanitize(owner.name), user_path(owner)) @@ -66,7 +66,7 @@ module ProjectsHelper "" end - output << simple_sanitize(project.name) + output << content_tag("span", simple_sanitize(project.name), class: "breadcrumb-item-project-name") output.html_safe end -- cgit v1.2.1