Moves method to TreeHelper
Reuses existing TreeHelper instead of creating a new one just for one method.
This commit is contained in:
parent
410a506c09
commit
26faaa77ca
|
@ -147,4 +147,11 @@ module TreeHelper
|
||||||
def relative_url_root
|
def relative_url_root
|
||||||
Gitlab.config.gitlab.relative_url_root.presence || '/'
|
Gitlab.config.gitlab.relative_url_root.presence || '/'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# project and path are used on the EE version
|
||||||
|
def tree_content_data(logs_path, project, path)
|
||||||
|
{
|
||||||
|
"logs-path" => logs_path
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -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-holder.bordered-box
|
||||||
%table.table#tree-slider{ class: "table_#{@hex_path} tree-table qa-file-tree" }
|
%table.table#tree-slider{ class: "table_#{@hex_path} tree-table qa-file-tree" }
|
||||||
%thead
|
%thead
|
||||||
|
|
Loading…
Reference in New Issue