2012-12-19 09:15:31 +00:00
|
|
|
<div class="site-map">
|
2012-12-19 09:26:38 +00:00
|
|
|
<% i = 1 %>
|
|
|
|
<% @items.each do |item| %>
|
2012-12-19 09:15:31 +00:00
|
|
|
<% if item.show_in_sitemap_for(I18n.locale.to_s) %>
|
|
|
|
<div class="map-block">
|
2012-12-19 09:26:38 +00:00
|
|
|
<h4><%= i %> <a href='<%= item.path %>'><%= item.title %></a></h4>
|
2012-12-19 09:15:31 +00:00
|
|
|
<ul>
|
2012-12-19 09:26:38 +00:00
|
|
|
<% ii = 1 %>
|
|
|
|
<% item.children.each do |child| %>
|
2012-12-19 09:15:31 +00:00
|
|
|
<% if child.show_in_sitemap_for(I18n.locale.to_s) %>
|
2012-12-19 09:26:38 +00:00
|
|
|
<li class="clear"><%= "#{i}-#{ii}" %> <a href='<%= child.path %>'><%= child.title %></a></span></li>
|
|
|
|
<% ii += 1 %>
|
2012-12-19 09:15:31 +00:00
|
|
|
<% end %>
|
|
|
|
<% end if item.children %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2012-12-19 09:26:38 +00:00
|
|
|
<% i += 1 %>
|
2012-12-19 09:15:31 +00:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<%= javascript_include_tag "lib/jquery.masonry.min.js" %>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
$('.site-map').masonry({
|
|
|
|
itemSelector: '.map-block',
|
|
|
|
columnWidth: 220,
|
|
|
|
isAnimated: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|