From 88f887938babd808402df79ab69543c623c24090 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 27 Mar 2010 23:24:26 -0700 Subject: [PATCH] Don't put an empty list on the page when there's no bread crumbs. --- doc-src/layouts/partials/breadcrumbs.haml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc-src/layouts/partials/breadcrumbs.haml b/doc-src/layouts/partials/breadcrumbs.haml index 1c15bd6a..49a00695 100644 --- a/doc-src/layouts/partials/breadcrumbs.haml +++ b/doc-src/layouts/partials/breadcrumbs.haml @@ -1,6 +1,7 @@ -%ol#breadcrumbs - - breadcrumbs_trail.each_with_index do |bc, index| - - klass = "first" if index == 0 - - klass = "last" if index == breadcrumbs_trail.size - 1 - %li{:class => klass}= link_to_unless_current((bc[:crumb] || bc[:title]), bc.reps.find { |r| r.name == :default }) +- if breadcrumbs_trail.size > 1 + %ol#breadcrumbs + - breadcrumbs_trail.each_with_index do |bc, index| + - klass = "first" if index == 0 + - klass = "last" if index == breadcrumbs_trail.size - 1 + %li{:class => klass}= link_to_unless_current((bc[:crumb] || bc[:title]), bc.reps.find { |r| r.name == :default }) \ No newline at end of file