[#369] fix error: undefined method 'contents' for #<Grit::Blob
This commit is contained in:
parent
90f6bca72d
commit
435b3bfce9
|
@ -28,7 +28,13 @@
|
||||||
%td{ 'ng-show' => '!el.submodule' }
|
%td{ 'ng-show' => '!el.submodule' }
|
||||||
%span
|
%span
|
||||||
%i.fa.text-primary{ 'ng-class' => 'el.node.class_name' }
|
%i.fa.text-primary{ 'ng-class' => 'el.node.class_name' }
|
||||||
%a{ 'ng-href' => '{{el.node.url}}', 'ng-click' => 'getTree($event, el.node.path)' } {{el.node.name}}
|
%a{ 'ng-href' => '{{el.node.url}}',
|
||||||
|
'ng-click' => 'getTree($event, el.node.path)',
|
||||||
|
'ng-show' => '!el.node.is_blob' }
|
||||||
|
{{el.node.name}}
|
||||||
|
%a{ 'ng-href' => '{{el.node.url}}',
|
||||||
|
'ng-show' => 'el.node.is_blob' }
|
||||||
|
{{el.node.name}}
|
||||||
%td{ 'ng-show' => 'el.commit' }
|
%td{ 'ng-show' => 'el.commit' }
|
||||||
%a{ 'ng-href' => '{{el.commit.url}}' } {{el.commit.short_message}}
|
%a{ 'ng-href' => '{{el.commit.url}}' } {{el.commit.short_message}}
|
||||||
%td{ 'ng-show' => 'el.commit',
|
%td{ 'ng-show' => 'el.commit',
|
||||||
|
|
|
@ -12,7 +12,7 @@ else
|
||||||
page = params[:page].to_i
|
page = params[:page].to_i
|
||||||
|
|
||||||
json.tree do
|
json.tree do
|
||||||
json.array!@project.tree_info(@tree, @treeish, @path, page).each do |node, node_path, commit|
|
json.array! @project.tree_info(@tree, @treeish, @path, page).each do |node, node_path, commit|
|
||||||
if node.is_a? Grit::Submodule
|
if node.is_a? Grit::Submodule
|
||||||
url = submodule_url(node, @treeish)
|
url = submodule_url(node, @treeish)
|
||||||
json.submodule do
|
json.submodule do
|
||||||
|
@ -31,6 +31,7 @@ else
|
||||||
else
|
else
|
||||||
json.class_name 'fa-file-text-o'
|
json.class_name 'fa-file-text-o'
|
||||||
json.url blob_path(*options)
|
json.url blob_path(*options)
|
||||||
|
json.is_blob true
|
||||||
end
|
end
|
||||||
json.name node.name
|
json.name node.name
|
||||||
json.path node_path
|
json.path node_path
|
||||||
|
|
Loading…
Reference in New Issue