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/wiki_helper.rb | |
parent | 85b272b22365a7e4588d4897ad9ce78ea180f124 (diff) | |
download | gitlab-ce-a10cc2202dffcf8b4a7bc7db22757ac83bf95eb4.tar.gz |
added collapsible sub-groups & wiki pages
[ci skip]
Diffstat (limited to 'app/helpers/wiki_helper.rb')
-rw-r--r-- | app/helpers/wiki_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/wiki_helper.rb b/app/helpers/wiki_helper.rb index 99212a3438f..3d26c92e58a 100644 --- a/app/helpers/wiki_helper.rb +++ b/app/helpers/wiki_helper.rb @@ -10,4 +10,15 @@ module WikiHelper .map { |dir_or_page| WikiPage.unhyphenize(dir_or_page).capitalize } .join(' / ') end + + def wiki_breadcrumb_dropdown_links(page_slug) + page_slug_split = page_slug.split('/') + page_slug_split.pop(1) + current_slug = "" + page_slug_split + .map do |dir_or_page| + current_slug = "#{current_slug}/#{dir_or_page}" + add_to_breadcrumb_dropdown link_to(WikiPage.unhyphenize(dir_or_page).capitalize, project_wiki_path(@project, current_slug)), location: :after + end + end end |