orbit-basic/app/views/front/show_sitemap.html.erb

27 lines
840 B
Plaintext

<div class="site-map">
<% @items.each_with_index do |item, i| %>
<% if item.show_in_sitemap_for(I18n.locale.to_s) %>
<div class="map-block">
<h4><%= i+1 %> <a href='<%= item.path %>'><%= item.title %></a></h4>
<ul>
<% item.children.each_with_index do |child, ii| %>
<% if child.show_in_sitemap_for(I18n.locale.to_s) %>
<li class="clear"><%= "#{i+1}-#{ii+1}" %> <a href='<%= child.path %>'><%= child.title %></a></span></li>
<% end %>
<% end if item.children %>
</ul>
</div>
<% 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>