summaryrefslogtreecommitdiff
path: root/app/views/layouts/nav/_breadcrumbs.html.haml
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-07-06 17:24:03 +0100
committerPhil Hughes <me@iamphill.com>2017-07-06 17:24:03 +0100
commitc85df8105e3b8982ecf6a16f8ae9f3af2f130030 (patch)
tree099acdacb9e622db8780c520faff649e2a6cf27d /app/views/layouts/nav/_breadcrumbs.html.haml
parent6d3a9cc98e1503b0ef49906833aab094a8e6b686 (diff)
downloadgitlab-ce-c85df8105e3b8982ecf6a16f8ae9f3af2f130030.tar.gz
improvements to breadcrumb titles, links & nesting
Diffstat (limited to 'app/views/layouts/nav/_breadcrumbs.html.haml')
-rw-r--r--app/views/layouts/nav/_breadcrumbs.html.haml11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/views/layouts/nav/_breadcrumbs.html.haml b/app/views/layouts/nav/_breadcrumbs.html.haml
index 5f1641f4300..171ece25de0 100644
--- a/app/views/layouts/nav/_breadcrumbs.html.haml
+++ b/app/views/layouts/nav/_breadcrumbs.html.haml
@@ -1,4 +1,5 @@
- breadcrumb_title = @breadcrumb_title || controller.controller_name.humanize
+- breadcrumb_link = breadcrumb_title_link
- hide_top_links = @hide_top_links || false
%nav.breadcrumbs{ role: "navigation" }
@@ -8,12 +9,16 @@
.title
= link_to "GitLab", root_path
\/
+ - if content_for?(:header_title_before)
+ = yield :header_title_before
+ \/
= header_title
%h2.breadcrumbs-sub-title
%ul.list-unstyled
- - if content_for?(:sub_title_before)
- = yield :sub_title_before
- %li= link_to breadcrumb_title, request.path
+ - if @breadcrumbs_extra_links
+ - @breadcrumbs_extra_links.each do |extra|
+ %li= link_to extra[:text], extra[:link]
+ %li= link_to breadcrumb_title, breadcrumb_link
- if content_for?(:breadcrumbs_extra)
.breadcrumbs-extra.hidden-xs= yield :breadcrumbs_extra
= yield :header_content