From c7603fd607614405cc4690bd9db35adc78de38c7 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Wed, 10 Apr 2013 15:57:07 +0400 Subject: [PATCH] #93: fixed path to blob --- app/views/projects/git/trees/_show.html.haml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/projects/git/trees/_show.html.haml b/app/views/projects/git/trees/_show.html.haml index 72f01c2e6..4447201ce 100644 --- a/app/views/projects/git/trees/_show.html.haml +++ b/app/views/projects/git/trees/_show.html.haml @@ -32,7 +32,11 @@ - id = node.id = link_to(id[0..6], "#{url}/tree/#{id}", :class => 'files-see') - else - .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') + - options = [@project, @treeish, node_path] + - if node.is_a?(Grit::Tree) + - pic = 'folder.png' + - path = tree_path *options + .pic= image_tag pic || 'code.png' + .name= link_to(node.name, path || blob_path(*options), :class => 'files-see') = render 'commit_info', :commit => commit