summaryrefslogtreecommitdiff
path: root/app/helpers/groups_helper.rb
diff options
context:
space:
mode:
authorSam Rose <sam@gitlab.com>2017-02-28 21:59:55 -0500
committerSam Rose <sam@gitlab.com>2017-03-13 19:25:13 -0400
commitdb59e735ae9c30bfa1e9d0800b6edfaaf6981f2a (patch)
tree2d645047a5a692b49f516feb158d057ef82f344e /app/helpers/groups_helper.rb
parentcc64eda987d2b1dfc7c0af4255bd09f072301f9c (diff)
downloadgitlab-ce-db59e735ae9c30bfa1e9d0800b6edfaaf6981f2a.tar.gz
Toggle project name if too long28187-project-name-cut-off-with-nested-groups
Diffstat (limited to 'app/helpers/groups_helper.rb')
-rw-r--r--app/helpers/groups_helper.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb
index 926c9703628..a6014088e92 100644
--- a/app/helpers/groups_helper.rb
+++ b/app/helpers/groups_helper.rb
@@ -12,17 +12,18 @@ module GroupsHelper
end
def group_title(group, name = nil, url = nil)
+ @has_group_title = true
full_title = ''
group.ancestors.each do |parent|
- full_title += link_to(simple_sanitize(parent.name), group_path(parent))
- full_title += ' / '.html_safe
+ full_title += link_to(simple_sanitize(parent.name), group_path(parent), class: 'group-path hidable')
+ full_title += '<span class="hidable"> / </span>'.html_safe
end
- full_title += link_to(simple_sanitize(group.name), group_path(group))
- full_title += ' &middot; '.html_safe + link_to(simple_sanitize(name), url) if name
+ full_title += link_to(simple_sanitize(group.name), group_path(group), class: 'group-path')
+ full_title += ' &middot; '.html_safe + link_to(simple_sanitize(name), url, class: 'group-path') if name
- content_tag :span do
+ content_tag :span, class: 'group-title' do
full_title.html_safe
end
end