Change breadcrumb html

This commit is contained in:
chris committed 2013-02-19 17:39:42 +08:00
1 parent bfad8467c8
commit 2a293734c7
1 file changed
+13 -9
+13 -9
View File
@@ -1,11 +1,15 @@
<% if not @ancestors.empty? %>
<div class='category_list'>
<ul class='list'>
<% @ancestors.each do |node| %>
<li class='active'>
<%= link_to node.title, "/#{node.path}" %>
</li>
<ul class="breadcrumb">
<% @ancestors.each_with_index do |node, i| %>
<% last = i == @ancestors.size-1 %>
<li class='<%= 'active' if last %>'>
<% if last %>
<%= node.title %>
<% else %>
<%= link_to node.title, "/#{node.path}" %>
<span class="divider">/</span>
<% end %>
</ul>
</div>
<% end %>
</li>
<% end %>
</ul>
<% end %>