lib/orange-sparkles/views/sitemap/breadcrumb.haml in orange-sparkles-0.5.9 vs lib/orange-sparkles/views/sitemap/breadcrumb.haml in orange-sparkles-0.7.0

- old
+ new

@@ -1,31 +1,31 @@ - if model %p - if packet['route.main_site_route'] && model.ancestors.count > 0 - for a in packet['route.main_site_route'].self_and_ancestors - %a{:href => a.full_path}= orange[:sitemap].link_text_for(a) + %a{:href => route_to(a)}= orange[:sitemap].link_text_for(a) > - for a in (model.ancestors - model.root) - %a{:href => a.full_path}= orange[:sitemap].link_text_for(a) + %a{:href => route_to(a)}= orange[:sitemap].link_text_for(a) > %span.here= orange[:sitemap].link_text_for(model) - elsif packet['route.main_site_route'] - for a in packet['route.main_site_route'].ancestors - %a{:href => a.full_path}= orange[:sitemap].link_text_for(a) + %a{:href => route_to(a)}= orange[:sitemap].link_text_for(a) > %span.here= orange[:sitemap].link_text_for packet['route.main_site_route'] - else - for a in model.ancestors - %a{:href => a.full_path}= orange[:sitemap].link_text_for(a) + %a{:href => route_to(a)}= orange[:sitemap].link_text_for(a) > %span.here= orange[:sitemap].link_text_for(model) - else # Possibly a restful route %p - if packet['route.main_site_route'] - for a in packet['route.main_site_route'].self_and_ancestors - %a{:href => a.full_path}= orange[:sitemap].link_text_for(a) + %a{:href => route_to(a)}= orange[:sitemap].link_text_for(a) > - else - home = orange[:sitemap].home(packet) - %a{:href => home.full_path}= orange[:sitemap].link_text_for(home) + %a{:href => route_to(home)}= orange[:sitemap].link_text_for(home) > %span.here= packet['route.resource'].to_s.capitalize \ No newline at end of file