Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-08-16 15:13:34 +0300
committerPhil Hughes <me@iamphill.com>2017-08-18 13:07:05 +0300
commita10cc2202dffcf8b4a7bc7db22757ac83bf95eb4 (patch)
tree23df31ffcbc60fba465286c1dffa7dff23e03933 /app/helpers/groups_helper.rb
parent85b272b22365a7e4588d4897ad9ce78ea180f124 (diff)
added collapsible sub-groups & wiki pages
[ci skip]
Diffstat (limited to 'app/helpers/groups_helper.rb')
-rw-r--r--app/helpers/groups_helper.rb20
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
""