2012-07-27 08:53:12 +00:00
|
|
|
<div class="site-map">
|
|
|
|
<% @items.each_with_index do |item, i| %>
|
|
|
|
<div class="map-block">
|
2012-08-01 08:38:07 +00:00
|
|
|
<h4><%= i+1 %> <%= "<a href='#{item.url)}'>#{item.title}</a>" %></h4>
|
2012-07-27 08:53:12 +00:00
|
|
|
<ul>
|
|
|
|
<% item.children.each_with_index do |child, ii| %>
|
2012-08-01 08:38:07 +00:00
|
|
|
<li class="clear"><%= "#{i+1}-#{ii+1}" %> <%= "<a href='#{child.url)}'>#{child.title}</a>" %></span></li>
|
2012-07-27 08:53:12 +00:00
|
|
|
<% end if item.children %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<%= javascript_include_tag "lib/jquery.masonry.min.js" %>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
$('.site-map').masonry({
|
|
|
|
itemSelector: '.map-block',
|
|
|
|
columnWidth: 260,
|
|
|
|
isAnimated: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|