module ApplicationHelper
def breadcrumbs
html = %{
}
# Top-level
html << content_tag(:li, link_to('Home', root_path)) if defined?(root_path)
html << content_tag(:li, link_to('Tracking', admin_tracking_root_path))
html << content_tag(:li, link_to("Traffic Summary", admin_tracking_summary_path)) if controller?('tracking') && action?('summary')
html << content_tag(:li, link_to("Intersite Traffic", admin_tracking_foo_path)) if controller?('tracking') && action?('foo')
html << content_tag(:li, link_to("Traffic Explorer", admin_tracking_explorer_path)) if controller?('tracking') && action?('explorer')
html << content_tag(:li, link_to("Top Content", admin_tracking_content_path)) if controller?('tracking') && action?('content')
html << content_tag(:li, link_to("Leads", admin_tracking_leads_path)) if controller?('tracking') && action?('leads')
html << content_tag(:li, link_to("Visitor Profile", admin_tracking_visitor_profile_path)) if controller?('tracking') && action?('visitor_profile')
# Tidy up
html << %{
}
# Output that puppy.
html.html_safe
end
end