diff --git a/app/views/projects/git/trees/_show.html.haml b/app/views/projects/git/trees/_show.html.haml index 6567e49be..72f01c2e6 100644 --- a/app/views/projects/git/trees/_show.html.haml +++ b/app/views/projects/git/trees/_show.html.haml @@ -23,10 +23,7 @@ - @project.tree_info(@tree, @treeish, @path).each do |node, node_path, commit| %tr %td - - if node.is_a? Grit::Tree - .pic= image_tag 'folder.png' - .name= link_to(node.name, tree_path(@project, @treeish, node_path), :class => 'files-see') - - elsif node.is_a? Grit::Submodule + - if node.is_a? Grit::Submodule .pic= image_tag 'folder-submodule.png' .name - url = node.url(@treeish).gsub(/^git/, 'http').gsub(/.git$/, '') @@ -35,6 +32,7 @@ - id = node.id = link_to(id[0..6], "#{url}/tree/#{id}", :class => 'files-see') - else - .pic= image_tag 'code.png' + .pic= image_tag (node.is_a?(Grit::Tree) ? 'folder.png' : 'code.png') .name= link_to(node.name, tree_path(@project, @treeish, node_path), :class => 'files-see') + = render 'commit_info', :commit => commit