[#369] git trees: fix root path
This commit is contained in:
parent
e49dd53f3b
commit
02dd616687
|
@ -6,12 +6,11 @@ RosaABF.controller('GitTreeCtrl', ['$scope', '$http', '$location', function($sco
|
|||
$scope.breadcrumb = null;
|
||||
$scope.processing = false;
|
||||
|
||||
$scope.init = function(project, treeish, path, root_path) {
|
||||
$scope.init = function(project, treeish, path) {
|
||||
$scope.project = project;
|
||||
$scope.treeish = treeish;
|
||||
$scope.root_path = root_path;
|
||||
$scope.path = path;
|
||||
//$scope.getTree();
|
||||
$scope.refresh();
|
||||
};
|
||||
|
||||
$scope.refresh = function(more) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%h3= t 'layout.projects.files_in_project'
|
||||
%div{ 'ng-controller' => 'GitTreeCtrl', 'ng-cloak' => true,
|
||||
'ng-init' => "init('#{@project.name_with_owner}', '#{@treeish}', '#{@path}', '#{root_path}')" }
|
||||
'ng-init' => "init('#{@project.name_with_owner}', '#{@treeish}', '#{@path}')" }
|
||||
.files
|
||||
.pull-left= render 'whereami'
|
||||
.pull-right= render 'fork'
|
||||
|
|
|
@ -24,13 +24,12 @@ else
|
|||
else
|
||||
|
||||
json.node do
|
||||
options = [@project, @treeish, node_path]
|
||||
if node.is_a?(Grit::Tree)
|
||||
json.class_name 'fa-folder'
|
||||
json.url tree_path *options
|
||||
json.url tree_path(@project, "#{@treeish}/#{node_path}")
|
||||
else
|
||||
json.class_name 'fa-file-text-o'
|
||||
json.url blob_path(*options)
|
||||
json.url blob_path(@project, @treeish, node_path)
|
||||
json.is_blob true
|
||||
end
|
||||
json.name node.name
|
||||
|
|
Loading…
Reference in New Issue