#93: some refactoring

This commit is contained in:
Vokhmin Alexey V 2013-04-10 15:46:39 +04:00
parent 0bc804e69d
commit 7fe0079bd7
1 changed files with 3 additions and 5 deletions

View File

@ -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