Skip to content
Snippets Groups Projects
Commit 6328f26c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Show full path in header UI for nested groups/projects

parent 0764c2ea
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -12,11 +12,18 @@ module GroupsHelper
end
 
def group_title(group, name = nil, url = nil)
full_title = link_to(simple_sanitize(group.name), group_path(group))
full_title = ''
group.parents.each do |parent|
full_title += link_to(simple_sanitize(parent.name), group_path(parent))
full_title += ' / '.html_safe
end
full_title += link_to(simple_sanitize(group.name), group_path(group))
full_title += ' · '.html_safe + link_to(simple_sanitize(name), url) if name
 
content_tag :span do
full_title
full_title.html_safe
end
end
 
Loading
Loading
Loading
Loading
@@ -52,7 +52,7 @@ module ProjectsHelper
def project_title(project)
namespace_link =
if project.group
link_to(simple_sanitize(project.group.name), group_path(project.group))
group_title(project.group)
else
owner = project.namespace.owner
link_to(simple_sanitize(owner.name), user_path(owner))
Loading
Loading
@@ -390,7 +390,7 @@ module ProjectsHelper
"success"
end
end
def readme_cache_key
sha = @project.commit.try(:sha) || 'nil'
[@project.path_with_namespace, sha, "readme"].join('-')
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment