summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-07-11 20:38:19 +0000
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-07-11 20:38:19 +0000
commit26faaa77ca7cb88fbeeef92a64052baa5b4d6712 (patch)
tree8c1ff68c51c420fbcbed7af0f8d72dfa2fc9bbce
parent410a506c09c968cd50227df239507d74aa1c706a (diff)
downloadgitlab-ce-26faaa77ca7cb88fbeeef92a64052baa5b4d6712.tar.gz
Moves method to TreeHelper
Reuses existing TreeHelper instead of creating a new one just for one method.
-rw-r--r--app/helpers/tree_helper.rb7
-rw-r--r--app/views/projects/tree/_tree_content.html.haml2
2 files changed, 8 insertions, 1 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb
index 4690b6ffbe1..a3575462de0 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -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
diff --git a/app/views/projects/tree/_tree_content.html.haml b/app/views/projects/tree/_tree_content.html.haml
index 889a13339fd..cb459b031fc 100644
--- a/app/views/projects/tree/_tree_content.html.haml
+++ b/app/views/projects/tree/_tree_content.html.haml
@@ -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