forked from seyhunak/twitter-bootstrap-rails
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hide breadcrumb elements when there aren't any breadcrumps to show
- Loading branch information
Oliver Azevedo Barnes
committed
Apr 16, 2012
1 parent
4b10325
commit 959e187
Showing
1 changed file
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<% if @breadcrumbs %> | ||
<ul class="breadcrumb"> | ||
<% separator = divider %> | ||
<% if @breadcrumbs %> | ||
<% @breadcrumbs[0..-2].each do |crumb| %> | ||
<li> | ||
<a href="<%= crumb[:url] %>"><%= crumb[:name] %></a> | ||
<span class="divider"><%= separator %></span> | ||
</li> | ||
<% end %> | ||
<li class="active"> | ||
<a href="<%= @breadcrumbs.last[:url] %>"><%= @breadcrumbs.last[:name] %></a> | ||
</li> | ||
<% @breadcrumbs[0..-2].each do |crumb| %> | ||
<li> | ||
<a href="<%= crumb[:url] %>"><%= crumb[:name] %></a> | ||
<span class="divider"><%= separator %></span> | ||
</li> | ||
<% end %> | ||
<li class="active"> | ||
<a href="<%= @breadcrumbs.last[:url] %>"><%= @breadcrumbs.last[:name] %></a> | ||
</li> | ||
</ul> | ||
<% end %> |