From 83fb5230a4442021ed890fc17d141c6c0345f609 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 19 Dec 2012 17:26:38 +0800 Subject: [PATCH] Changes for site map front end indentation --- app/views/front/show_sitemap.html.erb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/front/show_sitemap.html.erb b/app/views/front/show_sitemap.html.erb index 74da0ac0..16da1a8b 100644 --- a/app/views/front/show_sitemap.html.erb +++ b/app/views/front/show_sitemap.html.erb @@ -1,16 +1,20 @@
- <% @items.each_with_index do |item, i| %> + <% i = 1 %> + <% @items.each do |item| %> <% if item.show_in_sitemap_for(I18n.locale.to_s) %>
-

<%= i+1 %> <%= item.title %>

+

<%= i %> <%= item.title %>

    - <% item.children.each_with_index do |child, ii| %> + <% ii = 1 %> + <% item.children.each do |child| %> <% if child.show_in_sitemap_for(I18n.locale.to_s) %> -
  • <%= "#{i+1}-#{ii+1}" %> <%= child.title %>
  • +
  • <%= "#{i}-#{ii}" %> <%= child.title %>
  • + <% ii += 1 %> <% end %> <% end if item.children %>
+ <% i += 1 %> <% end %> <% end %>