diff options
-rw-r--r-- | layouts/breadcrumbs.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/layouts/breadcrumbs.html b/layouts/breadcrumbs.html index a96f200a..d6c17970 100644 --- a/layouts/breadcrumbs.html +++ b/layouts/breadcrumbs.html @@ -5,8 +5,10 @@ <img src="https://assets.gitlab-static.net/uploads/-/system/group/avatar/9970/logo-extra-whitespace.png?width=15" class="gl-breadcrumb-avatar-tile" width="15" height="15"> <ol class="breadcrumb gl-breadcrumb-list ml-1"> <% ancestor_array.reverse_each do |item| %> - <li class="gl-breadcrumb-item"><%= link_to item.key?(:title) ? "#{item[:title]}" : "Breadcrumb", item %></li> - <span data-testid="separator" class="gl-breadcrumb-separator"><svg viewBox="0 0 16 16"><path d="M9.9 8.064L5.656 3.821A1 1 0 0 1 7.07 2.407l4.95 4.95a1 1 0 0 1 0 1.414l-4.95 4.95a1 1 0 0 1-1.414-1.414l4.242-4.243z" fill-rule="evenodd"></path></svg></span> + <% if !item[:title].empty? %> + <li class="gl-breadcrumb-item"><%= link_to item.key?(:title) ? "#{item[:title]}" : "Breadcrumb", item %></li> + <span data-testid="separator" class="gl-breadcrumb-separator"><svg viewBox="0 0 16 16"><path d="M9.9 8.064L5.656 3.821A1 1 0 0 1 7.07 2.407l4.95 4.95a1 1 0 0 1 0 1.414l-4.95 4.95a1 1 0 0 1-1.414-1.414l4.242-4.243z" fill-rule="evenodd"></path></svg></span> + <% end %> <% end %> <li class="gl-breadcrumb-item"><%= @item.key?(:title) ? "#{@item[:title]}" : "Current page" %></li> </ol> |