%h1 =root - if parent %a{ :href => parent.empty? ? "/#{idx}" : "/#{idx}#{parent}", :class => "parent" } ↪ = parent.empty? ? '/' : parent - else %a{ :href => "/", :class => "parent" } ↪ Back to selection %h2 =request.path_info.empty? ? '/' : request.path_info %table -contents.each_with_index do |f, i| %tr %td %a{ :href => "/#{idx}#{request.path_info}/#{File.basename(f)}" } ="#{request.path_info}/#{File.basename(f)}"