summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-07-14 10:03:59 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-07-14 10:03:59 +0000
commit0c4f512bae5b5e67658dd9707430185f1a1f97cc (patch)
tree9267157bfb4ea41b922f6cd7d248c2ec4797efb2 /app/views
parent1afdbe320e60aa227dfd75ae1f1f128106660c8a (diff)
parent6bbdce640cc6880a4d3f0c31034e6789b89638d9 (diff)
downloadgitlab-ce-0c4f512bae5b5e67658dd9707430185f1a1f97cc.tar.gz
Merge branch 'find-file-no-longer-inline' into 'master'
Move find file URL out of global variable See merge request !12846
Diffstat (limited to 'app/views')
-rw-r--r--app/views/layouts/application.html.haml2
-rw-r--r--app/views/layouts/header/_default.html.haml5
-rw-r--r--app/views/layouts/header/_new.html.haml5
3 files changed, 1 insertions, 11 deletions
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 81f83b74826..38b95d11fd4 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -1,7 +1,7 @@
!!! 5
%html{ lang: I18n.locale, class: "#{page_class}" }
= render "layouts/head"
- %body{ class: @body_class, data: { page: body_data_page, project: "#{@project.path if @project}", group: "#{@group.path if @group}" } }
+ %body{ class: @body_class, data: { page: body_data_page, project: "#{@project.path if @project}", group: "#{@group.path if @group}", find_file: find_file_path } }
= render "layouts/init_auto_complete" if @gfm_form
- if show_new_nav?
= render "layouts/header/new"
diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml
index 25acdb700ef..bc3293fd100 100644
--- a/app/views/layouts/header/_default.html.haml
+++ b/app/views/layouts/header/_default.html.haml
@@ -91,8 +91,3 @@
= yield :header_content
= render 'shared/outdated_browser'
-
-- if @project && !@project.empty_repo?
- - if ref = @ref || @project.repository.root_ref
- :javascript
- var findFileURL = "#{project_find_file_path(@project, ref)}";
diff --git a/app/views/layouts/header/_new.html.haml b/app/views/layouts/header/_new.html.haml
index 5bc15d68631..4697d91724b 100644
--- a/app/views/layouts/header/_new.html.haml
+++ b/app/views/layouts/header/_new.html.haml
@@ -84,8 +84,3 @@
= icon('times', class: 'js-navbar-toggle-left', style: 'display: none;')
= render 'shared/outdated_browser'
-
-- if @project && !@project.empty_repo?
- - if ref = @ref || @project.repository.root_ref
- :javascript
- var findFileURL = "#{project_find_file_path(@project, ref)}";