Moves method to TreeHelper

Reuses existing TreeHelper instead of creating a new one just for one
method.
This commit is contained in:
Filipa Lacerda 2019-07-11 20:38:19 +00:00 committed by Douglas Barbosa Alexandre
parent 410a506c09
commit 26faaa77ca
2 changed files with 8 additions and 1 deletions

View File

@ -147,4 +147,11 @@ module TreeHelper
def relative_url_root
Gitlab.config.gitlab.relative_url_root.presence || '/'
end
# project and path are used on the EE version
def tree_content_data(logs_path, project, path)
{
"logs-path" => logs_path
}
end
end

View File

@ -1,4 +1,4 @@
.tree-content-holder.js-tree-content{ 'data-logs-path': @logs_path }
.tree-content-holder.js-tree-content{ data: tree_content_data(@logs_path, @project, @path) }
.table-holder.bordered-box
%table.table#tree-slider{ class: "table_#{@hex_path} tree-table qa-file-tree" }
%thead