- @page_title = "Page Title"
%table.table.table-bordered.table-striped
  %thead
    %th File or directory
    %th Changed
    %th Comment
  - @tree.contents.sort_by{|c| force_utf8(c.name).downcase}.each do |node|
    %tr{:class => cycle("odd", "even")}
      - if node.is_a? Grit::Tree
        %td.node.folder
          = link_to h(node.basename) + "/", tree_path(@ref, node.name)
      - elsif node.is_a? Grit::Submodule
        %td.node.submodule
          %a{:href => "#"}= h(node.basename)
      - else
        %td{:class => "node file #{class_for_filename(node.name)}"}
          = link_to h(node.basename), blob_path(@ref, node.name).gsub("%2F","/")
      - if node.is_a? Grit::Submodule
        %td.meta
        %td.meta.commit_message
          submodule: #{h(node.url(@ref))}
      - else
        - if last_commit = commit_for_tree_path(@repository, node.name)
          %td.meta= last_commit.committed_date.to_s(:short)
          %td.meta.commit_message
            = link_to truncate(h(last_commit.message), :length => 75, :omission => "&hellip;"), commit_path(last_commit.id)
        - else
          %td.meta
          %td.meta.commit_message
          
- @page_title = "Page Title"
%table#tree-view.table.table-bordered.table-striped
  %thead
    %th File or directory
    %th Changed
    %th Comment
  - @tree.contents.sort_by{|c| force_utf8(c.name).downcase}.each do |node|
    %tr{:class => cycle("odd", "even")}
      - if node.is_a? Grit::Tree
        %td.node.folder
          = link_to h(node.basename) + "/", "#", data: {url: tree_path(@ref, node.name)}
      - elsif node.is_a? Grit::Submodule
        %td.node.submodule
          %a{:href => "#"}= h(node.basename)
      - else
        %td{:class => "node file #{class_for_filename(node.name)}"}
          = link_to h(node.basename), "#", data: {url: blob_path(@ref, node.name).gsub("%2F","/")}
      - if node.is_a? Grit::Submodule
        %td.meta
        %td.meta.commit_message
          submodule: #{h(node.url(@ref))}
      - else
        - if last_commit = commit_for_tree_path(@repository, node.name)
          %td.meta= last_commit.committed_date.to_s(:short)
          %td.meta.commit_message
            = link_to truncate(h(last_commit.message), :length => 75, :omission => "&hellip;"), commit_path(last_commit.id)
        - else
          %td.meta
          %td.meta.commit_message
          
Prepare for ajax browsing by moving url to data attribute
Prepare for ajax browsing by moving url to data attribute
