diff options
author | Phil Hughes <me@iamphill.com> | 2017-08-16 13:13:34 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-18 11:07:05 +0100 |
commit | a10cc2202dffcf8b4a7bc7db22757ac83bf95eb4 (patch) | |
tree | 23df31ffcbc60fba465286c1dffa7dff23e03933 /app/helpers/groups_helper.rb | |
parent | 85b272b22365a7e4588d4897ad9ce78ea180f124 (diff) | |
download | gitlab-ce-a10cc2202dffcf8b4a7bc7db22757ac83bf95eb4.tar.gz |
added collapsible sub-groups & wiki pages
[ci skip]
Diffstat (limited to 'app/helpers/groups_helper.rb')
-rw-r--r-- | app/helpers/groups_helper.rb | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 1badaf721f2..51acd557ea7 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -16,11 +16,19 @@ module GroupsHelper full_title = '' group.ancestors.reverse.each_with_index do |parent, index| - full_title += if show_new_nav? - breadcrumb_list_item group_title_link(parent, hidable: index > 0) - else - group_title_link(parent, hidable: true) - end + if show_new_nav? && index > 0 + add_to_breadcrumb_dropdown(group_title_link(parent, hidable: false), location: :before) + else + full_title += if show_new_nav? + breadcrumb_list_item group_title_link(parent, hidable: false) + else + group_title_link(parent, hidable: true) + end + end + end + + if show_new_nav? + full_title += render "layouts/nav/breadcrumbs/collapsed_dropdown", location: :before, title: _("Show parent subgroups") end full_title += if show_new_nav? @@ -78,7 +86,7 @@ module GroupsHelper def group_title_link(group, hidable: false) link_to(group_path(group), class: "group-path #{'hidable' if hidable}") do output = - if show_new_nav? + if show_new_nav? && group.try(:avatar_url) image_tag(group_icon(group), class: "avatar-tile", width: 16, height: 16) else "" |